To create a sliding volume control:
Drag a button to the Stage.
Select the button and select Modify > Convert to Symbol. Be careful to select the movie clip behavior.
This creates a movie clip with the button on its first frame.
Select the movie clip and select Edit > Edit Selected.
Select the button and select Window > Development Panels > Actions.
Enter the following actions:
on (press) {
startDrag(this, false, left, top, right, bottom);
}
on (release) {
stopDrag();
}
The startDrag() parameters left, top, right, and bottom are variables set in a clip action.
Select Edit > Edit Document to return to the main Timeline.
Select the movie clip on the Stage.
Enter the following actions:
onClipEvent (load) {
top = _y;
bottom = _y;
left = _x;
right = _x+100;
_x += 100;
}
onClipEvent (enterFrame) {
_parent.song.setVolume(_x-left);
}
Select Control > Test Movie to use the volume slider