A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Variables from another Clip

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Location
    Hindustan
    Posts
    11

    Variables from another Clip

    I have a movie with two movie clip...One define a variable...The other should display it...

    How do I do it ?

    There is file attached...It does not work.

    Please help!
    Attached Files Attached Files
    ============
    ~ Lord Loh. ~
    ============
    Loh Crafts.

  2. #2
    Senior Member jbum's Avatar
    Join Date
    Feb 2004
    Location
    Los Angeles
    Posts
    2,920
    In your movie m2 only exists on frames 1-3, but you're trying to access a variable attached to it on frame 5.

    To fix this, you will need to either insure that both clips are on the stage at the same time, or you will need to copy the variable to a global or a _root variable, so you can get to it.

    For example, if you modify the script of your m2 movie as follows:

    _root.a = "Value I want";

    Then you will be able to access it from the text field in symbol1 by referencing it as _root.a

    - Jim

  3. #3
    Junior Member
    Join Date
    Apr 2004
    Location
    Hindustan
    Posts
    11
    Oh! Thanks! I got it right! I am a self taught flash animator...I am still in the process of learning....Thanks!
    ============
    ~ Lord Loh. ~
    ============
    Loh Crafts.

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