flash - looking for button commands for actionscript 3.0 -


im new @ actionscript 3.0 , doing flash presentation. completed except buttons, have no idea how use actionscript 3.0. have lot of buttons need commands make button (when clicked on) go scene , replay scene on.

thanks

if have button on stage, let's called button0, then:

button0.addeventlistener("click", button0clicked);  function button0clicked(evt:*):void {      //do whatever want here } 

there other events, change click mousedown, mouseup, doubleclick, mouseover, mouseout. think these types speak themselves.

if use doubleclick, have set doubleclickenabled true:

button0.doubleclickenabled = true; 

also useful know:

button0.buttonmode = true; button0.usehandcursor = true; 

if button0 not button instance, movieclip instance , want mouse turn "hand" when mouse on button.

i hope helps closer goal.


Comments