A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: load directly from library to empty stage using actionscript?

  1. #1
    Member
    Join Date
    Dec 2002
    Posts
    76

    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.
    Attached Images Attached Images

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Location
    Houston TX
    Posts
    563
    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.

    www.e4net.com
    www.tobymack.com
    Best regards
    Toby Mack

    For the best and funniest Audio Blog on the Internet come visit:

    http://feeds.feedburner.com/Fla****UpBlog

  3. #3
    Member
    Join Date
    Dec 2002
    Posts
    76
    know of any examples or tutorials to show how that would be done exactly?

  4. #4
    Senior Member
    Join Date
    Nov 2001
    Location
    Houston TX
    Posts
    563
    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:

    http://feeds.feedburner.com/Fla****UpBlog

  5. #5
    Member
    Join Date
    Dec 2002
    Posts
    76
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center