3 Replies Latest reply on Sep 20, 2008 2:36 PM by kglad

    Create Toggle Button for Sounds? Need some direction

    Clintage4
      Okay, here's my issue...

      It's been a couple years since I've last created any flash projects, so I've pretty much forgotten everything. Here's basically what i'm doing:

      I'm creating a graphic of a guitar. When the user clicks on a particular string, the sound rings out. I've created the graphics, and I've successfully attached the sound to the correct "string buttons" on the flash file. When I click on the string, the sound plays. Perfect. I've also set it up in the Action Script so that the sound stops before it plays the full sound file if I release the mouse button. Cool.

      What I want to be able to do, is place some sort of toggle button type button on the flash file. So, in normal mode, when the user clicks the string (and releases the mouse button immediately), the sound plays all the way through even if you release the mouse button. My desire is when the use clicks the toggle button, it would change it so that if the user click the string and triggered the sound, it would cut off the sound file when the mouse button is released.

      So, in short, I know how to get the button to play the attached sound, and I know how to get the button to cut off the sound when the mouse button is released. What I need help on is the toggle button. How do I get the toggle button to tell the flash project that when it's not toggled, the sound plays out. When it is toggled, the sound cuts off on mouse button release.

      Any assistance would be incredibly appreciated. And if you are able to successfully help me, I would be glad to place a link to your site (if you have one) on my upcoming songwriter's tools site.

      Thanks in advance!