View Full Version : Is there a way or trick for use 2 timer whit different values in one page?
123456789
04-27-2008, 04:48 AM
when i call On timer event by "Page.StartTimer(n);" then it execute to apply All of command in per n million Sec.
I want have :
On Preload:
Page.StartTimer(1000);
result===> execute to in On Timer only.ThisMycode();
On Show:
Page.StartTimer(300);
result===> execute to in On Timer only.OtherMycode();
I waiting for help me by Dear users of AMS.
THX
ShadowUK
04-27-2008, 05:25 AM
There's only one unfortunately, I'd recommend Worm's Timer Action Plugin, For multiple timers on one page or more.
You can do someting like this too...
nCounter = 0;
Page.StartTimer(100);
On Timer
nCounter = nCounter + 100;
if (nCounter/300) == Math.Floor(nCounter/300) then
Label.SetText("Label1", nCounter)
end
if (nCounter/1000) == Math.Floor(nCounter/1000) then
Label.SetText("Label2", nCounter)
end
if nCounter == 3000 then
--keep nCounter from getting too large
nCounter = 0;
end
123456789
04-27-2008, 07:47 AM
Thanks man
Your trick is very nice...
but, hey AMS add a timer action for your user!plz
RizlaUK
04-27-2008, 10:23 AM
object timers would be very nice, a timer event in every object, iv been searching hard for a stable timer alternative, i'v found 1 or 2 things i might be able to use but a intergrated timer system (like the action plugin) would be good
I know... I need to dig into the Vista issue, just need some time (bad pun)
longedge
04-27-2008, 02:04 PM
This example contains a tiny (1K and 1pixel :) ) flash object that does nothing but send an fsCommand "1" once a second. You can stack as many as you like for multiple timers on the page and control them independently. This one has got 3 timers.
RizlaUK
04-27-2008, 02:53 PM
hey worm....that wasent a hint, lol :yes
longedge, thats pertty neat, could come in handy
123456789
04-28-2008, 09:17 AM
This example contains a tiny (1K and 1pixel :) ) flash object that does nothing but send an fsCommand "1" once a second. You can stack as many as you like for multiple timers on the page and control them independently. This one has got 3 timers.
Thanks for nice trick
u are a Genius...
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.