Return to Snippet

Revision: 14767
at June 11, 2009 05:45 by stiobhart


Initial Code
// begin button actions [rollover, rollout and release]

// rollover action
on(rollOver)
{

// replace the trace with your required button actions
trace("button rolled over");

}
// end rollover action

// rollout action
on(rollOut)
{

trace("button rolled off");

}
// end rollout action

// release action
on(release)
{

trace("button pressed");

}
// end release action

// end button actions [rollover, rollout and release]

Initial URL

                                

Initial Description
basic actionscript button action that can be attached directly to a button on the stage.  this will NOT work in actionscript 3, which does not allow actionscript to be attached directly onto buttons.

make sure you're attaching this action to a button and not to a keyframe on the timeline.  the actions window should say "actions - button" when you open it.  if it says "actions - frame" you're trying to attach this action to the timeline and flash will blow a fuse!

Initial Title
actionscript - button action [to attach directly to button]

Initial Tags
actionscript, flash, button

Initial Language
ActionScript