Knowledge Base |
Important! All new questions are usually answered within the next business day.
Drop Down (Tree) Menu V3
(views: 5916)
Drop Down Menu V3 and Drop Down Tree Menu V3 are xml flash accordion menus featuring customized states, customized transitions and tweens. Here are all known issues for Drop Down Menu V3 and Drop Down Tree Menu V3, they should be similar, since basically it is the same component. If you have any questions that you think we should discuss here please let us know.
Hand cursor
(2007-12-26 - views: 1674)
Q: Can Drop Down Menu display hand cursor on rollover?
A: Just like the accordion menu, the drop down menu can have the hand cursor displayed when the user rolls over an item. To have this, you need to parse the menu and for each item set the useHandCursor property to true. Here is the code you need to use:
var listener = new Object();
listener.onDrawComplete = function(evtObj:Object):Void {
// Call the recurent function for the first menu.
parseMenu(myMenu.subMenus);
}
// This function parses the entire menu and sets the hand
// cursor for each item.
function parseMenu(arg):Void {
// Get the length of the menu items array.
var len:Number = arg.itemsMc.length;
// Get each menu item.
for (var i:Number = 0; i < len; i++) {
// Check if this menu item will open another submenu. If yes,
// we will check that submenu (call the recurent function on
// that submenu).
if (arg.itemsMc[i].myMenu!=undefined) {
parseMenu(arg.itemsMc[i].myMenu);
}
// The current menu item is actually a MovieClip object that
// contains other movie clips (background) and a text field (you
// can reference that text field too - check the knowledge base
// item at http://www.jumpeyecomponents.com/knowledgebase/Drop-Down-%28Tree%29-Menu-V3/Referencing-item%27s-textfield-in-Drop-Down-%28Tree%29-Menu-V3~138/
// Now we can set the hand cursor for the current menu item.
arg.itemsMc[i].useHandCursor = true;
}
}
// Add a listener to menu, so we know when the menu has
// been completely drawn (by this time you can have access
// to all the menu items).
myMenu.addEventListener("onDrawComplete", listener);
Here you have the example files for this case.
Files: DDTM_HandCursor.zip
var listener = new Object();
listener.onDrawComplete = function(evtObj:Object):Void {
// Call the recurent function for the first menu.
parseMenu(myMenu.subMenus);
}
// This function parses the entire menu and sets the hand
// cursor for each item.
function parseMenu(arg):Void {
// Get the length of the menu items array.
var len:Number = arg.itemsMc.length;
// Get each menu item.
for (var i:Number = 0; i < len; i++) {
// Check if this menu item will open another submenu. If yes,
// we will check that submenu (call the recurent function on
// that submenu).
if (arg.itemsMc[i].myMenu!=undefined) {
parseMenu(arg.itemsMc[i].myMenu);
}
// The current menu item is actually a MovieClip object that
// contains other movie clips (background) and a text field (you
// can reference that text field too - check the knowledge base
// item at http://www.jumpeyecomponents.com/knowledgebase/Drop-Down-%28Tree%29-Menu-V3/Referencing-item%27s-textfield-in-Drop-Down-%28Tree%29-Menu-V3~138/
// Now we can set the hand cursor for the current menu item.
arg.itemsMc[i].useHandCursor = true;
}
}
// Add a listener to menu, so we know when the menu has
// been completely drawn (by this time you can have access
// to all the menu items).
myMenu.addEventListener("onDrawComplete", listener);
Here you have the example files for this case.
Files: DDTM_HandCursor.zip
Login to post your comment
Other questions in this item:
Drop over HTML content Call JavaScript from XML Open menu item pages into target - "_self" Item description from XML Initiate Drop Down Tree Menu V3 through ActionScript Disable-Enable Drop Down (Tree) Menu Displaying the submenu horizontally instead of vertical Navigate through scenes Adding a checkbox to a menu Referencing item's textfield in Drop Down (Tree) Menu V3 Centering the titles on the Drop Down (Tree) Menu V3 Load movies on item select Go to different frames by pressing a menu item Changing Design Different text formats and anti alias setXML() generates error message Adding a separating gap between menu items Autoexpand on start Open menu items upwards Load movies on item select Correct width of the main menu Initiate DropDownTreeMenuV3AS3 by ActionScript codeMenu |
|
|
