/* Copyright (c) 2009 Yahoo! Inc. All rights reserved. The copyrights embodied in the content of this file are licensed under the BSD (revised) open source license */ package com.yahoo.astra.animation { import flash.events.Event; /** * The AnimationEvent class represents events that are broadcast by the com.yahoo.astra.animation.Animation class. * * @see com.yahoo.astra.animation.Animation * * @author Josh Tynjala */ public class AnimationEvent extends Event { //-------------------------------------- // Static Properties //-------------------------------------- /** * Indicates that the animation has started playing. *

The properties of the event object have the following values:

* * * * * * * *
PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that defines the * event listener that handles the event. For example, if you use * myButton.addEventListener() to register an event listener, * myButton is the value of the currentTarget property.
targetThe object that dispatched the event; * it is not always the object listening for the event. * Use the currentTarget property to always access the * object listening for the event.
parametersThe values of the properties controlled by the animation, * when the event occurred.
* * @eventType animationStart */ public static const START:String = "animationStart"; /** * Indicates that the animation has changed and the screen has been updated. *

The properties of the event object have the following values:

* * * * * * * *
PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that defines the * event listener that handles the event. For example, if you use * myButton.addEventListener() to register an event listener, * myButton is the value of the currentTarget property.
targetThe object that dispatched the event; * it is not always the object listening for the event. * Use the currentTarget property to always access the * object listening for the event.
parametersThe values of the properties controlled by the animation, * when the event occurred.
* * @eventType animationUpdate */ public static const UPDATE:String = "animationUpdate"; /** * Indicates that the animation has reached the end and finished. *

The properties of the event object have the following values:

* * * * * * * *
PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that defines the * event listener that handles the event. For example, if you use * myButton.addEventListener() to register an event listener, * myButton is the value of the currentTarget property.
targetThe object that dispatched the event; * it is not always the object listening for the event. * Use the currentTarget property to always access the * object listening for the event.
parametersThe values of the properties controlled by the animation, * when the event occurred.
* * @eventType animationComplete */ public static const COMPLETE:String = "animationComplete"; /** * Indicates that the animation has been paused. *

The properties of the event object have the following values:

* * * * * * * *
PropertyValue
bubblesfalse
cancelablefalse
currentTargetThe object that defines the * event listener that handles the event. For example, if you use * myButton.addEventListener() to register an event listener, * myButton is the value of the currentTarget property.
targetThe object that dispatched the event; * it is not always the object listening for the event. * Use the currentTarget property to always access the * object listening for the event.
parametersThe values of the properties controlled by the animation, * when the event occurred.
* * @eventType animationPause */ public static const PAUSE:String = "animationPause"; //-------------------------------------- // Constructor //-------------------------------------- /** * Constructor. * * @param type The event type; indicates the action that caused the event. * @param parameters The current values of the properties controlled by the animation. */ public function AnimationEvent(type:String, parameters:Object) { super(type, false, false); this.parameters = parameters; } //-------------------------------------- // Properties //-------------------------------------- /** * The values of the properties controlled by the animation, when the event occurred. */ public var parameters:Object; //-------------------------------------- // Public Methods //-------------------------------------- /** * @private */ override public function clone():Event { return new AnimationEvent(this.type, this.parameters); } } }