Jump to content

Start And Stop Buttons


v8n3t

Recommended Posts

Hello everyone,I have been trying to figure this out but have had no luck. What I need to do is LINK an audio clip to my start and stop buttons that I have created.So my first question is:1.) How do you link an audio clip to symbol?2.) How do you make the Stop button functional3.) How do you make the Start button functionalMy start button should start playing the .swf file and the stop button should stop it. And I each button should play the .wav file I created each time they are clicked. How do you go about doing this?FYI I am in Iraq and a lot of the website I need to visit are sometimes blocked.V/RRob

Link to comment
Share on other sites

  • 2 weeks later...

While I'm not quiet sure what you mean by "link an audio clip to a symbol", I'm pretty sure you could achieve your intended goal by doing the following:1. Create Two Layers. - Label one Audio - Label the second Buttons - Insert an empty keyframe onto the second frame of the audio layer - Extend the Buttons layer to the second frame as well (not with an empty keyframe)2. Create the Start and Stop Buttons (On their specified layer) - Create the graphic for your desired Start button - Press f8, make it a button - Do the same for the stop button3. Add your audio - Click the second frame of the audio layer - Drag and drop the desired audio from your library onto the stage - (I believe f11 is the hotkey to open the library, not quiet sure) - Click the second frame of the audio layer - Go to properties and set the audio event to stream4. Adding Actionscript - Click the second frame in the audio layer - Press f9 (To open Actions Panel) - Add "stop();" - Click the first frame of the audio layer - Add "stopAllSounds();" - Click the play button - Add "on(release){ _root.gotoAndStop(2); }" - Click the stop button - Add "on(release){ _root.gotoAndStop(1); }"Sorry if you were hoping for Actionscript 3.0, if you needed, I could provide it. Although, I currently don't have Flash on me, so I tried to stick with what I was more familiar with so I'd be less likely to provide you with faulty information.I hope that works for you. Obviously you could integrate dynamic song selection with XML, a preloader to ensure that the song is loaded before playing, and a variety of other things that could make it better. Good luck [:

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...