1. No [S1] indicates that all events have three phases: capture, target, and bubbling.
Events only have the capturing and bubbling phases on displayobject.
2. Target is the object for dispatching the event. Currenttarget is the object that listens to the event and is processing the event.
3. Capturing [s2] process: stage? systemmanager? application... À parent object for dispatching the event.
4. bubbling [S3] process: the parent object of the event is dispatched... À application à systemmanager à stage.
5. The event listener defined in the mxml tag cannot be removed using removeeventlistener (), and The usecapture and priority attributes cannot be set.
6. When removeeventlistener () is used to remove the unadded event, no error is reported. You do not need to use haseventlistener () to determine all events, but you need to determine when adding the event. Otherwise, the event may be added multiple times.
7. The larger the priority is, the more listeners are executed first.
8. weakref [S4] is useless for non-embedded functions.
9. An object can send multiple listeners to the same event:
In the order of adding eventlistener1, eventlistener2, and eventlistener3. Eventlistener1 does not call the stoppropagation () and stopimmediatepropagation () methods. If eventlistener2 calls the stoppropatation () of [S5], eventlistener3 continues to run. However, if eventlistener2 calls stopimmediatepropagation (), eventlistener3 will not proceed.
10. removeeventlistener () can only remove one listener at a time. When several listeners are added to the same event, removeeventlistener () needs to be called several times, and the parameters must be consistent with [S6].
11. the difference between haseventlistener () and willtrigger () Is that haseventlistener () only checks the object to which it belongs, while willtrigger [S7] () check the entire event stream to find the event specified by the type parameter.
12. The keycode [S8] corresponds to the key value of the key on the keyboard, which is a number; the charcode corresponds to the value of the key in the current character set, which is also a number. Therefore, the following situations occur: 1 and! The keycode is the same, but their charcode is different.
[S1] events only have the capturing and bubbling phases on displayobject.
[S2] parent object from root node to leaf node
[S3] from the parent object of the leaf node to the root node
[S4] if it is set to true, only embedded functions may be processed by the garbage collector.
[S5] indicates stoppropagation () and stopimmediatepropagation ()
[S6] use_capture
[S7] includes checking all parent objects.
[S8] Both keycode and keychar are attributes of keyboardevent.