My account
Shopping cart
Knowledge base
Support

Knowledge Base

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

Accordion (Tree) Menu V3

(views: 38658)

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: 14882)
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)});


Back