Is there a way to view in a Label how much time is remain when I start the page timer (Page.StartTimer) ?
Professional Software Development Tools
Is there a way to view in a Label how much time is remain when I start the page timer (Page.StartTimer) ?
Hi. The timer works like a stopwatch, so there is no "remaining" time per se. It simply increments the time by an interval which you specify when you start it. Hope that helps.![]()
Then is there other timer or Plug-in
Hi. No, because you can easily time anything using the existing timer. Check out the timer examples in the help docs and I'm sure you will be able to get a good overview in about 5-10 minutes.![]()
What if you set the timer to run for a certain amount of time(s).
Set a counter=10
Call the timer every second, and subtract 1 from the counter variable.
Then update the label text.
SELECT * FROM Users WHERE IQ > 0;
o rows Returned
I agree with Mark,
If what you are trying to do is create a little count down timer, it is fairly easy to implement with the page timer. I built a little example to show you at least one way this can be done.
To see the code used,
Check the ‘On Click’ event of the button.
The ‘On Timer’ event for the page
The Global Functions
Hope this helps.
By the way, the count down interval is in ms, so you would put 1000 if you want the intervals to be 1 second long. Of course the timing won’t be exact, but it should be very close.
.
Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
Visit Acme-Tek
Hi guys, Anyone know how to make an image fade on click after say, 10 seconds?
There is more than one way you could do that - here is one for you to try:Hi guys, Anyone know how to make an image fade on click after say, 10 seconds?
In the Images' OnClick event, set the Page timer to start in 10 seconds:
In the Page's OnTimer event, loop the image opacity to diminish by a specified percent until invisible:Code:Page.StartTimer(10000);
Notice the Image.SetVisible at the end, in order to make the image stay invisible - otherwise it comes right back at ya after 10 secs!Code:var = 100; while (var ~= 0) do var = var - 1; Image.SetOpacity("Image1", var); end Image.SetVisible("Image1", false);
You could also add a line to stop the timer here if it's no longer needed:
Code:Page.StopTimer();
Last edited by Derek; 04-21-2005 at 03:13 PM.
-
= Derek
["All glory comes from daring to begin" - fortune cookie]
AWESOME!!!!
Now when I can't get it to come back, I have three objects, they are linked that are linked on click to an image box (image2) when clicked,
It fades away nicely, when i click on another object nothing apears.
Willie
Derek gave me an awesome fading code with timing that works great with images, but I can't get it to work with Labels. (I can't chose set opacity for labels). any Ideals??
Willie
I had a bit of a mental block awhile back and couldn't work out why one part of my project would just go dead and nothing would respond for several seconds and then I would get a small 'window' of response followed by another dead period.
The cause was for/next loops in the page OnTimer - the application wouldn't respond whilst inside a loop and I'd got nested loops.
If it's working that's fine, but just something to be aware of- it took me a while (with help from the forum) to work out what was happening.
You could fake fading the labels by taking a screen shot and use a picture of the label underneath the label itself. Make the label visible and the picture invisible. On the event that you want to use to fade the label make the label invisible and the picture visible but then fade it.
Hi
That's a clever way around the problem, thanks, I will try it.
Willi