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
General Feedback, How to

Views

59

Likes

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
Adobe Community Professional ,
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.

 

Likes

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