0 Replies Latest reply on Jul 9, 2006 4:18 PM by BruceMasai

    Smart Frame Loop Script for Dual Sound Channel

    BruceMasai
      Anders Skov, Sean Wilson, Lingo Pros...
      Now that each language buttons silences the other out when pressed (as per Anders Lingo lines), in succeeding frames that has a loop script that waits (loops in frame) until the audio file ends (since each audio file is different lengths), seems to cut off the ending words (the event head moves before the audio finishes), even though I used the below frame script. Please let me know if there is a better way to write a loop in frame script that either acknowledges which channel is on and which has been silenced or can loop no matter which snd channel is active (sound.volume = 255). The following are scripts I wrote but either don't work or the audio doesn't complete even though I'm looping in frame:
      Resides in each of the last script channel frame of each audio file...
      The following script does not let the audio finish before moving on to the next frame, thus cutting off the audio in mid sentences.
      --Sound file playing check
      on exitFrame me
      if soundBusy(1) then go the frame
      else
      sound(1).stop()
      go the frame +1
      end if
      end

      This set of Lingo I tried to see if the movie would recognized which Snd Channel frame was active, but it caused silence on Snd Channel 1 even though Snd channel 1 (the Chinese language) button was selected, thus becoming unuseable
      on exitFrame me
      if soundBusy(1) then go the frame
      else
      sound(1).stop()
      go the frame +1
      end if
      if soundBusy(2) then go the frame
      else
      sound(2).stop()
      go the frame +1
      end if
      end

      And I even tried to double up the syntax, but to no avail!
      on exitFrame me
      if soundBusy(1) then
      if soundBusy(2) then
      go the frame
      else
      sound(1).stop()
      sound(2).stop()
      go the frame +1
      end if
      end if
      end

      And tried this syntax that I kept getting Lingo error messages.....
      on exitFrame me
      if sound(1).volume = 255 and sound(2).volume = 0 then
      go the frame
      else
      go the frame +1
      end if


      if sound(2).volume = 255 and sound(1).volume = 0 then
      go the frame
      else
      go the frame +1
      end if
      end