About

<#TEMPLATE_INCLUDE_NINEPAGE_ABOUTME#>
  • Sep

    8

    A text field's default text format is not static—it dynamically adjusts itself to match the formatting of text at the insertion point (also known as the caret position). Accordingly, when the user inputs new text after a given character in a text field, that character's format determines the format of the new text. Likewise, when replaceText() is used to add new text to a text field, the new text takes on the formatting of the either the character following the new text (if any existing text was deleted), or the character preceding the new text (if no existing text was deleted).


    现有文本域中的文字是否有被删除以及插入符的位置决定规则:如果一部份文本被删除,以插入符之后第一个字符文本格式来格式化新文本;如果没有删除任何现有文本,以插入符之前的最后一个字符来格式化文本。对文本域对象使用了defaultTextFormat变量设置后,再使用自定义的TextFormat,也同样遵守这样的规则。

    More...

    Sep

    2

    The general process for responding to an event in ActionScript 3.0 is as follows:

    1. Determine the name of the event's event-type.
    2. Determine the datatype of the event object representing the event.
    3. Create an event listener to respond to the event. The event listener must define a single parameter matching the datatype of the event object from Step 2.
    4. Use EventDispatcher class's instance method addEventListener() to register the event listener with the event target (or, any display ancestor of the event target).
    5. Sit back and wait for the event to occur.