Loading, playing and stopping sounds in AS 3.0.
In this tutorial we will learn how to load external mp3s and how to control them. We will work with URLRequest class, Sound class, SoundChannel class and use the CLICK mouse event. After completing this tutorial you will be able to add sounds to your application. Let’s see how. 1. Create a new file by going to File > New select Flash file (ActionScript 3.0) and click Ok. 2. Insert two new layers by going to Insert > Timeline > Layer. 3. Double click on the top layer and name it actions , name the second one play_btn and the third stop_btn . 4. Lock the actions and play_btn layers and select the stop_btn layer. Go to Window >Common Libraries > Buttons. Scroll down until you find the playback rounded folder. Double click on the folder to open it and select rounded green stop button and drag it to the stage. 5. Select the button set its instance name to stopBtn , the width = 64, height=48, x= 275, and y=200. 6. Lock the stop_btn layer, unlock the play_btn layer and select ...