Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19
  1. #1
    Join Date
    Nov 2006
    Posts
    306

    Star Important method NOT included, Timer

    Hey folks,

    I have one important message IMO.
    I've searched over 4 hours for the method for Time(r)s or something like that.
    Havent found anything, except the On Timer event, called by Page.StartTimer
    Isnt there a way to put the timers in a object for example.
    So if clicked on a button is true, then timer will start in a Paragraph.
    If the timer reach 5 seconds, than add "hallo" in ParagraphText.
    If the timer reach 5 seconds, than add "hallo folks" in ParagraphText.
    In my testapplication I got 3 objects that 'startTimer' on the 'On Time'.
    So if object 1 reaches his limit, it will stopTimer, but object 2 and 3 needs to be active in the On Time.

    Maybe a suggestion to make a method called Wait or Timer or Timed, etc. for AMS update or AMS 7 ?? For scripters, this is an important feature !!

    Maybe I haven't found the method, but i searched everywhere to solve this...
    My script on 'On Timer' (related on which page, all objects on Page1) is huge.

    Sollutions or idea's are very welcome and will be warmed received !!

    Kind Regards,
    Casper

  2. #2
    Join Date
    Nov 2006
    Posts
    306
    Please let me know ...
    There must be someone with some ideas...
    Thanks in advance

  3. #3
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778

    Page timer

    Here's what I use for Page timers.

    I normally set the page timer "on Preload" Page.StartTimer(4000); -- this timer will fire every 4 seconds

    Then on the page script tab "on Timer", through scripting, you can do whatever you want to the objects on the page (every 4 seconds), or whatever duration you want to set.

    Search "timer" for some very good examples of using the Page Timer, and techniques for setting up multiple timers on a page.


    I hope this helps.
    Last edited by holtgrewe; 11-22-2006 at 05:24 PM. Reason: clean-up

  4. #4
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Examples via way of using the Search in the forums here:

    http://www.indigorose.com/forums/sho...51&postcount=9

    http://www.indigorose.com/forums/sho...48&postcount=3

    http://www.indigorose.com/forums/sho...27&postcount=2

    And here is something offtopic just to check out. It the product of three people's coding efforts:

    http://www.amsuser.com/ams/examples/...igued-team.exe

    (something to get our idea-juices flowing if not anything else)
    Intrigued

  5. #5
    Join Date
    Nov 2006
    Posts
    306
    thanks for the replies, but one problem.
    I know how to fire a timer (refresher), I changed my whole app on this timer event, although it takes a load of time to set all changes to that.
    I take a startTimer, interval of 250ms, then in the On Timer event i take if lalala => 2000 then etc.
    Now it toke me alot time to change all current settings to new one, and got over 1000 lines of code in the On Timer.
    But isn't there a method for setup timer/wait in AMS, but only the On Timer event for each page? It would be very handy, to put script for each object instead of setting scripts for all objects on 1 page

    But thanks for your replies !
    I will stay at that method for now

    Kind Regards,
    Casper

  6. #6
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Now it toke me alot time to change all current settings to new one
    What are you changing? Also, if you had more timers you would have to code more anyway and not only in one spot, but working with each object you want to have a timer for.

    Finally, for what it's worth... this has been put into the database as a suggestion. (I've suggested it and others have).

    After thought:

    Though I am not following you about the "change all current settings" with regards to multiple timers, you may find it easier to code functions with arguments in the Global Functions area and then just "call" (use) them (and change them) in the On Timer event area.

    Best of luck with you project(s).
    Intrigued

  7. #7
    Join Date
    Nov 2006
    Posts
    306
    Hey Intrigued,

    Yes, the settings in one page that use the timerevent.
    I changed my mind, I will call the functions for the methods I used.
    Making functions will become handy for low-line codes for in the On Timer tab.
    Im putting the functions in the On Timer tab and put the code of the functions in the global declaration tab.
    Yes, I made a database for myself for using some kind of information.
    And i got 3 on timer functions on first page.
    For flash (for x seconds, start Flash animation).
    For Progressbar (loading app -nextpages-).
    For automaticlogout (after x seconds).

    I putted the code in the preload (ive changed that after its not working combining 3 timerevents on 1 page with using different values in the On Time)
    Example: flash goes after 3 seconds, startTimer set on 3000ms, with putting flashCounter = flashCounter + 1;
    If the flashCounter reach 10 (if flashCounter == 10 then ...) then it will stopTimer. Now other objectTimers need to go on, on the timerEvent.
    Thats why i putted booleans to each timerobject on timer event.
    Example: On Preload (function flashVerify(), flashGiveGo = true, starTimer, etc). On Time (if flashGiveGo == true then ...) then it performs actions.
    If counter reach 10 than flashGiveGo = false; etc.
    But that Timer is still ticking !!!
    the 3 objects need to be combine, but at least 2 are combined in the On Time, needs to be FUNCTION APART/SEPERATELY from eachother,
    so if i want to stop the timer in this page, i only can call the stopTimer in automatet loggoff or stopTimer in progressbar.
    Thats why I wanted to make it a function apart from the On Time (new method) for update AMS or AMS 7. For example making 20 timeobjects on 1 page, and 10 needs to have a stopTimer, while some others need to have the timer STILL running !

    Just to get you the idea

    Kind Regards,
    Casper

  8. #8
    Join Date
    Nov 2006
    Posts
    306
    Here's what I use for Page timers.

    I normally set the page timer "on Preload" Page.StartTimer(4000); -- this timer will fire every 4 seconds

    Then on the page script tab "on Timer", through scripting, you can do whatever you want to the objects on the page (every 4 seconds), or whatever duration you want to set.

    Search "timer" for some very good examples of using the Page Timer, and techniques for setting up multiple timers on a page.


    I hope this helps.
    Hey holtgrewe,

    Yes, I already know how to set this function, its already integrated into my app, but the question was how to set it as an apart function into AMS.
    See above post for the 'idea'.
    Btw, thanks for your reply

    Sincerely,
    Casper

  9. #9
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    usernameCasper, what I do is set a variable (aka. "flag", ie. strFinished = false, or numCount = 0) before, increment it in the On Timer event area and then check off of that. Wether it's TRUE/FALSE or < 0, >0... it's the same idea.
    Intrigued

  10. #10
    Join Date
    Nov 2006
    Posts
    306
    Hey Intrigued,

    Yes, I did that 2.
    I made functions with booleans in them on Preload refering to On Timer.
    I also made a counter.
    I setted timer to 0,25 seconds for refresh or call On Timer.
    Btw, I coded over 1 hour to put my objects in On Timer, cause some objects needs 0,25 sec refresh time, and others need 1,75 sec for example.
    I used the Math method.
    It isnt a problem, only it isnt handy Its such a mess in my code over 400 lines in On Timer, lol ...
    But its functional without errors at all, rather be a perfectionist as a fast coder :/
    Ive been using that when I posted a reply couple posts before this one.

    Thanks for your replies and supporting
    Greets,
    Casper

  11. #11
    Join Date
    Nov 2006
    Posts
    306
    For the ones who dont know what im talking about or who not have a good idea what I mean, I refer to: http://www.indigorose.com/forums/showthread.php?t=17968

  12. #12
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778

    multiple timers

    This post may get the creative juices flowing on multiple timers.

    http://www.indigorose.com/forums/showthread.php?t=17968

  13. #13
    Join Date
    Nov 2006
    Posts
    306
    This post may get the creative juices flowing on multiple timers.

    http://www.indigorose.com/forums/showthread.php?t=17968
    Hey holtgrewe,
    It isnt multiple timers, its single
    And thats the problem im talking in those posts about.

  14. #14
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778
    usernameCasper,
    I understand exactly what you're suggesting.

    All I'm saying is that by using creative techniques, a developer can set up any number of programmatic timers as necessary.

    The Page.StartTimer() merely sets the interval for checking the On Timer event.

    Code:
    ...just another thought on timers:
    
    It should be fairly simple to create our own event timers. 
    This example shows a timer based on a button being 'clicked'
    
    On Preload set 
    button_1_timer=nil; Page.StartTimer(500);
    
    On Click event, 
    button_1_timer=0
    
    On timer event,
    if button_1_timer ~= nil then
    button_1_timer = button_1_timer + {some duration interval} -- checking every half second
    if button_1_timer == {some target interval} then
    --do your scripting
    button_1_interval=nil;
    end
    end
    Obviously multiple timers would be easier to deal with; however I've been creating my own.
    Last edited by holtgrewe; 11-30-2006 at 08:47 AM.

  15. #15
    Join Date
    Nov 2006
    Posts
    306
    You creating your own multiple timers in AMS?
    Well, how you do that without imports of dll's ?
    Cause that would be nice, IR staff told me multiple timers arent included yet in AMS, but it's suggested in the db

    Correct me if im wrong
    Good luck holtgrewe.

    Kind Regards,
    Casper

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Getting time from timer
    By Syverson in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 11-10-2005, 04:18 PM
  2. 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
  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