i want the class BeginBall to extend Ball, but when i do so, this error shows up.
this is my code:
PHP Code:
package
{
    
import flash.events.Event;
    
import flash.display.MovieClip;
    
    public class 
Ball extends MovieClip
    
{
        public var 
nSpeedX:Number;
        public var 
nSpeedY:Number;
        public var 
ballNr:int;
        const 
BALLDIAMETER 10;
        private var 
nStageWidth:Number 500;
        private var 
nStageHeight:Number 400;
        
        public function 
Ball X,Y,NSpeedX:NumberNSpeedY:Number ) : void
        
{
            
nSpeedX NSpeedX;
            
nSpeedY NSpeedY;
            
X;
            
Y;
            
            
this.addEventListener Event.ENTER_FRAMEonEnterFrameHandler );
        }
        
        private function 
onEnterFrameHandler E:Event ) : void
        
{
            
this.-= nSpeedX;
            
this.-= nSpeedY;
            
            if ( 
this.>= nStageWidth BALLDIAMETER 16 )
            {
                
this.nStageWidth BALLDIAMETER 16;
                
nSpeedX *= -1;
            }
            else if ( 
this.<= BALLDIAMETER 16 )
            {
                
this.BALLDIAMETER 16;
                
nSpeedX *= -1;
            }
            
            if ( 
this.>= nStageHeight BALLDIAMETER 16 )
            {
                
this.nStageHeight BALLDIAMETER 16;
                
nSpeedY *= -1;
            }
            else if ( 
this.<= BALLDIAMETER 16 )
            {
                
this.BALLDIAMETER 16;
                
nSpeedY *= -1;
            }
            
        }
    }
//end of class
    
    
public class BeginBall extends Ball
    
{
        
//alles over spatieknop en muisknop etc.
    
}

i tried to do public last class Ball, butit says access identifiers are not allowed with namespace attributes.
how can i let BeginBall normally inherit Ball's constructor, or if its not possible, make a new one for BeginBall?