A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: loadVariablesNum

  1. #1
    Member
    Join Date
    Oct 2006
    Posts
    36

    loadVariablesNum

    Code:
    loadVariablesNum ("text.htm", 0);

    This code worked great in AS2. It would get variables from text.htm.

    Would someone be able to demonstrate how this now works in AS3?

  2. #2
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    the concept has changed a bit (and is a little more complicated). Instead of loading variables into a level or existing timeline, you now create a new object and load variables into that. What you would use to do this is URLLoader. There's an example on liveDocs
    http://livedocs.macromedia.com/flex/...URLLoader.html

  3. #3
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    If you need to know what has changed to what visit this site:
    http://livedocs.macromedia.com/labs/as3preview/langref/
    check on the left side under Appnendixes - Actionscript 2 Migration.
    - The right of the People to create Flash movies shall not be infringed. -

  4. #4
    Junior Member
    Join Date
    Sep 2004
    Location
    Scotland
    Posts
    20
    Hi Guys,

    I can load text into dynamic text boxes when they are on the main timeline.
    But when the dynamic text box is inside a movieclip I can't get the text load into it.

    Can anyone explain how to get "loadVariablesNum ("text.txt", 0);"
    to load the text into a dynamic text box which is inside a movieclip.

    Foo
    Foo-Wing Li

    Co-Director
    DGFX Designs LLP


    www.dgfxdesigns.com

    Website Templates

  5. #5
    Junior Member
    Join Date
    Jul 2008
    Posts
    7

    load text

    add
    Code:
    _root.
    in front of your textbox Var-name.

  6. #6
    Junior Member
    Join Date
    Sep 2004
    Location
    Scotland
    Posts
    20
    Thanks Inzzomnia for replying.

    Since I post may original question I managed to work it out for myself.
    The following is roughly how your .txt file should look like but with your own text after the =. Also the path to the text box will be unqiue to your movieclip after the &&_root.
    There are several text box variables on my example to do this you need the && before every new variable. This saves you having to make a new .txt for each variable text you want to load.

    &&_root.gameZoom_mc.game_mc.text=Match the items to the correct person. Simply touch the character you think relates to the item on display in the box below.
    &&_root.gameZoom_mc.game_mc.startText=Start
    &&_root.gameZoom_mc.game_mc.backText=Back to Lifestyles
    Foo-Wing Li

    Co-Director
    DGFX Designs LLP


    www.dgfxdesigns.com

    Website Templates

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