Copy link to clipboard
Copied
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
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Thanks mister, it's perfect
Copy link to clipboard
Copied
You're welcome!
Find more inspiration, events, and resources on the new Adobe Community
Explore Now