AS3 : with keyword

2 просмотра
Перейти к первому непрочитанному сообщению

Abdul

не прочитано,
7 сент. 2010 г., 01:20:1807.09.2010

AS3 : with keyword

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.


Satish Gupta

не прочитано,
8 сент. 2010 г., 01:06:4508.09.2010
– flex_...@googlegroups.com
Its good

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



--
Thanks & Regards,
SATISH GUPTA
RIA Developer
Adobe Certified Expert(Flex3.0-AIR)
Mob: 9769267997/9619591230
Tekno Point Multimedia | www.teknopoint.in

Iyer Anuradha

не прочитано,
8 сент. 2010 г., 07:49:4508.09.2010
– flex_...@googlegroups.com

Vow its new to know.  Thank you so much.  Keep it up.
 

 

Lokesh jadwani

не прочитано,
15 сент. 2010 г., 12:11:1015.09.2010
– flex_...@googlegroups.com
Gr8!
I was looking for this keyword
 
Lokesh

Banu

не прочитано,
16 сент. 2010 г., 02:55:1616.09.2010
– flex_...@googlegroups.com
thanks this is helpful.
Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений