AS3 : with 
keyword<http://abdulthought.blogspot.com/2010/08/as3-with-keyword.html>
 It can be used to write cleaner code when setting multiple properties of
the same object.


*Normal Code:*

var circle:Sprite = new Sprite();
circle.graphics.beginFill(0xFFCC00);
circle.graphics.drawCircle(100,100,50);
circle.graphics.endFill();
addChild(circle);


*Using with keyword Code:*

var circle:Sprite = new Sprite();
with (circle.graphics)
{
  beginFill(0xFFCC00);
  drawCircle(100, 100, 50);
  endFill();

}
addChild(circle);



-- 
*With Regards,
Abdul.*

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to