Game Development Reference
In-Depth Information
Here is a complete listing for the Slider class:
package pulseui.util
{
import flash.display.Sprite;
import flash.events.EventDispatcher;
import flash.events.TimerEvent;
import flash.geom.Point;
import flash.utils.Timer;
/**
* A class that moves a sprite
* from its current poistion to
* the new specified position.
*/
public class Slider extends EventDispatcher
{
/**
* Determines how may pixels
* to move along X on every timer event.
*/
private var m_deltaX:Number;
/**
* Determines how may pixels
* to move along Y on every timer event.
*/
private var m_deltaY:Number;
/**
* The timer that is used to
* move the sprite.
*/
private var m_timer:Timer;
/**
* The sprite being moved by
* this instance.
*/
private var m_sprite:Sprite;
/**
* Final destination of the sprite
*/
private var m_to:Point;
/**
* A user object that will
* included in the SliderEvent instance
*/
 
Search WWH ::




Custom Search