PDA

View Full Version : Overriding x and y in Sprite-extending class?


Fall_X
07-16-2006, 12:14 AM
Hi there,

I have a class that's extending the Sprite class. I was trying to create getter/setter functions for x and y, that would return/modify super.x and super.y, and do some other things - but apparantly x and y are final properties, so I can't override them.

There doesn't seem to be an event for this either, so I'm a bit stuck. Off course I could create some other properties (myX and myY for instance), but that's not very clean. Any other options?

Thanks!

Fall_X
07-16-2006, 12:28 AM
Nevermind, still not completely used to AS3, so I didn't know I had to use the override keyword. I thought a property would override by default if it had the same name. Pretty stupid :)