topical media & game development

talk show tell print

professional-flex-code-15-CustomEffectInstance.ax

professional-flex-code-15-CustomEffectInstance.ax [swf] flex


  package
  {
    import mx.effects.EffectInstance;
  
    public class @ax-professional-flex-code-15-CustomEffectInstance extends EffectInstance {
            // Custom Parameter
            public var scaleTo:Number;
  
      public function @ax-professional-flex-code-15-CustomEffectInstance(targetObj:Object) {
        super(targetObj);
      }
      // Override play() method.
      override public function play():void    {
        super.play();
        target.scaleX=scaleTo;
        target.scaleY=scaleTo;
      }
      override public function reverse():void{
        target.scaleX=1;
        target.scaleY=1;
      }
    }
  }
  
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.