You haven't posted the ShootBall class.
super() is what lets you access superclass members, including the constructor. When you create a subclass of another class that is defined with required parameters in the constructor, your subclass is responsible for making sure those parameters are taken care of by passing arguments into those parameters of the superclass constructor. You call the superclass constructor through super.
So in your ShootBall constructor, you must call super using whatever values you see fit to define for ( X,Y,NSpeedX:Number, NSpeedY:Number )
Code:public function ShootBall(){ super(0,0, 10, 5); }





Reply With Quote