diff --git a/src/as/com/threerings/flash/AlphaFade.as b/src/as/com/threerings/flash/AlphaFade.as index befde748..1f08de6b 100644 --- a/src/as/com/threerings/flash/AlphaFade.as +++ b/src/as/com/threerings/flash/AlphaFade.as @@ -63,6 +63,5 @@ public class AlphaFade extends AnimationImpl protected var _to :Number; protected var _duration :Number; protected var _done :Function; - } } diff --git a/src/as/com/threerings/flash/AnimationImpl.as b/src/as/com/threerings/flash/AnimationImpl.as index 9d1934f6..19994daa 100644 --- a/src/as/com/threerings/flash/AnimationImpl.as +++ b/src/as/com/threerings/flash/AnimationImpl.as @@ -33,6 +33,11 @@ public class AnimationImpl implements Animation AnimationManager.stop(this); } + public function isPlaying () :Boolean + { + return AnimationManager.isPlaying(this); + } + public function updateAnimation (elapsed :Number) :void { // please implement! diff --git a/src/as/com/threerings/flash/AnimationManager.as b/src/as/com/threerings/flash/AnimationManager.as index 9dfbd31e..e8a80bfc 100644 --- a/src/as/com/threerings/flash/AnimationManager.as +++ b/src/as/com/threerings/flash/AnimationManager.as @@ -82,6 +82,14 @@ public class AnimationManager } } + /** + * Test to see if the specified animation has been started and not stopped. + */ + public static function isPlaying (anim :Animation) :Boolean + { + return _anims.indexOf(anim) >= 0; + } + /** * Track a DisplayObject that is also an Animation- it will * automatically be started when added to the stage and