1 Reply Latest reply on Aug 20, 2007 10:23 AM by James Newton, ACP

    Puase playhed along with Voiceover

    rafa@mediatech Level 1
      I've been working on a tutorial for a client in which I want the user to be able to pause the animation and voice over. I already figured out how to make the voice over pause once a button is clicked, and how to make it start in the same place it left off. The problem I am running into is that the voice over pauses, but the play head keeps going and keeps playing the animation.

      The code I am using to pause the voice over is:

      global tm
      global paused
      global soundfile

      on beginsprite
      paused = 0

      on togglesound
      soundfile = sound(1).member
      if paused = 0 then
      tm = sound(1).currenttime
      paused = not (paused)
      else if paused = 1 then
      sound(1).play([#member: member("NAME"), #startTime: tm])
      paused = not (paused)
      end if

      on mouseup

      Thank you!