Knowledge Base |
Important! All new questions are usually answered within the next business day.
Accordion (Tree) Menu V3
(views: 9691)
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.
Call JavaScript from XML
(2007-07-06 - views: 5330)
Q: How can i call JavaScript function from XML?
A: Nothing more simple. You have to place your JavaScript code in url param in xml like this:
<item title="new Item" url="javascript:yourFunction('This alert is from XML')" target="_self">
In order to make this example functionable you have to set target param to indicate where is your JavaScript function is located. If you have your target = "_blank" it will search for your JavaScript function in a blank HTML page.User Comments
dispatch a click event
Yes, it is possible to dispatch a click event for the AS2 component. Just use the dispatchEvent method of the component to dispatch the desired event and you can also pass any parameters you like through the event object:
myMenu.dispatchEvent( { target:myMenu, type:"onRelease", item:myMenu.items[0], anotherParam:"value" } );
The previous example triggers an "onRelease" event on one of the menu items and also passes along a new parameter to the event handler function called "anotherParam".
posted by negush on 2008-05-12
Yes, it is possible to dispatch a click event for the AS2 component. Just use the dispatchEvent method of the component to dispatch the desired event and you can also pass any parameters you like through the event object:
myMenu.dispatchEvent( { target:myMenu, type:"onRelease", item:myMenu.items[0], anotherParam:"value" } );
The previous example triggers an "onRelease" event on one of the menu items and also passes along a new parameter to the event handler function called "anotherParam".
Login to post your comment
Other questions in this item:
Open menu item pages into target - "_self" Transparent background menu Item description from XML Use hand cursor on menu Can I add a rollover sound? Go to different frames by pressing a menu item Referencing item's textfield in Accordion (Tree) Menu V3 Scene navigation Add different styles for each main items. Keep the Accordion (Tree) Menu V3 vertically aligned Animated items Load movies on item select Change Text Color on Rollover Disable-Enable Accordion (Tree) Menu V3 Adding icons Underline On Rollover how to change fontsize How do I add the AccordionTreeMenuV3 on stage in runtime? Selected item level acc.height not updated? Add a fixed item under the menu How do I add the AccordionTreeMenuV3AS3 from class file to stage Autoexpand on Start Automatic Collapse Get the type of the selected item hotwo: submenus already expanded on activation? Insert a line break into label Children of a menu item Align header text to right Letter kerning Change the position of the menu icons Go To First Child When Select Top Level Menu Item Reference to text fields within menu items Accordion Tree Menu expandAll() Change the position of the folder icons Use hand cursor on menu Open menu upwards clickItem() and expandItem() do not execute actions of menu item Spacing between menu items Step backwards and forwards through menu Rotated text for menu items Accordion menu accurate size Menu Item visibility / disable Letter kerning Go to different frames by pressing a menu item Title on multiple linesMenu |
|
|

Is it possible to dispatch a click event for a specific item from a movie clip?