Flex Event Summary _flex

Source: Internet
Author: User

1. No [S1] is all events have three stages: capture,target,bubbling.
Events only have capturing and bubbling stages in displayobject.

2. Target is the object that distributes the event. Currenttarget is the object that listens for the event and is handling the event.

3. CAPTURING[S2] Process: Stageàsystemmanageràapplicationà...à distributes the parent object of the event.

4. BUBBLING[S3] Process: Distributes the parent object À...àapplicationàsystemmanageràstage the event.

5. Event listeners defined in the Mxml tab cannot be removed with RemoveEventListener (), and the Usecapture and priority properties cannot be set.

6. Use RemoveEventListener () to remove the not added event is not an error, all do not need to use Haseventlistener () to determine, but to add when you need to judge, or may be added many times.

7. The larger the priority listener, the more it executes first.

8. WEAKREF[S4] is useless for non-inline functions.

9. An object can give multiple listeners to the same event:

If by adding order is eventlistener1,eventlistener2 and EventListener3. EventListener1 does not have the stoppropagation () and Stopimmediatepropagation () method. Assuming that the eventListener2 is tuned to the stoppropatation () of the [S5], EventListener3 will continue to execute. However, if the EventListener2 is Stopimmediatepropagation (), then EventListener3 does not continue.

10. RemoveEventListener () can only remove one listener at a time, adding several listeners to the same event requires several RemoveEventListener () and parameters to match [S6].

11. The difference between Haseventlistener () and Willtrigger () is that Haseventlistener () checks only the object it belongs to, and Willtrigger[s7] () examines the entire event stream to find the event specified by the type parameter.

12. KEYCODE[S8] corresponds to the key value on the keyboard, which is a number, and charcode corresponds to the value of the key in the current character set, as well as a number. So there's the following: 1 and KeyCode are the same, but their charcode is not the same.


The [S1] event has capturing and bubbling stages only in displayobject.

[S2] The parent object from the root node to the leaf node

[S3] From the parent object of the leaf node to the root node

[S4] If set to true, only the inline function may be handled by the garbage collector.

[S5] refers to Stoppropagation () and Stopimmediatepropagation ()

[S6]use_capture

[S7] includes checking all parent objects.

[S8]keycode and Keychar are all attributes of the keyboardevent.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.