Zeronine 2010. 8. 10. 19:07



   //-------- 일반 방법;
   var test2:Sprite = new Sprite();
   test2.graphics.beginFill(0x00ffff, 1);
   test2.graphics.drawRect(0, 0, 50, 50);
   test2.graphics.endFill();
   
   this.addChild(test2);
   
   test2.x = 200;
   test2.y = 100;
   //------------------------------------
   
   
   
   //--------- with 문;
   var test1:Sprite = new Sprite();
   with (this.addChild(test1)) {
    graphics.beginFill(0x000000, 1), graphics.drawRect(0, 0, 50, 50), graphics.endFill();
   
    x = y = 100;
   //------------------------------------