Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-12-2006, 08:38 AM   #1
Senior Member
manorius's Avatar
Join Date: Sep 2005
Posts: 129
Send a message via Skype™ to manorius
Angry Class setInterval question

Hi guys,

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

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() {
	private function drawing() {
		ePointx = this._x;
		ePointy = this._y;
		if (pieceNo == 1) {
			currentPart = emptyClip+"part"+emptyClip;
			line.lineStyle(0, 0x0066cc, 100);
			line.moveTo(sPointx, sPointy);
       		line.lineTo(ePointx, ePointy);
		sPointx = ePointx;
		sPointy = ePointy;

I really don't understand why the interval is not cancelled when I
call the function which stops the interval


Thanks guys for checking my thread!
manorius is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Q using a setInterval function in a Class to count Taff ActionScript 2.0 8 04-04-2005 02:05 PM
Trouble using setInterval in class chrscote ActionScript 2.0 1 03-29-2005 07:18 PM
Advanced question: XML, AS class & events oris ActionScript 2.0 6 03-24-2005 09:13 PM
custom class question Pixel ActionScript 2.0 3 08-24-2004 03:39 PM
Class Question... meloveitaly ActionScript 2.0 4 08-20-2004 12:48 AM

All times are GMT. The time now is 01:52 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.