Change child index : Sprite : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Sprite »

 

Change child index


 

package {
  import flash.display.*;
  public class Main extends Sprite {
    public function Main(  ) {
      var green:Shape = createCircle0x00FF0010 );
      green.x = 25;
      green.y = 25;
      var blue:Shape = createCircle0x0000FF20 );
      blue.x = 25;
      blue.y = 25;
      
      addChildgreen );
      addChildblue );
      
      setChildIndexblue, getChildIndexgreen ) );
    }
    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