Knowledge Base


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

Accordion (Tree) Menu V3

(views: 18244)

Accordion Menu V3 and Accordion Tree Menu V3 are xml flash accordion menus featuring customized states, customized transitions and tweens. Here are all known issues for Accordion Menu V3 and Accordion 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.



clickItem() and expandItem() do not execute actions of menu item

(2008-06-11 - views: 3620)

Q: I keep calling expandItem(itemId) and clickItem(itemId) but they do not have any effect. They only expand or select the target menu item, but they don't execute the actions of the menu item, like calling the function specified in the xml file or triggering the appropriate event. How can this be fixed ?
A: Indeed, the clickItem() and expandItem() methods do only what their name implies and nothing else. If you also would like to receive an event and have the function from the xml file called by the component, then you need a few extra lines of code, besides the one of the two function calls:
   
    accTreeMenu.clickItem(itemId); // or accTreeMenu.expandItem(itemId);
    // the next line of code will execute all the actions associated with the navigation mode: press, release or rollover
    accTreeMenu.getItemById(itemId).itemAction(accTreeMenu.navigationMode);
    var eventType:String;
    switch(accTreeMenu.navigationMode) {
        case "press" : eventType = "onPress"; break;
        case "release" : eventType = "onRelease"; break;
        case "rollover" : eventType = "onRollOver"; break;
    }
    accTreeMenu.dispatchEvent({type:eventType, target:accTreeMenu, item:accTreeMenu.getItemById(itemId)});


User Comments

item.expand()...item = title
posted by espritalon on 2008-07-31

how do I specify the item on which i want the method to act?
item.expand()...item = title
posted by negush on 2008-08-01

The expand() or collapse() methods belong to the items, so you need to get a reference to that item. You can get a reference to an item by using the getItemById() or getItemByProperty() methods. The first method needs to receive the item's id as a String parameter and the second method requires the value of one of the item's properties, like title.
clickItem(); for AS3 version
posted by hdharker on 2009-11-30

Do you have this fix for the AS3 version? the clickItem(itemID) works, but the rest of the code to initiate any actions is in AS2.
clickItem(); for AS3 version
posted by hdharker on 2009-11-30

oops! please disregard previous post. I was just getting an error and assumed it was as2. Feel free to delete these posts. :)


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