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

Target the scene

Explorer ,
Jul 27, 2020 Jul 27, 2020
 
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
205
Translate
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
LEGEND ,
Jul 27, 2020 Jul 27, 2020

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.

Translate
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
Explorer ,
Jul 27, 2020 Jul 27, 2020

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.

Translate
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
Explorer ,
Jul 27, 2020 Jul 27, 2020
Sorry for the previous question: exportRoot works for variables: this is the equivalent of _global.var.
Translate
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
LEGEND ,
Jul 27, 2020 Jul 27, 2020
LATEST

"Chronology"??

Translate
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