1 Reply Latest reply on Mar 19, 2008 12:49 PM by ImLearningW3D

    how to code script to playback a video in 2 hrs

      I want to write a dir script to loop some pictures.for example,if I have 5 pcs frames,I just want to realize to loop these 5 pcs frames within 2 hrs, after 2 hrs the playhead stop the sixth frame,i dont know how to control the time,I once tried to use timecounter but fail ,any help should be appreciated.

      Tks &Rgs
        • 1. Re: how to code script to playback a video in 2 hrs
          In the lingo help file, look up "_system.time()". This is a way to track time on the local computer. You can use that to set your time delay.

          global gTheExpireTime

          on StartMovie
          the itemdelimiter = ":" ----Using the ":" as an item delimiter; to differenciate between the hours and minutes places

          -----Your 2 hour delay added to the hours place in the time
          gTheExpireTime =string(value(_system.time().item[1]) + 2) & ":" & _system.time().item[2]

          on YourTrackingHandler --exitframe, enterframe, prepareframe,...
          if gTheExpireTime = _system.time() then Expired() --Using the "Expired" Hnadler as the trigger for what you want to happen in 2 hours

          This script ought to work but I dont know the details of your project. Let me know if you are still having problems.