Moving Objects Forward and Backward : Sprite : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Sprite »

 

Moving Objects Forward and Backward


 

package {
  import flash.display.*;
  public class SetChildIndexExample extends Sprite {
    public function SetChildIndexExample(  ) {
      var red:Shape = createCircle0xFF000010 );
      red.x = 10;
      red.y = 20;
      var green:Shape = createCircle0x00FF0010 );
      green.x = 15;
      green.y = 25;
      var blue:Shape = createCircle0x0000FF10 );
      blue.x = 20;
      blue.y = 20;
      
      addChildred );
      addChildgreen );
      addChildblue );
      
      setChildIndexblue, );
    }
    
    public function createCirclecolor:uint, radius:Number ):Shape {
      var shape:Shape = new Shape(  );
      shape.graphics.beginFillcolor );
      shape.graphics.drawCircle00, radius );
      shape.graphics.endFill(  );
      return shape;
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Development
» Sprite