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.
Load movies on item select
For example, you could add an extra attribute to each menu item to store the path and file name of the content you want to load:
...
<main>
<item title="Files to load">
<item title="Load First Flash Movie" path="First.swf"/>
<item title="Load Second Flash Movie" path="Second.swf"/>
</item>
...
When a menu item has been pressed, you can detect that event and find out the value of the path attribute:
var listener:Object = new Object();
listener.onRelease = function(evt:Object):Void {
if (evt.item.path != undefined) {
container_mc.loadMovie(evt.item.path);
}
}
myMenu.addEventListener("onRelease", listener);
The attached example file uses the drop down tree menu to load two external flash movies. Off course your code of the onRelease event handler can be changes so you can attach internal movie clips or do whatever you need to do.
Files: ATM_LoadContent.zip