addChild( ) method doesn't guarantee that a display object is added to the display list. : Sprite : Development Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Development » Sprite »

 

addChild( ) method doesn't guarantee that a display object is added to the display list.


 

package {
  import flash.display.*;
  public class CircleExample extends Sprite {
    public function CircleExample(  ) {
      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 );
      addChildblue );
      
      addChildAtgreen, );
    }
    
    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