Copy link to clipboard
Copied
Hi,
the problem I encountered exceeds my understanding of Animate CC and its framework and for this reason I would like to reach out to the community's knowledge base.
I have a variable called '_this.inloop' in the mainframe which is set to 1 and controls a loop there. It is defined right at the beginning. A symbol reads thise value and changes it to 0 as soon as its timeline reaches a certain point releasing the loop in the mainframe. This is done by the command:
_this.parent.inloop = 0;
Everthing works like a charm! But as soon as I want to use the camera creating a camera layer, the symbol cannot read the variable in the mainframe anymore telling that it is 'undefined'.
As I do not understand what the problem is that the camera creates, I have no idea how to fix this. Has anyone encoutered this problem, maybe even found a solution? I would be grateful for any clue.
Thanks!
Okay, the solution was rather simple. After taking a closer look at the whole thing and looking for the variable 'inloop', I could finally find it in the parent-node of the parent-node, for whatever reason. With this information, it was possible to call the variable in the mainframe with the command:
_this.parent.parent.inloop = 0;
Copy link to clipboard
Copied
Hi mate,
See if the info here is somehow relevant: https://helpx.adobe.com/animate/using/timeline-layers.html?mv=product&mv2=an#advanced-layers
Copy link to clipboard
Copied
Thanks for your help!
Copy link to clipboard
Copied
Okay, the solution was rather simple. After taking a closer look at the whole thing and looking for the variable 'inloop', I could finally find it in the parent-node of the parent-node, for whatever reason. With this information, it was possible to call the variable in the mainframe with the command:
_this.parent.parent.inloop = 0;
Copy link to clipboard
Copied
Hi.
Glad to hear that you found out the solution!
Just wanna to add that whenever you need to access the main timeline, just use the automatically created global variable exportRoot.
So no matter how deep you are in the display list you can access the main timeline by writing something like:
exportRoot.gotoAndPlay(2);
Regards,
JC