Copy link to clipboard
Copied
So, I'm currently working on a project for school, and I ran into this annoying problem that I can't seem to get my buttons work.
This is the code that I have in the movieclip:
import flash.events.MouseEvent;
btnPattaya.addEventListener(MouseEvent.CLICK, resort1);
function resort1(e:MouseEvent){
MovieClip(parent.parent).gotoAndPlay("label1");
}
btnKhaoyai.addEventListener(MouseEvent.CLICK, resort2);
function resort2(e:MouseEvent){
MovieClip(parent.parent).gotoAndPlay("label2");
}
On my main timeline I have placed 3 labels to play an animation.
btnMiaMuiNe.addEventListener(MouseEvent.CLICK, resort3);
function resort3(e:MouseEvent){
MovieClip(parent.parent).gotoAndPlay("label3");
}
The code on the main timeline to make a scrollpane is this:
scrollPane.source = myContent; !-- The myContent is the class name of my Movieclip.
scrollPane.setSize(1220, 683);
I'm relative new to actionscript and I hope you guys could help me.
Copy link to clipboard
Copied
Can you share your file? I'll give it a look.
Copy link to clipboard
Copied
Duplicated thread:
Find more inspiration, events, and resources on the new Adobe Community
Explore Now