0 Replies Latest reply on Oct 31, 2014 12:19 PM by Freelance77

    Declaring a Global Variable (object?)




      This is probably a rather sophmoric question, but here it is.

      I am using the youtube api, that declares a variable (object)  to hold the api instance.


      var tourvid:Object;


      Now within different scenes in the project there is a movie clip with complex controls that reference the video object by its "tourvid" name. eg. tourvid.seekTo(344)

      Seeing that I can't simply change the variable to "var tourvid1" & "var tourvid2" in each respective scene, since the single movieclip would not resolve to both, how could I fix this so that the same object is loaded in each scene? (right now there is a namespace error because its 2x declaration)


      I thought about defining a global variable with a class document, but when attempting this it didn't work.

      Any suggestions?



      Thank you