Copy link to clipboard
Copied
In AnimateCC I've added a clip called myClip and in it I place this code:
var myVar= true;
In te main timeline I want to access that variable so there I use this:
console.log(this.myClip.myVar);
But this keeps showing 'undefined'.
How can I read a variable from within a movieclip then?
The source file can be downloaded at:
var only declares a private variable for use by the current frame of a movieclip. To store a variable for an entire clip, use this.
Copy link to clipboard
Copied
var only declares a private variable for use by the current frame of a movieclip. To store a variable for an entire clip, use this.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now