topical media & game development

talk show tell print

actionscript-video-09-masks-pro-AnimMask.ax

actionscript-video-09-masks-pro-AnimMask.ax [swf] flex


  package FlashVideoPro
  {
          import flash.display.MovieClip;
          import flash.display.Sprite;
          import flash.events.Event;
          
          public class @ax-actionscript-video-09-masks-pro-AnimMask extends MovieClip {
                  function @ax-actionscript-video-09-masks-pro-AnimMask(posX:Number, posY:Number, radius:Number) {
                          this.x = posX;
                          this.y = posY;
                          this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
                  }
                  public function onEnterFrame(event:Event):void {
                          if(event.target.width <= 250){
                                  event.target.scaleX += .33;
                                  event.target.scaleY += .33;
                          } else {
                                  event.target.width = 16;
                                  event.target.height = 16;
                          }
                  }
          }
  }


(C) Æliens 27/08/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.