My account
Shopping cart
Knowledge base
Support

Knowledge Base

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

Text Menu Bar V1

(views: 11596)

TextMenuBar is a highly customizable flash menu component that enables flash developers to embed advanced flash tweening menu bars inside their web pages in minutes, saving precious time and money. TextMenuBar works in particular with Flash 8 and Flash MX2004 and it is usable in flash or HTML site. The vertical and horizontal alignment can be set from the properties panel. TextMenuBar enables customization for each item from the menu through a XML file.



LOAD EXTERNAL SWF THROUGH XML?

(2007-12-12 - views: 12793)
Q: I would like to load an external swf in my movie using the text menu Bar V1...I do understand xml and action script but am not entirely sure what node to use to pass the parameters. Like for your Drop Down Tree menu v3 you can add a child node <item frame = ""/> in the main node of the xml file. Would there be a similar node in the Text Menu Bar v1. I thought i saw a tutorial on it here a couple of months back, but cant seem to find it now.

Would i be able to use the callFunction to aid me in this situation, or use the url parameter to call for an external .swf?? I dont think so, but ill try and play around with it....I am sure I'll figure it out, but any push in the right direction would be great...Thanks!!!

- Once you know how Flash works the rest is trivial......:-)

A: There are two ways in which you could load external files (.swf, .jpg, .png and .gif) when you press an item of the TextMenuBar component:

1. Write a load function in your clip which loads the files passed as parameters. Use the "callFunction" attribute of the xml nodes corresponding to the menu's items to call the appropriate function from your main clip.

2. Insert a new attribute (e.g. "clip") in the xml nodes corresponding to the menu's items, which would have as value the path and file name of the external .swf you need to load. Write a load function in your clip which loads the files passed as parameters. Catch one of the item events (onItemPress, onItemRelease, onItemRollOver, onItemRollOut) dispatched by the menu instance to get the path and file name of the external clip from the item's corresponding xml node. Once you have the path and file name, you can pass it to the loader function.

The example file attached to this item contains the code used by both of the methods with detailed comments.
Files: TextMenuBar_loadSWF.zip 


Other questions in this item

XML Code

Back