2 Replies Latest reply on Apr 24, 2006 11:36 AM by Newsgroup_User

    Puppetsound (?) Lingo

    nomorebigideas
      Hello all,

      I am making a project whereby when the cursor rolls over an invisable 'hit' area, a sound is played.

      My question is this; is there lingo that would allow this sound to be played once completely, without it restarting (like you get with the pre-made behaviour!) even if the cursor has left the 'hit' area and then stop?

      I am currently using this script;

      -

      on mouseenter me
      if soundBusy(1) then
      sound(1).stop()
      sound(1).play(member("Rubbish"))
      else
      sound(1).play(member("Rubbish"))
      end if
      end

      -

      Thanks,

      Kind regards,

      Joss Thompson

      nomorebigideas@msn.com
        • 1. Re: Puppetsound (?) Lingo
          Level 7
          If that is the entirety of the behavior, the sound shouldn't stop when you
          leave, as all you have is mouseEnter. If there's a mouseLeave that stops the
          sound, just comment it out.

          Also, in your script there's no reason to have two separate play commands:

          on mouseEnter me
          if soundBusy(1) then sound(1).stop()
          sound(1).play(member("Rubbish"))
          end


          --
          Dave -
          Adobe Community Expert
          www.blurredistinction.com
          www.macromedia.com/support/forums/team_macromedia/


          • 2. Re: Puppetsound (?) Lingo
            Level 7
            -- Here's an adaptation that plays ONLY if there is no sound currently
            playing, I cnanged to a less common channel to lower the chance that
            some other sould is already using the channel.


            on mouseenter me
            if not soundBusy(3) then
            sound(3).play(member("Rubbish"))
            end if
            end



            I have not verified the syntax, but you should be able to detect if your
            specific sound is already playing.



            on mouseenter me

            if soundBusy(1) then
            if sound(1).member <> member("Rubbish") then -- don't interupt my
            sound
            sound(1).stop()
            sound(1).play(member("Rubbish"))
            end if
            else
            sound(1).play(member("Rubbish"))
            end