Highlighted

Target the scene

Explorer ,
Jul 27, 2020

Copy link to clipboard

Copied

 
Hello,
Used to AS2, I'm getting started with HTML5 JavaScript from Animate.
In AS2, it was possible, in a movieClip, to target a scene element using _root.
For example in a movieClip, we could target an object on the stage: _root.objetScene._visible = false; What is the method on Animate? Thank you for your reply.
TOPICS
Code

Views

60

Likes

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

Target the scene

Explorer ,
Jul 27, 2020

Copy link to clipboard

Copied

 
Hello,
Used to AS2, I'm getting started with HTML5 JavaScript from Animate.
In AS2, it was possible, in a movieClip, to target a scene element using _root.
For example in a movieClip, we could target an object on the stage: _root.objetScene._visible = false; What is the method on Animate? Thank you for your reply.
TOPICS
Code

Views

61

Likes

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
Jul 27, 2020 0
Adobe Community Professional ,
Jul 27, 2020

Copy link to clipboard

Copied

HTML5 Canvas documents don't have scenes. If you mean you want to target the root timeline, that's referenced by the global variable exportRoot.

Likes

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
Reply
Loading...
Jul 27, 2020 0
Explorer ,
Jul 27, 2020

Copy link to clipboard

Copied

That's exactly what I was looking for. Thank you. I have one last question: with AS2, we could retrieve, in the root chronology, a variable called var created in a clip by calling it _global.var. Is there the same thing in HTML5? Is there a way to create global variables? If it's exportRoot, how do I use it?
Thank you.

Likes

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
Reply
Loading...
Jul 27, 2020 0
Explorer ,
Jul 27, 2020

Copy link to clipboard

Copied

Sorry for the previous question: exportRoot works for variables: this is the equivalent of _global.var.

Likes

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
Reply
Loading...
Jul 27, 2020 0
ClayUUID LATEST
Adobe Community Professional ,
Jul 27, 2020

Copy link to clipboard

Copied

"Chronology"??

Likes

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
Reply
Loading...
Jul 27, 2020 0