Hi Jim,
> Thanks for the help Karina i was just being a bit dim and
> I just have one last time question then i promise to stop
> being irritating.

You're welcome, and I find you neither dim nor irritating :)

> that on exitframe in a movie script would apply to the whole movie.

That's probably because it's not used very often, being very limiting.

> the movie and a different sound to play at a later time. i've used :
> on exitFrame
>   if the timer >= 60 * 60 then
>     sound playfile 2, "10 mins left.wav"
>     if the timer >= 65 * 60 then
>       if soundBusy(2) then sound stop 2
>
> as without the sound stop, it keeps playing on exiting every
> frame but with
> it added it sometimes just doesn't play at all. Is there any
> other way of
> making the sound play only once at a particular time?

That was a brain melt on my own part - of course, if you use >= then it will
play continuously :/ You can't use "=" because it's likely to skip over the
exact time, so you need a different way of doing it.
There are loads and loads of things you could do, but to stay with your own
approach, here's one way:

global gMessage

on startMovie
  startTimer
  gMessage = True
end

on exitFrame
 if gMessage then
    if the timer >= 60 * 60 then
       sound playfile 2, "10 mins left.wav"
       gMessage = False
    end if
 end if
end


What this script does is set a global boolean flag: if it's True then the
exitFrame script checks if it's time to play the message, if it's False then
the exitFrame script won't do anything. You can also setup another flag,
such as gActive to check for the final timeOut. Any more flags and you're
better off going for a different approach - otherwise you end up with more
globals then you know what to do with...


Karina










[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