load directly from library to empty stage using actionscript?
Is it possible to load all MC's, Buttons, and Graphics directly from the library to a empty stage at runtime?
I am attempting a animated menubar, with a partially tranparent bg. I am wanting to(at runtime) get varibles that pass through a function which will detemrine how many button instances to create, dynamically size the bg, then load the background graphic with its set attributes onto the stage, then load the buttons from the library, and automatically center the buttons. I have attached the .jpg of what the menu should tentatively look like, but the .fla file is of no use since has no code yet, simply because I don't know haw to something this tricky. I am guessing I'll have the create empty clips and attach the instances of the graphic, and button. But what do I know.
Any advice, suggestinons, related threads, or tutorials of the subject matter would be greatly appreciated.
ps. I belive I have a handle on passing in parameters from the HTML/<EMBED> code to dynamically lable the buttons, and create buttons as needed, but any advice or suggestions for thin would also be appreciated.
You can do this with XML files and then load the data from them into the flash movie.
After the XML is loaded you can use action scripting to find out how many variables have been loaded and then dup and position the needed buttons required.
When it comes down to this kind of application there are no exact tutorials. When I work on net concepts I look for reading material on each item of the project and then marry what I have learned to the project.
Look for XML and Flash.
Look for action scripts that deal with XML.
Look for how to test if variables are loaded.
Look for loading dynamic text.
All of these are in what you want to do.
Best regards
Toby Mack
For the best and funniest Audio Blog on the Internet come visit:
Alright, thank you for your help. Didn't realive it was going to get so complicated, but just as menubar is my project to learn more flash, it'll be for learing XML.