Discussion:
How to set different TimerInterval?
(too old to reply)
altoprofilo
2005-03-20 10:27:01 UTC
Permalink
I need help for a skin i'm working on, i've try to
set different timerinterval for different functions.
I've an intro where main.timerinterval must be set to 2000
(the same for UpdateMetadata function), but i've also a close
animation function that need timerinterval = 50 to work.
How to do that?

I've tried this (but doesn't work!):

SKIN.wms
..
<view id="main"
timerInterval="2000"
onTimer="JScript:introAnim();UpdateMetadata(false);CloseAnim();"
..
<BUTTON upToolTip = "Close"
onclick="jscript:CloseAnim();"
..

SKIN.js

function introAnim()
{
display.alphaBlendTo(0,700);
}

function UpdateMetadata(status)
{
if (player.openState==osMediaOpen)
{
update = status ? true : !update;
metadata.value = (update ? player.currentMedia.name:player.status);
}

}

var fCount = 1

function CloseAnim()
{
fCount++
closeanim1.backgroundImage = "closeanim" + fCount + ".bmp";
main.timerInterval = 50;

if(fCount==6)
{
view.close()
}
}

Thanks in advance!
zachd [ms]
2005-03-28 20:37:29 UTC
Permalink
I don't use timerinterval myself, but wouldn't it be easiest to use
timerinterval 50, and then simply only call the 2000 interval'd calls every
40 go-rounds?
--
(speaking for myself and doing this in my free time)
See http://www.zachd.com/pss/pss.html for some helpful WMP info.
This posting is provided "AS IS" with no warranties, and confers no rights.
--
Post by altoprofilo
I need help for a skin i'm working on, i've try to
set different timerinterval for different functions.
I've an intro where main.timerinterval must be set to 2000
(the same for UpdateMetadata function), but i've also a close
animation function that need timerinterval = 50 to work.
How to do that?
SKIN.wms
..
<view id="main"
timerInterval="2000"
onTimer="JScript:introAnim();UpdateMetadata(false);CloseAnim();"
..
<BUTTON upToolTip = "Close"
onclick="jscript:CloseAnim();"
..
SKIN.js
function introAnim()
{
display.alphaBlendTo(0,700);
}
function UpdateMetadata(status)
{
if (player.openState==osMediaOpen)
{
update = status ? true : !update;
metadata.value = (update ?
player.currentMedia.name:player.status);
}
}
var fCount = 1
function CloseAnim()
{
fCount++
closeanim1.backgroundImage = "closeanim" + fCount + ".bmp";
main.timerInterval = 50;
if(fCount==6)
{
view.close()
}
}
Thanks in advance!
altoprofilo
2005-04-06 10:27:23 UTC
Permalink
Thanks for the answer zachd, i found another solution!
If you want you can download my skin here > http://www.deviantart.com/view/16893847/

Hope you like it!
Post by zachd [ms]
I don't use timerinterval myself, but wouldn't it be easiest to use
timerinterval 50, and then simply only call the 2000 interval'd calls every
40 go-rounds?
--
(speaking for myself and doing this in my free time)
See http://www.zachd.com/pss/pss.html for some helpful WMP info.
This posting is provided "AS IS" with no warranties, and confers no rights.
--
Loading...