1. Not [S1] is that all events have three stages: Capture, Target, Bubbling.
Events only have Capturing and Bubbling phases on DisplayObject.
2. Target is the object that distributes the event. CurrentTarget is the object that listens for the event and is processing it.
3. Capturing[S2] Process: StageàSystemManageràApplicationà…à Dispatch the parent object of the event.
4. Bubbling[S3] process: dispatch the parent object of the event à…à Application à SystemManager àStage.
5. Event listeners defined in mxml tags cannot be removed with removeEventListener(), and useCapture and priority properties cannot be set.
6. There will be no errors when removing unadded eventors with removeEventListener(). There is no need to use hasEventListener() to judge everything, but it needs to be judged when adding, otherwise it may be added multiple times.
7. The larger the Priority listener, the more it executes.
8. weakRef[S4] is useless for non-embedded functions.
9. An object can give multiple listeners to the same event:
If the order of addition is eventListener1, eventListener2 and eventListener3. eventListener1 does not adjust the stopPropagation() and stopImmediatePropagation() methods. Assuming eventListener2 calls stopPropatation() in [S5], eventListener3 will continue to execute. But if eventListener2 calls stopImmediatePropagation(), eventListener3 will not continue to execute.
10. removeEventListener() can only remove one listener at a time. If you add several listeners to the same event, you need to call removeEventListener() several times, and the parameters must be consistent with [S6].
11. The difference between hasEventListener() and willTrigger() is that hasEventListener() only checks the object it belongs to, while willTrigger[S7]() checks the entire event stream to find events specified by the type parameter.
12. keyCode[S8] corresponds to the key value of the key on the keyboard, which is a number; charCode corresponds to the value of the key in the current character set, which is also a number. Therefore, the following situation occurs: 1 and !'s keyCode are the same, but their charCodes are different.
[S1] Events have Capturing and Bubbling stages only 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 set to true, only the embedded functions may be processed by the garbage collector.
[S5] refers to stopPropagation() and stopImmediatePropagation()
[S6]use_capture
[S7] Includes checking all parent objects.
[S8] keyCode and keyChar are both properties of KeyBoardEvent.
Events only have Capturing and Bubbling phases on DisplayObject.
2. Target is the object that distributes the event. CurrentTarget is the object that listens for the event and is processing it.
3. Capturing[S2] Process: StageàSystemManageràApplicationà…à Dispatch the parent object of the event.
4. Bubbling[S3] process: dispatch the parent object of the event à…à Application à SystemManager àStage.
5. Event listeners defined in mxml tags cannot be removed with removeEventListener(), and useCapture and priority properties cannot be set.
6. There will be no errors when removing unadded eventors with removeEventListener(). There is no need to use hasEventListener() to judge everything, but it needs to be judged when adding, otherwise it may be added multiple times.
7. The larger the Priority listener, the more it executes.
8. weakRef[S4] is useless for non-embedded functions.
9. An object can give multiple listeners to the same event:
If the order of addition is eventListener1, eventListener2 and eventListener3. eventListener1 does not adjust the stopPropagation() and stopImmediatePropagation() methods. Assuming eventListener2 calls stopPropatation() in [S5], eventListener3 will continue to execute. But if eventListener2 calls stopImmediatePropagation(), eventListener3 will not continue to execute.
10. removeEventListener() can only remove one listener at a time. If you add several listeners to the same event, you need to call removeEventListener() several times, and the parameters must be consistent with [S6].
11. The difference between hasEventListener() and willTrigger() is that hasEventListener() only checks the object it belongs to, while willTrigger[S7]() checks the entire event stream to find events specified by the type parameter.
12. keyCode[S8] corresponds to the key value of the key on the keyboard, which is a number; charCode corresponds to the value of the key in the current character set, which is also a number. Therefore, the following situation occurs: 1 and !'s keyCode are the same, but their charCodes are different.
[S1] Events have Capturing and Bubbling stages only 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 set to true, only the embedded functions may be processed by the garbage collector.
[S5] refers to stopPropagation() and stopImmediatePropagation()
[S6]use_capture
[S7] Includes checking all parent objects.
[S8] keyCode and keyChar are both properties of KeyBoardEvent.