PDA

View Full Version : Extremely Advanced AS "?" about MC Classes



Sirisian
June 17th, 2005, 10:30 PM
How would I create a class that would inherit only some abilities of a MC so that all it can do is hold a shape drawing and have an x,y, width, and height. Is this possible. My goal was to not use MC to hopefully raise frame rate and have a better running speed, seeing as a MC instance has a lot of "unneeded" member functions and veriables.
**Another question is it even possible to inherit the "draw" function that a MC has in order redraw on a shape on every frame.
I hope someone can help me on this, because if this isn't possible I'm gonna have to go back to C++.

senocular
June 18th, 2005, 07:34 AM
Inheriting doesn't affect speed. Inherited methods (and default properties) are all shared from the same source. Despite the number of instances using them, they are all from the same definition.

If you have any kind of class that needs to be seen, it needs to inherit from MovieClip and as such it will inherently aquire all methods and properties of MovieClip. There's really not much you can do about that.

If you're concerned about speed, go back to C++.