dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Accessing global variables values in different scenes

  1. #1
    Junior Member
    Join Date
    Sep 2000
    Posts
    2
    I have a movie with 3 scenes, and I am wanting to check variables on the various scenes that are set when the scene loads.

    For example, on scene 1, I set a global variable: "varScene1 = 0", on scene 2 I want to place a variable check to see if the variable varScene1 is still 0, like this:"if (varScene1 != 0) {}". How do I reference the value of the variable that is set in the scene? Also, if I have a movie clip that has the variable check in it, how would I tell it to get the variable from the current scene that the movie clip is in.

    Hope this makes sense.

    Thanks,
    Jeff

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Location
    Jerusalem, Isreal
    Posts
    254
    i think that _root.varScene1 shoud do it,
    after all, all the scenes sit underneath the main root time line.
    try it...

  3. #3
    Junior Member
    Join Date
    Sep 2000
    Posts
    2

    Thanks

    Thanks.

    That fixed it.


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