You might want to post some code.
At least from the start of the class with the imports to the constructor
and the method.
The code that calls the shows the error would help.
Ron
Newsdee wrote:
Hi all,
A quick OOP question... is there a limit in AS2.0 on how many levels of
inheritance can be done?
My latest class is not recognizing any of the methods from it
superclass',
even though the compiler doesn't raise any errors.
Here is the inheritance tree (I'm making a game, as you can guess):
- MovieClip (Flash built-in class)
- Sprite extends MovieClip
- Player extends Sprite
- Enemy extends Player
Sprite has a method called "render", Player has a method called "fire".
So I would expect that both render() and fire() are accessible to Enemy
without having to redeclare them (actually, render() works in Player
without
defining it).
But nothing works in Enemy. I've tried redefining "render" and calling
other
functions from it (in case the Enemy instance wasn't called).
And debugging I've found out that I do get to Enemy and my new render()
method, but any calls to other methods are just ignored [even using
super.method()].
Stranger still, every compiles without problems. So it seems like a
problem
at runtime.
Has anybody seen this before, and hopefully has a way to work around it?
Thanks,
Gerard.
_______________________________________________
[email protected]
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
_______________________________________________
[email protected]
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