# Some help with a class problem? Pls :¬(

**URL:** https://forum.kirupa.com/t/some-help-with-a-class-problem-pls/193309
**Category:** flash
**Created:** [July 12, 2006, 3:37pm UTC](https://forum.kirupa.com/t/some-help-with-a-class-problem-pls/193309 "2006-07-12T15:37:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![manorius](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@manorius](https://forum.kirupa.com/u/manorius)
#### Post date: [July 12, 2006, 3:37pm UTC](https://forum.kirupa.com/t/some-help-with-a-class-problem-pls/193309/1 "2006-07-12T15:37:01Z")

</div>

Hi guys,

Does anyone have any idea why I can’t stop the interval  
inside the class I created?

```auto

class drawClass extends MovieClip {
    
        private var sPointx:Number;
    private var sPointy:Number;
    private var ePointx:Number;
    private var ePointy:Number;
    private var pieceNo:Number = 1;
    private var currentPart:String;
    private var nameIt:String;
    private var nTimes:Number;
    private var line:MovieClip;
    
  

    static var emptyClip:Number = 0;
    private function init() {
        sPointx = this._x;
        sPointy = this._y;
        
    }
    private function startDrawing(stopIt:Number) {
        
        nTimes= setInterval(this, "drawing", 1);
        
    }
    private function stopDrawing() {
        
        clearInterval(this.nTimes);
        
    }
    private function drawing() {
        ePointx = this._x;
        ePointy = this._y;
        if (pieceNo == 1) {
            emptyClip++;
            currentPart = emptyClip+"part"+emptyClip;
line=_root.createEmptyMovieClip(currentPart,_root.getNextHighestDepth());                                         
            line.lineStyle(0, 0x0066cc, 100);
            
            line.moveTo(sPointx, sPointy);
            
        }
               line.lineTo(ePointx, ePointy);
        
        sPointx = ePointx;
        sPointy = ePointy;
        pieceNo++;
        
        
        
            
            
        
    }

    
}

```

I really don’t understand why the interval is not cleared when I  
call the function which stops the interval

[“movieclip”].stopDrawing();

:thumb: Thanks guys for checking my thread!  
Manolis
