Time control

Hi,
i need to be able to receive a variable from a database, convert the string to a number, give it to flash as a sec, min, hour format, have the movie play for the amount of time given by the variable, then quit.
There will be no server involved, only the database program (4d)
and the flash.exe projector.
i will loadVariables the text time format into the flash at the start of the movie.
Cheers
Paul

Hi,

Make sure you get the variable loaded (i think is better as a string, but doesn’t matter) and convert it to numbers for secs, mins and hours. Multiply accordingly so the values are in milliseconds, add them and when you’re sure you’ve got a totazal number in milliseconds use ‘setInterval’ command.

setInterval(myFunction, numInMilliseconds);

Once the interval is set just play the movie normally.
myFunction should just make the projector quit as it will only happen when the time is up.

Cheers

SHO