/ Published in: ActionScript

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!
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!
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// 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]
Comments
