Listen to Form Events
To listen to events sent from a form, you can register a listener through the form. For example, to listen to a closing event, register it with the following code:
Mywindow. addeventlistener (event. Closing, onclosingevent );
When an event is triggered, the target attribute referenced by the form sends the event.
Most form events have two types of messages. The first message is that the change of the form is approaching (which can be canceled), and the other message indicates that the change has occurred. For example, when you click the close button, the closing event message is triggered. If no listener cancels the event, the form is closed.
Events related to the Flash. Events. event class:
Activate
Deactivate
Closing
Close
Nativewindowboundsevent:
Use the beforebounds and afterbounds attributes to check whether the form boundary is about to change or has been changed.
Moving
Move
Resizing
Resize
Nativewindowdisplaystateevent:
Use the beforedisplaystate and afterdisplaystate attributes to check whether the form status is about to change or has been changed.
Display_state_changing
Display_state_change