Frame to Frame
You can approach navigating content in Animate CC by creating sequences of content on the main timeline and then navigating to these sequences by going to their respective frames or frame labels.
Frame to Frame - HTML5/JS
this.btnInstanceName.addEventListener("click", onClick.bind(this));
function onClick() {
this.gotoAndPlay(9);
}
this.btnInstanceName.addEventListener("click", onClickIt.bind(this));
function onClickIt() {
this.gotoAndPlay("myFrameLabel");
}
var _this = this;
_this.buttonInstanceName.addEventListener("click", onTheClick);
function onTheClick() {
_this.gotoAndStop(0);
}
Frame to Frame - AS3
section1_btn.addEventListener(MouseEvent.CLICK, onSection1);
function onSection1(e:MouseEvent) {
gotoAndStop(10);
}section2_btn.addEventListener(MouseEvent.CLICK, onSection2);
function onSection2(e:MouseEvent) {
gotoAndPlay("myFrameLabel");
}section3_btn.addEventListener(MouseEvent.CLICK, onSection3);
function onSection3(e:MouseEvent) {
nextFrame();
}
Frame to Frame - AS2
on (release) {
gotoAndStop(5);
}or
on (release) {
gotoAndPlay(20);
}or
on (release) {
nextFrame();
}or
on (release) {
gotoAndPlay("myFrameLabel");
}