Knowledge Base |
Text Menu Bar V1
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?
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......:-)
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