Knowledge Base


Important! All new questions are usually answered within the next business day.

Drop Down (Tree) Menu V3

(views: 11493)

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: 3954)

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 


User Comments

Restrict "hand" to only URL links?
posted by janericster on 2008-12-05

I like the above workaround, but for it to be truly intuitive for the user, the hand cursor should only display on link items (menu entries that have an URL associated with them).

Is this possible?
Restrict "hand" to only URL links?
posted by negush on 2008-12-08

@janericster

This actually isn't so hard. Every menu item object has the attributes specified in the xml file as properties of that menu item. So all you have to do is check to see whether a menu item has the "url" property, before you activate the hand cursor:

if (arg.itemsMc[i].url != undefined) arg.itemsMc[i].useHandCursor = true;
handcursor AND centered labels
posted by estone on 2009-01-19

Hi,

i used the code to center al the labels.. But now i also try to set the handcursor but i cant get them to work both.

Can you show me how to aply both?

Thanks!
handcursor AND centered labels
posted by negush on 2009-01-20

@estone

Actually it can be done. You just need to combine this example with the one that centers labels and it should be working without problems
handcursor AND centered labels
posted by estone on 2009-01-20

Hi negush,
can you have a look at my .fla to fix this (and maybe also the 1px gab problem with the submenu)?
handcursor AND centered labels
posted by negush on 2009-01-20

Just write to the support team (support [at] jumpeyecomponents [dot] com) with a detailed description of your problem and attach your source files to the mail. We'll take a look at them to see what's wrong.
handcursor AND centered labels
posted by estone on 2009-01-21

Hi,
I just send the files.
Thanks!


Login to post your comment login to post your comment



Back

Knowledge Base Search

Enter keywords below:
Advanced Search
FlashEff 2.0
Create professional flash photo slideshows online

FREE Flash Stuff

Check out these free, fully functional AS3.0 Flash components by Jumpeye:

FlashEff 2.0 Free
(free for non-commercial use)

JC Panorama
(free for non-commercial use)

JC Play List
(fully free)

Basic Menu Pack V3
(free AS3 version)

MCTE V3
(free AS3 version)

JC Player
(free for non-commercial use)

JC Flash Map
(free for non-commercial use)

Flash Bookmarks
(fully free)

ActionScript Bridge AS2-AS3
(fully free)

JS Charts
(free for non-commercial use)

Free Trial Versions

The trial versions do have a major limitation. They will ONLY run into debugger flash player versions, such as the Flash IDE player and the activeX FP used by developers.

Switch from Free Trial version to Full version.

You can switch from Trial to Full versions in a blink of an eye.
See this tutorial in order to find out how.

We accept Google Checkout

Google Checkout Acceptance Mark

Secured by VeriSign