Here's a no frills way of doing it based on frames instead
of the timer, the ticks or the milliseconds. It may not be
precisely X second, but it is close enough for government
work and it looks like that is what you are after here.

property waitTime, fCount

on exitFrame me
   fCount = fCount + 1
   if fCount > integer(waitTime * the frameTempo) then go the frame + 1
   go the frame
end

on getPropertyDescriptionList me
  pL = []
  pL.addProp(#waitTime,[#comment:"How Long",#format:#float,#default:1])
  return pL
end


You can always replace the getPropertyDescriptionList
handler by hard coding waitTime in on beginSprite.

on beginSprite me
  waitTime = 5.5
end

where 5.5 is the number of seconds.

HTH,
Steven Sacks
[EMAIL PROTECTED]



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Slava Paperno
> Sent: Wednesday, January 03, 2001 3:16 PM
> To: [EMAIL PROTECTED]
> Subject: <lingo-l> lingo equivalent to Wait for X seconds
>
>
> I'm looking for a Lingo equivalent to the Tempo channel setting of "Wait
> for X seconds," because I want to pause the playback head while still
> continuing to play sound in sound(1) _and_ allowing user interaction.
>
> The "delay" command won't work, because it suspends user interaction. A
> timed "repeat" loop has the same problem.
>
> Pausing the playback head with a "go to the frame" loop and setting a
> global "start time" variable, and then checking the elapsed time in "on
> exitFrame" won't work, because I have no place to set that "start time"
> variable. Using startTimer and theTimer has the same problem: I have no
> place to start the timer other than in "on enterFrame," which will simply
> continuously reset my "start time."
>
> I can't use sound(1).currentTime as a measure of elapsed time,
> because the
> user is allowed to pause the sound.
>
> Using the "Wait for 5 seconds" setting in the Tempo channel works
> fine, but
> it doesn't allow the duration of the delay to be changed at
> runtime. Still,
> if the Tempo setting can do it, I should be able to do the same
> with Lingo.
> What am I missing?
>
> Thanks!
> Slava
>
>
> [To remove yourself from this list, or to change to digest mode, go to
> http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
> email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
> Lingo-L is for learning and helping with programming Lingo.  Thanks!]
>
>


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to