No, there is no way to do this by extending the MovieClip class. Unfortunately the _x and _y are unique beasts, along with all the other MovieClip properties from the Flash 4 days (such as enabled). You can't watch them, create getters/setters for them, or even over-ride them. You have to have a getter/setter x and y and inside those set the _x and _y.
If you're feeling creative and absolutely have to have _x and _y as the properties to watch, then you're class can't be attached to the actual sprite. You'd have to have a real sprite-based MovieClip referenced inside the class that you manipulate. I know that probably doesn't make sense, and it's a programming project you don't want to undertake, with a lot of potential for problems and failure (I know). You'll have to use the x and y, which always looks better anyway. Tyler On 2/8/06, Scott Hyndman <[EMAIL PROTECTED]> wrote: > > You could try watching _y and _height with Object.watch(), and adding the > extra code in the observing functions. > > Scott > > -----Original Message----- > From: [EMAIL PROTECTED] on behalf of Morten > Barklund TBWA\Play > Sent: Wed 2/8/2006 11:46 AM > To: Flashcoders mailing list > Cc: > Subject: Re: [Flashcoders] Can you extend the _y and _height > setters of amovie clip? > > David Lochhead wrote: > > Hi, > > > > I've got a movieclip that can have it's _y and _height properties > > altered by various scripts. Is there a way I can extend the movieclip > > class so that the setter for these properties can be extended so I can > > act when the clip gets updated? > > > > Any advice appreciated. > > I've tried "extending" the enabled-property without luck. super.enabled > = my_enabled doesn't really work. It would expect the same from _x and _y. > > I do hope someone can give other advice, but until then, I believe it is > undoable. :( > > -- > Morten Barklund - Information Architect - TBWA\Play > Gothersgade 49, 4th floor - DK-1123 Copenhagen K, Denmark > Phone: +45 7027 2227 - Fax: +45 3369 1174 > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > > > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > > _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders