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

Simple Animate Timeline Navigation - HELP!

Participant ,
Sep 04, 2018 Sep 04, 2018

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

246
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 , Sep 05, 2018 Sep 05, 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 notat

...
Translate
Community Expert ,
Sep 05, 2018 Sep 05, 2018
LATEST

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

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