A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: AS2 variable help

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    5

    Question AS2 variable help

    I feel really dumb for not being able to figure this out.

    Basically I want to define a variable in a movieclip and then display that in a textbox outside of the movieclip.

    To be a little more specific I want to make a variable be false and then when a movieclip gets to a certain frame the variable is set to be true. The true will then be displayed in a textbox on the main timeline.



    Also this is my first time doing anything in flash! YAY!

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    First time? COOL

    Make a dynamic text field (use text tool to make a text box on the Main Timeline, open Properties Panel, CTRL+F3, and where it says Static Text, change to Dynamic Text, and also in there, find a field that says Variable name, and type something like, my_txt, in there), and then in your movieclip, when you set it to false, use this code as well:

    Actionscript Code:
    _root.my_txt = variable_name;

    _root targets the Main Timeline, and the variable_name is your variable name, and then the text field will display the value of it, and in this case, it would be true

    Hope it helps, and good luck with Flash
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Junior Member
    Join Date
    Oct 2011
    Posts
    5
    Thank you!

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