• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 4. Advanced Buttons and Event De... > A Summary of Events and Event Handle...

A Summary of Events and Event Handlers

Table 4.6 organizes and compares the many ways you can create event handlers to detect and respond to events.

Table 4.6. A Summary of Events and Event Handlers
OBJECTEVENT HANDLER ASSIGNED ON INSTANCEEVENT HANDLER ASSIGNED ON MAIN TIMELINEANONYMOUS FUNCTION ASSIGNED TOLISTENER
Buttonon(press)onPressbutton instanceNo
 on(release)onRelease  
 on(releaseOutside)onReleaseOutside  
 on(rollOver)onRollover  
 on(rollOut)onRollOut  
 on(dragOver)onDragOver  
 on(dragOut)onDragOut  
 on(keyPress "whatkey")-  
 -onSetFocus  
 -onKillFocus  
MouseNoonMouseUpListener or _rootYes[*]
  onMouseDown Yes[*]
  onMouseMove Yes[*]
  onMouseWheelListenerYes
KeyNoonKeyUpListenerYes
  onKeyDown Yes
Movie Clip (may also receive Button events)onClipEvent(load)onLoadMC/_rootNo
 onClipEvent(unload)onUnloadMC/_rootNo
 onClipEvent(data)onDataMC/_rootNo
 onClipEvent(enterFrame)onEnterFrameMC/_rootNo
 onClipEvent(mouseDown)onMouseDownMC/_root/LYes[*]
 onClipEvent(mouseUp)onMouseUpMC/_root/LYes[*]
 onClipEvent(mouseMove)onMouseMoveMC/_root/LYes[*]
 onClipEvent(keyUp)onKeyUpListenerYes
 onClipEvent(keyDown)onKeyDownListenerYes
MC = movie-clip instance
_root = main Timeline
L = Listener


[*] not required

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint