Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.23 / 5.00 3,881 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.93 / 5.00 4,634 ViewsAlright, look: After n00bishly looking around the Internet for guides on how to make a simple play button in AS3, I just barely managed to make one that plays the immediate frames after it with this code:
stop();
play_btn.addEventListener(MouseEvent.CLICK, playMovie);
function playMovie(e:MouseEvent) { play(); }
So, now. How do I make that same frame with the button have multiple buttons each playing separate scenes? Forgive me if this has been asked hundreds of times before, but I have 0 experience with coding and dozens of guides have not helped me with that one play button.
This is my signature. It is a nice signature.
I have Flash CS5 on the Mac, just btw fyi
This is my signature. It is a nice signature.
stop();
scn_1btn.addEventListener(MouseEvent.CLICK, playScn1);
function playScn1(e:MouseEvent) {
gotoAndPlay("Scene 2, 1");
} I figured out how to have two buttons in one scene with the stop command on a blank keyframe and yadda yadda.
With this down, do I need to know about scene switching if it'll come in handy for specific things?
This is my signature. It is a nice signature.
At 1/5/13 05:51 PM, jjjkuk wrote: I figured out how to have two buttons in one scene with the stop command on a blank keyframe and yadda yadda.
With this down, do I need to know about scene switching if it'll come in handy for specific things?
sorry wrote that backwards.
gotoAndPlay(1, "Scene 2");
where 1 is the first frame of scene 2. you have to make a new button called scene2Button or what have you and have the same function of a click listener.
then again if this is the only AS you have in the movie is the buttons then i'd switch to AS 2.0 and just use AS on the buttons themselves and it'll be much easier on you
on(release){
gotoAndPlay(1, "Scene 2");
}