Discussion:
Timer for event in JSCRIPT for a WMP skin
(too old to reply)
Franck
2004-10-07 16:17:02 UTC
Permalink
Hi,

I try to create a timer to automatically change visualizations on a period
of time determined in the script. I tried with a while loop to check with
player.controls.currentposition but it freezes the player...

For example, I want the viz to be changed every 15 seconds...
"visEffects.next();" need to be execute every 15 seconds.

Is there any way to retrieve the system clock and use this to repeatly
execute an event?

Any ideas?

Thx a lot
Franck
Bizzare
2004-10-21 15:54:37 UTC
Permalink
Hi Franck

The best way to do timed events is to use the onTimer
event for a view and set the views "timerInterval" to the
duration you need (it uses milliseconds).

So in the view element of your skin, put:

onTimer="visEffects.next()" timerInterval="15000"

and this should do the trick.
Check out the WMP SDK for more details.

Cheers

Biz
-----Original Message-----
Hi,
I try to create a timer to automatically change
visualizations on a period
of time determined in the script. I tried with a while
loop to check with
player.controls.currentposition but it freezes the
player...
For example, I want the viz to be changed every 15
seconds...
"visEffects.next();" need to be execute every 15 seconds.
Is there any way to retrieve the system clock and use
this to repeatly
execute an event?
Any ideas?
Thx a lot
Franck
.
Loading...