Knowledge Base |
Accordion (Tree) Menu V3
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.
Use hand cursor on menu
Place the AccordionTreeMenu component on the stage, give it an instance name of accTreeMenu and, from the Component Inspector panel, set the xmlPath property to an appropriate .xml file. Next, bring up the Actions panel and place the next code in it:
import com.jumpeye.Events.AccordionMenuEvents;
// You have to listen to the AccordionMenuEvents.DRAW event, to set the
// useHandCursor property of the items, because this is the
// moment when the items already exist (the drawing is done on
// the second frame of the component so on the first frame
// there are no items defined).
accTreeMenu.addEventListener(AccordionMenuEvents.DRAW, completeHandler);
function completeHandler(evtObj:AccordionMenuEvents):void {
// The number of menu items.
var length:Number = evtObj.target.items.length;
// Go through all the menu items and set the header elements to use the hand
// cursor (also you have to disable mouse events for the items' children).
for(var i:int = 0; i < length; i++) {
evtObj.target.items[i].header.buttonMode = true;
evtObj.target.items[i].header.useHandCursor = true;
evtObj.target.items[i].header.mouseChildren = false;
}
}