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
 
setInterval bug identified and fixed

setInterval bug identified and fixed

2004-02-23       - By stefan - muchos.co.uk

 Back
Reply:     1     2     3     4     5     6     7  

thanks for the update.

So basically setinterval isn't working on the server on a vhost setup? Does
it affect only Windows?
No wonder I had so little joy with Flogger...

Stefan



-- --Original Message-- --
From: Edward Chan [mailto:echan@(protected)]
Sent: 23 February 2004 20:54
To: 'flashcomm@(protected)'
Subject: [FlashComm] setInterval bug identified and fixed


Hello folks,

Just want to let you know that the setInterval bug has been identified and
fixed and will be available in the next patch release.  The bug only affects
a multi-vhost setup.

We are currently writing up a tech note on this and should have that posted
in the near future.  The work around, until you get the patch, is to do the
setInterval from the client.

For example,

Instead of doing this from the server-side script:

function displayDate()
{
  trace(new Date());
}

setInterval(displayDate, 60*1000); // display date & time every minute


You can call the server-side method but on a client side timer.
Unfortunately, this means you will need to have a persistent client
connection to the app.

For example, in your client-side code:

nc = new NetConnection();
nc.connect("rtmp://host/app");

function callTimer()
{
  nc.call("displayDate", new onDisplayTime());
}

setInterval(callTimer(), 60*1000);

Server-side code:

function displayDate()
{
  trace(new Date());
}

application.onConnect = function(client)
{
  client.displayDate = function()
  {
    displayDate();
  }
}


I haven't actually run this code, so there might be some bugs, but I think
you probably get the general idea.  Basically, call the method on the
server-side that you want to be called on a timer, but do it via a client
call where the timer is on the client-side.



Ed



-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
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)