1 Reply Latest reply on Feb 6, 2008 11:38 PM by Harry_Vermeulen

    Global variable value becomes null

    jack_krack
      Iam assigning a value to a global variable & then loading another movie in which i have to acess the variable & based on the value i need to play particular frame but when the new movie is loaded the variable returns null value,code attached... plz let me know what i am doing wrong.....
        • 1. Global variable value becomes null
          Harry_Vermeulen
          from the _global definition: "unlike timeline-declared or locally-declared variables and functions, global variables and functions are visible to every Timeline and scope in in the Flash movie"

          this means that when you load another movie over you current one, the _global variables dissappear together with the movie you're replacing, since they are global inside the movie, not outside of it. try loading your new movie to a different level and then tracing the variable.

          i.e. loadMovie("test.swf", 1);