i did forget the :void and that solved it - thanks for looking On Thu, Jun 26, 2008 at 11:49 AM, ekameleon <[EMAIL PROTECTED]> wrote:
> hello :) > > In the playerglobal.swc you can find the DisplayObject.x declaration : > > public function set x(value:Number):void; > > You must keep the same argument name and the same return type in your > override : > > public override function set x(value:Number):void > { > super.x = value ; > // custom > } > > In your code you forget the :void ? > > EKA+ :) > > 2008/6/26 Jason Van Cleave <[EMAIL PROTECTED]>: > > > I have a class that extends Sprite. When the x value of the Class is > > changed > > I want to know so I can change another value. > > > > So I tried > > > > override public function set x(n:Number) > > { > > super.x=n; > > //added functionality would happen here > > } > > but I get "Incompatible override" > > > > So I could build a setX method but this wouldn't prevent Class.x from > being > > directly changed > > > > public function setX(n:Number) > > { > > x=n; > > //added functionality would happen here > > } > > > > Any suggestions? > > _______________________________________________ > > 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