My account
Shopping cart
Knowledge base
Support

Knowledge Base

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

Drop Down (Tree) Menu V3

(views: 29636)

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.



Load movies on item select

(2008-01-08 - views: 13889)
Q: How can I use the drop-down tree menu to load movies into a content box for a flash website?
A: Each menu item is created using the <item> node from the setup xml file. That node can contain different attributes with different values. You can use listeners to get the selected menu item (either "onPress" or "onRelease") and then read the item's properties.

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="File">
                <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: DDTM_LoadContent.zip 


Back