Skip to main content
eugener2418576
Inspiring
September 5, 2018
Answered

Simple Animate Timeline Navigation - HELP!

  • September 5, 2018
  • 1 reply
  • 269 views

So I can't for the life of me find anything on this subject. - I'm 80% sure it's really straight forward.

Essentially I have 2 movie clips. One movie clip is named 'sidebar' the other is named 'maincontent'.

Inside 'sidebar' there's a button, and inside 'maincontent' there is some text that fades in after 24 frames.

So essentially, all i'm trying to do is click the button in the 'sidebar', which will play 'maincontent'.

I can't figure out how to exit 'sidebar' timeline and then tell it to target 'maincontent' timeline. Or maybe i'm setting up the project wrong.

All help greatly appreciated.

Cheers

This topic has been closed for replies.
Correct answer JoãoCésar17023019

Hi.

Try one of these:

AS3 documents:

import flash.events.MouseEvent;

function playMainContent(e:MouseEvent):void

{

    MovieClip(root).maincontent.play();

}

sidebar.button.addEventListener(MouseEvent.CLICK, playMainContent);

HTML5 Canvas documents:

this.playMainContent = function(e)

{

    exportRoot.maincontent.play();

};

this.sidebar.button.on("click", this.playMainContent);

Essentially what you have to do is to target the main timeline (MovieClip(root) for AS3 and exportRoot for HTML5) and then use dot notation to access the object you want.

I hope this helps.

Regards,

JC

1 reply

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
September 5, 2018

Hi.

Try one of these:

AS3 documents:

import flash.events.MouseEvent;

function playMainContent(e:MouseEvent):void

{

    MovieClip(root).maincontent.play();

}

sidebar.button.addEventListener(MouseEvent.CLICK, playMainContent);

HTML5 Canvas documents:

this.playMainContent = function(e)

{

    exportRoot.maincontent.play();

};

this.sidebar.button.on("click", this.playMainContent);

Essentially what you have to do is to target the main timeline (MovieClip(root) for AS3 and exportRoot for HTML5) and then use dot notation to access the object you want.

I hope this helps.

Regards,

JC