Thanks for the help Karina i was just being a bit dim and didn't realise
that on exitframe in a movie script would apply to the whole movie.
I just have one last time question then i promise to stop being irritating.

basically i want a sound to just play once when it gets to a certain time in
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?
Thanks in advance
Jim
----- Original Message -----
From: "Karina Steffens" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 9:55 AM
Subject: RE: <lingo-l> another time question


>
> > I've got the timer starting at a certain point but have no
> > idea where to put
> > the
> > if the timer = number then
> > do something
> >
> > Any ideas what i can attach it to to make this possible?
>
> It all depends on how you constructed the timer, of course - but
basically,
> you can put your if statement on an exitFrame of anything that will suit
> your needs, such as a sprite behavior, frame behavior, even a movie script
> (that will affect the entire movie, while the other two are more
> controllable).
>
> For example, if you're using director's in-built timer (which you appear
to,
> from your question) then all you need to do is:
>
> --this is a movie script
> on startMovie
>   startTimer
> end
>
>
> --this is either a movie script or a behavior
> on exitFrame
>   if the timer >= 60*10 then
>    --do something
>   end if
> end
>
> and, of course, you can add if/else or case clauses to do different things
> according to how much time elapsed.
>
> But you must be aware that only one in-built timer can be used at a time.
> That's very limited, and that's why D8 has timeOut objects, which can have
> many instances (but they work differently then the timer).
> Also, Irv Kalb already mentioned that you can use global variables to
store
> the milliseconds (or ticks)... or (his preference and mine) you can use a
> timer object.
>
> But this is probably not the time and place to start another discussion on
> the benefits of OOP ;)
>
>
> Regards,
> Karina Steffens,
> Lead Programmer
>
> Martello Media Ltd.
> 4 Islington Avenue
> Sandycove
> Co. Dublin
>
> Tel: +353 1 2844668
> Fax: +353 1 2803195
> http://www.martellomm.ie
>
>
>
>
> [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