ForumsProgramming ForumBrain Fart - Buttons

4 3820
Talo
offline
Talo
945 posts
Nomad

I use to make buttons all the time. For some reason I have forgotten how.

After making the button, you right click and go to actions... right?
Then what?

I just need a simple, on click, gotoandplay(5);

  • 4 Replies
PixelSmash
offline
PixelSmash
566 posts
Nomad

On as2? I'd say you pretty much have it there already...

on(click){
theTargetThatNeedsToPlay.gotoAndPlay(5);
}

Fighterlegend
offline
Fighterlegend
44 posts
Nomad

AS3 is faster.

Here:

import flash.events.MouseEvent;//imports mouse events
BUTTON.addEventListener(MouseEvent.CLICK, clicked);//finds the function
function clicked(event:MouseEvent) {//creates event
gotoAndStop(5);//go's to a frame and stops
}

Buttersnack
offline
Buttersnack
332 posts
Peasant

Damn you guys overcomplicate.

on (press) {
gotoAndPlay (5)
}

Fighterlegend
offline
Fighterlegend
44 posts
Nomad

Butter, mine's AS3.. >.>

Showing 1-4 of 4