Quantcast
Channel: Adobe Community : All Content - Adobe Animate CC - General
Viewing all articles
Browse latest Browse all 13519

Declaring a Global Variable (object?)

$
0
0

Hi,

 

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


Viewing all articles
Browse latest Browse all 13519

Trending Articles