Skip to main content
Inspiring
December 26, 2008
Question

Constantly updating information...

  • December 26, 2008
  • 2 replies
  • 429 views
Hello. I'm using Flash CS3, but I am coding with AS2.0...

I have an application that pulls info from a database and populates a textfield. The database is constantly changing, however, so I want to make sure that the Flash file is constantly changing as well so that it stays current...

I assume the best way to do this is with Event Listeners somehow, but I've always been terrible with listener objects/events. Assuming the function I've created to pull all the database information and populate it in the textfield is called "getInfo()", can someone please help write out the code I would need for that "getInfo()" function to be called over and over again constantly?...

Thanks!!!
This topic has been closed for replies.

2 replies

kglad
Community Expert
Community Expert
December 26, 2008
it takes the same parameters (in the same order) as setInterval().
kglad
Community Expert
Community Expert
December 26, 2008
use a setTimeout() function in your onData (or onLoad) function to repeatedly call getInfo() some period of time after the previous data-load. try not to call so frequently you cause problems for users.
Inspiring
December 26, 2008
Thanks for the info. Can you provide more info on how to use the setTimeout() function? I've never used that before. Thanks!!!