extends MovieClip : MovieClip : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » MovieClip »

 

extends MovieClip


 

package {

  import flash.display.MovieClip;
  import flash.events.Event;

  public class Motion extends MovieClip {
    
     public function Motion() {
       this.addEventListener(Event.ENTER_FRAME, update);
    }
     
    private function updatePosition():void {
      this. x++;
      this. y++;
    }
    
     private function update(evtObj:Event):void {
      this.updatePosition();
    }
     
  }

}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Development
» MovieClip