ActionScript Events
| Inheritance | MovieClip > AccordionTreeMenu class |
Events unique to the AccordionTreeMenu class
There are no events unique to the AccordionTreeMenu class. However, you can use the functions xmlOnLoadEvent and clickEvent (called from AccordionTreeMenu.as) as analogs of onLoadXML and click listeners, respectively.
function clickEvent(index) {{
// your code here
}
index An integer indicating the zero-based index of the clicked menu item.
Nothing.
Function; is called from the AccordionTreeMenu.as class when the mouse is clicked (pressed) over a menu item. This function is an analog of click listener.
The following example, written on a frame of the Timeline, uses the clickEvent function to output a message:
function clickEvent(index:Number) {
trace("The index of the menu item that has been clicked is " + index);
}
function xmlOnLoadEvent() {{
// your code here
}
Nothing.
Function; is called from the AccordionTreeMenu.as class when the XML file is loaded and processed. This function is an analog of onLoadXML listener.
The following example, written on a frame of the Timeline, uses the xmlOnLoadEvent function to output a message:
function xmlOnLoadEvent() {
trace("The XML file is loaded");
}
|