Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 12 of 12

Thread: Timer

  1. #1
    Join Date
    Jan 2005
    Posts
    5

    Timer

    Is there a way to view in a Label how much time is remain when I start the page timer (Page.StartTimer) ?

  2. #2
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    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.

  3. #3
    Join Date
    Jan 2005
    Posts
    5
    Then is there other timer or Plug-in

  4. #4
    Corey is offline Indigo Rose Staff Alumni
    Join Date
    Aug 2002
    Posts
    9,746
    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.

  5. #5
    Join Date
    Oct 2003
    Location
    West Monroe, LA
    Posts
    294
    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

  6. #6
    Join Date
    May 2003
    Location
    Pendleton, Oregon
    Posts
    1,038
    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.


    .
    Attached Files
    Add-ons for AMS. Toolbar Buttons Galore, System Animations, the Window Construction Kit, and more.
    Visit Acme-Tek

  7. #7
    Join Date
    Aug 2004
    Posts
    47

    timing

    Hi guys, Anyone know how to make an image fade on click after say, 10 seconds?

  8. #8
    Join Date
    May 2001
    Location
    51.531249 | -0.610962
    Posts
    1,244
    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:

    In the Images' OnClick event, set the Page timer to start in 10 seconds:
    Code:
    Page.StartTimer(10000);
    In the Page's OnTimer event, loop the image opacity to diminish by a specified percent until invisible:
    Code:
    var = 100;
    while (var ~= 0) do
    	var = var - 1;
    	Image.SetOpacity("Image1", var);
    end
    
    Image.SetVisible("Image1", false);
    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!

    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]

  9. #9
    Join Date
    Aug 2004
    Posts
    47

    timer

    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

  10. #10
    Join Date
    Aug 2004
    Posts
    47

    fading objec

    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

  11. #11
    Join Date
    Aug 2003
    Posts
    2,427
    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.

  12. #12
    Join Date
    Aug 2004
    Posts
    47

    timing

    Hi

    That's a clever way around the problem, thanks, I will try it.

    Willi

Similar Threads

  1. Example: Loading Paragraph Text Using a Timer
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 7
    Last Post: 11-25-2004, 05:10 PM
  2. timer actions
    By dulux1309 in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 10-04-2004, 05:53 AM
  3. Using Timer Events
    By Desmond in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 09-22-2003, 02:14 PM
  4. Replies: 14
    Last Post: 06-24-2003, 04:21 AM
  5. I need a Flash Timer
    By TJ_Tigger in forum AutoPlay Media Studio 4.0
    Replies: 14
    Last Post: 06-05-2003, 07:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts