Found this regarding with and MTASC http://www.flashdevelop.org/community/viewtopic.php?p=4283
Like I said, at least to me..with is pretty useless. You can't refer to other variables or objects with "with" inside the withstatement so a = b is not possible if a and b aren't already part of the "with" object, can't be another object. Code with with is confusing. Even common sentences are confusing with with :) Its better to write it out or copy/paste. If its a long namespace or objects within other objects just store it by reference to a short variable name and access it throught the variable. Kalani -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo de Moraes Serpa Sent: Wednesday, January 03, 2007 5:18 AM To: Flashcoders mailing list Subject: Re: [Flashcoders] getters and setters and the "with" statement Does MTASC support the with statement...? I'm not sure but I guess the last time I tried to compile an AS2 class with "with" statements, MTASC didn't like it at all... of course, it doesn't mean I like it less... MMC is awful :) On 1/3/07, Kalani Bright <[EMAIL PROTECTED]> wrote: > > > 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 > _______________________________________________ [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

