Thanks for your explanation.
If I understand correctly,
the script on the frame before the frame which ends the movie goes like
this:
on exitFrame
sound(4).fadeOut(500)
go the frame
the script on the frame which ends the movie goes like this:
on exitframe
if sound(4).volume = 0 then
halt
end if
go the frame
end
Now I have another problem: the music continues playing, it does not stop
and the music does not fade away and the movie stays on the final screen. Oh
dear!
I also tried to use what Irv had written. However, the music stops abruptly
and the movie ends.
I still do not know why the music does not fade away...
Would appreciate any input provided.
Genevieve
>From: Peri <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: Re: <lingo-l> Sound does not end
>Date: Tue, 25 Sep 2001 18:05:31 -0700
>
>Issue the sound(channel).fadeOut in the frame vefore then in the next frame
>you can check to see if the volume is at zero. When it is at zero then you
>exit by issuing a Halt command.
>
>Irv's example could be used as well, he's just using a time parameter to
>tell
>when to end the movie. He's also just using a different event handler to
>issue the fadeout.
>
>The basic idea is that you would want to issue the fadeOut in a separate
>event, then check for the volume or the time in another event. Mind you
>this
>could be in two exitFrame scripts occuring in different frames. So if you
>rip
>out the Fadeout stuff in my previous example and put it into an exitFrame
>script before the volume script it should work.
>
>There are many ways to do this, it all depends on what your movie does, or
>rather what you want it to do.
>
>pc
>
>Genevieve Young wrote:
>
> > Hi, Herman, Irv and Peri,
> >
> > I really appreciate all of your input. However, my problem is still
>not
> > solved.
> > Why did Irv mention time check? And a sprite script?
> >
> > Thank you.
> >
> > Genevieve
> >
> > >From: Peri <[EMAIL PROTECTED]>
> > >Reply-To: [EMAIL PROTECTED]
> > >To: [EMAIL PROTECTED]
> > >Subject: Re: <lingo-l> Sound does not end
> > >Date: Tue, 25 Sep 2001 14:10:48 -0700
> > >
> > >But I do see your point
> > >
> > >pc
> > >
> > >Irv Kalb wrote:
> > >
> > > > I haven't been following this thread, but there is an error in the
> > > > code below and in the original version.
> > > >
> > > > What you really want to do is to issue the sound fadeout _once_,
>then
> > > > check on exitFrame. To issue the fadeout once, do it in the
> > > > beginSprite handler (which _is_ issued even in a frame script).
> > > > Then, rather than checking sound volume (it probably would work just
> > > > fine), I would do it with a time check. Something like this
> > > > (untested):
> > > >
> > > > property pEndMilliseconds
> > > >
> > > > on beginSprite me
> > > > nMilliseconds = 500 -- the number of milliseconds over which to
> > >fade
> > > > sound(1).fadeout(nMilliseconds) -- start fading channel 1
> > > > pEndMilliseconds = the milliseconds + nMilliseconds --
> > > > millisconds when you want to stop
> > > > end
> > > >
> > > > on exitFrame
> > > > if the milliseconds >= pEndMilliseconds then
> > > > halt
> > > > end if
> > > > end
> > > >
> > > > Hope this helps.
> > > >
> > > > Irv
> > > >
> > > > At 1:06 PM -0700 9/25/01, Peri wrote:
> > > > >You need a go to the frame script in this one
> > > > >Like
> > > > >on exitFrame me
> > > > > sound(1).fadeOut(500)
> > > > >
> > > > > if sound(1).volume = 0 then
> > > > > halt
> > > > > end if
> > > > > go the frame
> > > > >end
> > > > >
> > > > >Oh and use halt rather than exit, as halt will quit the movie in
> > >playback, but
> > > > >will only stop the movie in Authoring. No more restarting Director
> > >after each
> > > > >playback.
> > > > >
> > > > >Peri
> > > > >
> > > >
> > > > --
> > > >
> > > > Lingo / Director / Shockwave development for all occasions.
> > > >
> > > > (Home-made Lingo cooked up fresh every day just for you.)
> > > >
> > > > [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!]
> > >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at
>http://explorer.msn.com/intl.asp
> >
> > [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!]
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
[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!]