Adding ActionScript to the slider
Now that we've finished creating the slider, we can exit the symbol edit mode and go back to the main timeline (ctrl+e or click Scene 1).
Create 2 additional layers and name them text, sliders and scripts.
It should look like this:
Select the sliders layer and drag 2 instances of the slider movie clip onto the stage. Position them so one is above the other and align them vertically to the stage. Select the top slider instance and use the instance panel to give it the name panSlider.
Select the bottom slider instance and use the instance panel to give it the name volSlider.
Now we just have to add some ActionScript to the slider instances. Right click on the volSlider instance, select Actions to open the Object Actions Panel and insert the following ActionScript.
Next, right click on the panSlider instance, select Actions to open the Object Actions Panel and insert the following ActionScript.
The sliders are ready for action. Now we need to create a sound object to control.
|» Level Intermediate|
Rating: 8 Votes: 90
|Primary goal in life is to play 'surf instrumental' music and program in Flash...|
|Download the files used in this tutorial.|
|Download (276 kb)|
|More help? Search our boards for quick answers!|