Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-08-2002, 02:06 PM   #1
SpiderJerusalem
Registered User
 
SpiderJerusalem's Avatar
 
Join Date: Apr 2002
Posts: 4
Question setInterval question

Probably a simple question but I'm having no luck getting a setInterval to not loop. Any suggestions? Thanks

obj = new Object();
obj.interval = function(){
loadMovieNum("box1.swf",2);
}
myVar = setInterval(obj,"interval",2000);
time = new Object();
function (time){
getTimer();
if (time >=5000){
unloadMovieNum (2);
clearInterval ("interval");
delete myVar;
}
}
SpiderJerusalem is offline   Reply With Quote
Old 10-09-2002, 08:58 AM   #2
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: Egyptian in UAE
Posts: 12,436
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Default

have u read the tutorial about it in the tutorials section??
__________________
‚€* GOD Is Near ‚€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
farafiro is offline   Reply With Quote
Old 10-09-2002, 07:35 PM   #3
SpiderJerusalem
Registered User
 
SpiderJerusalem's Avatar
 
Join Date: Apr 2002
Posts: 4
Question Tutorial doesn't answer this

The tutorial for timed events doesn't address clearing a setInterval. I'm simply testing the setInterval function to load a movie and then unload another movie. Let me explain in more detail.
Using the setInterval function I'm able to load my test file 'box1.swf'. The problem I'm having is removing that file after a set amount of time, and keeping it removed. The script (above) removes the clip but the statemant loops. I've tried several combinations including various combinations of getTimer,clearInterval, and even delete (object), to no avail.
Any ideas?
SpiderJerusalem is offline   Reply With Quote
Old 10-10-2002, 05:45 AM   #4
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: Egyptian in UAE
Posts: 12,436
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Default

what u mean by the statments loops after removeing the clip?? after deleting the myVar, u can trace its value and see if it's still in so there is something wrong in the code. coz as u delete it, it supposes to do nothong
__________________
‚€* GOD Is Near ‚€*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
farafiro is offline   Reply With Quote
Reply


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
My brain hurts (onClipEvent question) andrea_levin ActionScript 2.0 3 03-25-2004 04:23 AM


All times are GMT. The time now is 04:24 PM.

///
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.