You can do it with enabled, but you can't with _xscale or _yscale. You have to use a watcher to catch it and return oldVal.
BLITZ | Steven Sacks - 310-551-0200 x209 > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of eka > Sent: Thursday, January 18, 2007 3:50 PM > To: Flashcoders mailing list > Subject: Re: [Flashcoders] Override _xscale and _yscale setter in AS2 > > Hello :) > > Yes you can :) Try this code (not tested) > > > class Test1 extends MovieClip > { > > /** > * Constructor > */ > function Test1() > { > > } > > public function get _xscale ():Number > { > return _xscale_ ; > } > > public function set _yscale( value:Number ):Void > { > __xscale__ = value ; > // your code :) > } > > private var _xscale_ = MovieClip.prototype._xscale ; > > } > > I use this technik in LUnAS the extension of VEGAS my > framework OpenSource with the "enabled" property... it's > possible it's work with the _xscale property. > > NB 1 : Vegas project : http://vegas.riaforge.org/ NB 2 : the > AbstractComponent class in LunAS with this hack over the > enabled property : > http://svn.riaforge.org/vegas/AS2/trunk/src/lunas/display/comp > onents/AbstractComponent.as > > > > EKA+ :) > > > > > 2007/1/19, Patrick Matte | BLITZ <[EMAIL PROTECTED]>: > > > > In AS2, is it possible to override the _xscale and _yscale > setter in a > > subclass of MovieClip ? > > _______________________________________________ > > Flashcoders@chattyfig.figleaf.com > > 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 > > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > 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 > _______________________________________________ Flashcoders@chattyfig.figleaf.com 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