Game Development Reference
In-Depth Information
{
/**
* Dispatched when the slider is complete
*/
public static const DONE:String = "done";
private var m_userObject:Object;
public function SliderEvent(type:String,
bubbles:Boolean=false,
cancelable:Boolean=false,
userObject:Object=null)
{
super(type, bubbles, cancelable);
m_userObject = userObject;
}
public function getUserObject():Object {
return m_userObject;
}
}
}
The ShakeEffect class
Many times we want a particular sprite to grab players' attention. One way to do it
is to simply shake it. A handy class to do just that is available in the PulseUI package.
The shake effect can be applied to any sprite in the following manner:
new ShakeEffect(sprite).play();
The following is the complete listing for the ShakeEffect.as :
package pulseui.util
{
import flash.display.Sprite;
import flash.events.TimerEvent;
import flash.utils.Timer;
public class ShakeEffect
{
/**
* Sprite to shake.
*/
private var m_s:Sprite;
/**
 
Search WWH ::




Custom Search