• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Parent Variable Undefined with Camera Layer

Community Beginner ,
Apr 12, 2020 Apr 12, 2020

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!

TOPICS
Code , Error , Timeline

Views

609

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Apr 17, 2020 Apr 17, 2020

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;

Votes

Translate

Translate
Guru ,
Apr 13, 2020 Apr 13, 2020

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

 

Nick - Character Designer and Animator, Flash user since 1998
Member of the Flanimate Power Tools team - extensions for character animation

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 17, 2020 Apr 17, 2020

Copy link to clipboard

Copied

Thanks for your help!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 17, 2020 Apr 17, 2020

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;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 17, 2020 Apr 17, 2020

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines