I have an HTML5 canvas document that has 5 separate click to open motion tweens. Within each tween, I have a "close button" that I want to go back to the beginning of the main timeline. Right now, it just goes to the beginning of the motion tween timeline in an endless loop. How can I get it to go back out to the main timeline from each of the tweens? (For reference, I'm a beginner with Animate and JS code and have not been able to find this answer in my many searches on the web).
you want code on the main timeline to direct the main timeline back to its first frame and stop, or you want code on a movieclip's timeline to direct the main timeline to its first frame and stop, or something else?
if you want code on a movieclip's timeline to direct the main timeline, use:
this.parent.gotoAndStop(0); // assuming the movieclip's parent is the main timeline.
YES! Exactly! It worked - thank you so much!