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

How to use navigation in Adobe Animate?

New Here ,
Dec 11, 2020 Dec 11, 2020

Copy link to clipboard

Copied

Hello everyone, having a bit of trouble on trying to have my buttons (next, back, and replay) work correctly. I have 11 frames aniamted, first frame works correctly and the next button takes it to the next frame. However, the next frame does not play my animation and that's where I am stuck right now. 

On my first frame I have this:

import flash.events.MouseEvent;

stop ();


var userName;

next_btn.addEventListener(MouseEvent.CLICK, getName);

function getName(event:MouseEvent):void
{
trace("button works");
nextFrame();
}

 Which works for me so far. Does anyone have any tips on how I can have my other frames animate and then have my buttons (next and back) work for my next 10 frames? 

 

TOPICS
How to

Views

436

Translate

Translate

Report

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 ,
Dec 12, 2020 Dec 12, 2020

Copy link to clipboard

Copied

LATEST

nextFrame() and prevFrame() are gotoAndStop() shortcuts.  if you want to play a frame animation (where the frames are on the same timeline as the code. you'll need to use gotoAndPlay().  eg,

 

gotoAndPlay(this.currentFrame+1);

 

and it's more complicated for playing a previous animation.

 

it's simpler to put your animations in movieclips, put those moviclips on the main timeline and then use nextFrame() and prevFrame() on the main timeline.

 

Votes

Translate

Translate

Report

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