//-------- 일반 방법;
   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;
   //------------------------------------



'ActionScript3.0 > 기초' 카테고리의 다른 글

continue, break, return  (0) 2013.05.29
TextInput 에 마스크 먹이기~  (0) 2010.06.22
텍스트 필드에 포커스 이동하기.  (0) 2010.04.15
TimerEvent()  (0) 2010.03.19
Math.random(), TweenMax.DropShadowFilter  (0) 2010.02.09

+ Recent posts