Hi Ramesh,

thank you for your efforts in providing a solution to my problem. However I
am not sure how to use it.

You wrote a sprite property. When the play head enters the sprte, you set
the value for the duration. In your example you put 5000 and apparently you
thought of this value as milliseconds, because you used the functioin "the
milliseconds" for evaluating the time that passed after the start of the
fading. In my documentation however the value of the sound.fadeOut-command
is in ticks, not in milllseconds?!

The on mouseUp handler of your script is quite clear, but what exactly is
the on exitFrame handler supposed to do?

Anyway when I apply your script to my button sprite, it jumps to the new
location without any fade.

What could be wrong?

I think in my case it would be better to write a cast script anyway, because
my button is always performing the same task. I had already tried a script
similar to yours on my own which is also working, however I still have a
more basic problem: The duration of the fade is much too fast. In Director's
documentation they say that the value of the sound.fadeOut command is given
in ticks (1/60 seconds) so that 5 * 60 should lead to a 5 seconds fade. On
my computer however, the duration of the fade is much shorter. More as if
you were right with the milliseconds.

Could you (or anybody else) please try, what the fadeOut 300 is like on your
computer(s)? More like 5 seconds or 1/2 second?

And if all of you experience the 5 seconds, what could I have done wrong?
(By the way I'm working under Windows 2000)

Thanks a lot and best regards

Michael von Aichberger

-----Ursprüngliche Nachricht-----
Von:    [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] im Auftrag
von Ramesh CT
Gesendet am:    Freitag, 17. November 2000 03:21
An:     [EMAIL PROTECTED]
Betreff:        Re: <lingo-l> fade out sound and then jump to ...

Hi Michel,

I came up with a following script for the button. This script just waits
for the amount of time the fadeout occur then jumps to new location.

--- button script-----------------------------------------------------
property pFadeStart
property pFadeDuration
property pFadeEnd

on beginSprite me
   pFadeDuration = 5000
   pFadeStart = VOID
end beginSprite

on mouseUp me
   pFadeStart = the milliseconds
   pFadeEnd = pFadeStart + pFadeDuration
   sound(2).fadeOut(pFadeDuration)
end mouseUp


on exitFrame me
   if pFadeStart then
     if the milliseconds < pFadeEnd then
       -- go the frame
     else
       pFadeStart = VOID
       go next
     end if
   end if
end exitFrame
----------------------------------------------------------------------------
--


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


[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