简单说一下做法,具体看我的源文件。
1.导入四个音乐文件,在库中右键-链接,标识符分别为:s01 s02 s03 s04
2.做一音量控件,点击控件加AS:
on (press) {
startDrag(this, true, left, top, right, bottom);
}
on (release) {
stopDrag();
}
onClipEvent (load) {
top = _y;
bottom = _y;
left = _x;
right = _x+150;
_x += 75;
}
onClipEvent (enterFrame) {
_root.mySound.setVolume(_x-left);
}