Hi chris,
with is used so you don't have to constantly refer to a object hierarchy or
object when you are changing many properties or running many methods.
var myObject:CustomObjectType = new CustomObjectType();
//say that custom object has a property named duration and two methods start
and ping.
with(myObject)
{
duration = 5.5;
start();
ping("test.com");
}
its just so you dont have to do myObject.duration = 5.5 etc...
I've never used with. It's one of the most useless constructs.
Kalani
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Chris
Velevitch
Sent: Tuesday, January 02, 2007 11:21 PM
To: Flashcoders mailing list
Subject: [Flashcoders] getters and setters and the "with" statement
Is the "with" statement purpose to work with getters and setters (in AS2)?
If it is, has this issue been raised with Adobe?
Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
m: 0415 469 095
www.flashdev.org.au
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com