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

Movie Clip Timeline to Main Timeline (Canvas)

Community Beginner ,
Aug 24, 2018 Aug 24, 2018

Hello,

I have a button in a movie clip Timeline.

When I click on this button contained in a symbol, I would like to go to a specific place in the main timeline.

For the moment, I can not find the code that allows me to navigate easily with the main timeline when I'm in a symbol

Here are the codes I tried

this.BtClose1.addEventListener("click", fl_ClickToGoToAndStopAtFrame_7.bind(this));

function fl_ClickToGoToAndStopAtFrame_7()

{

_parent.gotoAndPlay(60);

}

-------------------------------------------------------

this.BtClose1.addEventListener("click", fl_ClickToGoToAndStopAtFrame_7.bind(this));

function fl_ClickToGoToAndStopAtFrame_7()

{

_root.gotoAndPlay(60);

}

---------------------------------------------------------

I hope someone could help me.

thank you in advance

583
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

correct answers 1 Correct answer

Community Expert , Aug 24, 2018 Aug 24, 2018

Hi.

Animate automatically declares a global variable called exportRoot that holds a reference to the main timeline. So you just have to replace _parent and _root with exportRoot.

And remember that in HTML5 Canvas documents frames start from 0.

Regards,

JC

Translate
Community Expert ,
Aug 24, 2018 Aug 24, 2018

Hi.

Animate automatically declares a global variable called exportRoot that holds a reference to the main timeline. So you just have to replace _parent and _root with exportRoot.

And remember that in HTML5 Canvas documents frames start from 0.

Regards,

JC

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
Community Beginner ,
Aug 24, 2018 Aug 24, 2018

Thanks mister, it's perfect

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
Community Expert ,
Aug 26, 2018 Aug 26, 2018
LATEST

You're welcome!

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