2
내 클래스 X가 3 가지 유형의 (사용자 정의) 이벤트를 디스 패칭 할 수 있습니다. 클래스 파일 내에서이 동작을 어디서 어떻게 문서화해야합니까?커스텀 이벤트 디스패치 (actionscript 3)
내 클래스 X가 3 가지 유형의 (사용자 정의) 이벤트를 디스 패칭 할 수 있습니다. 클래스 파일 내에서이 동작을 어디서 어떻게 문서화해야합니까?커스텀 이벤트 디스패치 (actionscript 3)
클래스 위에 [Event]
메타 태그를 추가하십시오. 찌르레기 프레임 워크에서
예 :
package starling.core
{
/** Dispatched when a new render context is created. */
[Event(name="context3DCreate", type="starling.events.Event")]
/** Dispatched when the root class has been created. */
[Event(name="rootCreated", type="starling.events.Event")]
/** The Starling class represents the core of the Starling framework.
*
* <p>The Starling framework makes it possible to create 2D applications and games that make
* use of the Stage3D architecture introduced in Flash Player 11. It implements a display tree
* system that is very similar to that of conventional Flash, while leveraging modern GPUs
* to speed up rendering.</p>
*
* <p>The Starling class represents the link between the conventional Flash display tree and
* the Starling display tree. To create a Starling-powered application, you have to create
* an instance of the Starling class:</p>
*
* <pre>var starling:Starling = new Starling(Game, stage);</pre>
*
*/
public class Starling extends EventDispatcher
{
/** The version of the Starling framework. */
public static const VERSION:String = "1.2";