Mailing List
Home
Forum Home
Flash Pro
Subjects
Firework Effect
setInterval bug identified and fixed
setInterval bug identified and fixed
ScrollPane component doesn 't auto update
Help: MX 2004 How to script a print button to print the entire sli
Event Dispatcher between classes
memory management removeMovieClip /
MX2004 Dataset itemClassName
Order of events per frame
XML to Object help
Textfield prototype question
Flash and QuickTime VR
Reading and displaying RSS feeds in Flash MX
Flash MX 2004 Sucks
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash Interface with 10mb xml file
Web Service Results
Listener Object 's best practice
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
setInterval test results

setInterval test results

2004-02-12       - By Nick Gerig

 Back
Reply:     1     2     3     4     5     6     7     8     9     10     >>  

Ok just to confirm that this feature is still supported :(

I did 2 tests, one that initiates setInterval just once (test 1) and the
other that does clearInterval when the function is called and then
re-initiates setInterval (test 2). (full code listed below and based on
Graham and/or Stefan's previous postings).

In all all cases the application instance was still 'alive' when the
setInterval died.


host : http://www.influxis.com
platform: Windows 2000 Server
FCS version : 1.5.1 r124.

test 1 : 121 minutes
test 2 : 244 minutes

test 1 : 69 minutes
test 2 : 181 minutes


host : http://www.mediatemple.net
platform: linux
FCS version : 1.5.1

test 1 : 191 minutes
test 2 : 240 minutes

test 1 : 15 minutes
test 2 : 225 minutes




//test 1 code
//-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
application.onAppStart = function (){
   log_so=SharedObject.get("logSO",true);
   log_date=new Date();
   log_so.setProperty("start","logging
started:"+log_date.getHours()+":"+log_date.getMinutes());
   trace("logging started");
   setInterval(this.enterLog,60000);
};

application.enterLog=function(){
   log_date=new Date();
   
log_so.setProperty("logging","logging:"+log_date.getHours()+":"+log_date
.getMinutes());
   trace("logging: "+log_date.getHours()+":"+log_date.getMinutes());
}

application.onAppStop=function(){
if (info.code == "Application.GC" )
return false;

log_date=new Date();
trace("app stopped: "+log_date.getHours()+":"+log_date.getMinutes());
log_so.setProperty("lastLog","lastlog:"+log_date.getHours()+":"+log_date
.getMinutes());
}
//-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
-- -----

//test 2 code
//-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
application.onAppStart = function() {
   log_so = SharedObject.get("logSO", true);
   log_date = new Date();
   log_so.setProperty("start", "logging
started:"+log_date.getHours()+":"+log_date.getMinutes());
   trace("logging started");
   this.inter = setInterval(this.enterLog, 60000);
};
application.enterLog = function() {
   clearInterval(this.inter);
   log_date = new Date();
   log_so.setProperty("logging",
"logging:"+log_date.getHours()+":"+log_date.getMinutes());
   trace("logging: "+log_date.getHours()+":"+log_date.getMinutes());
   this.inter = setInterval(this.enterLog, 60000);
};
application.onAppStop = function() {
   if (info.code == "Application.GC")
       return false;
 
   log_date = new Date();
   trace("app stopped: "+log_date.getHours()+":"+log_date.getMinutes());
   log_so.setProperty("lastLog",
"lastlog:"+log_date.getHours()+":"+log_date.getMinutes());
};




-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington  
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: flashcomm-unsubscribe@(protected)
For additional commands, e-mail: flashcomm-help@(protected)




Earn $52 per hosting referral at Lunarpages.