see sound(x).isBusy()

At 10:30 AM 2/18/2005, you wrote:
Hi all...

I'd like to find a reliable way of testing if a sound has finished
playing.  When the sound plays, I've added it to the actorlist in a
parent script, and the stepFrame handler below tests.  The problem is,
I'm not sure if this would be reliable across a variety of speeds of
computers.  Any thoughts?

Regards,
Michael M.



on stepFrame(me)
  if (sound(1).status = 3) then -- it's playing
    if (sound(1).endTime - sound(1).elapsedtime < 150) then --
arbitrarily picked 150
      -- sound is at the end, or near enough to it
      put "Done!"
      the actorlist = []
    end if
  end if
end


[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/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!]

----------- Roy Crisman Macromedia Director Programmer, Lingo Guru, Multimedia Producer 277 N. Goodman St. Rochester, NY 14607-1162 (585)473-3492 home (585)615-2873 cell http://www.brokenoffcarantenna.com/ roymeo(AT)brokenoffcarantenna.com

[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/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