这段flash代码谁能告诉我什么意思谢谢啦!

来源:百度知道 编辑:UC知道 时间:2024/05/27 06:56:11
onClipEvent(load)
{
_root.soundstatus="on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume=100;
minvolume=0;
}

onClipEvent(enterFrame)
{
if(_root.soundstatus=="on") {step=5}
if(_root.soundstatus=="off") {step=-5}

maxvolume+=step;

if (maxvolume>100) {maxvolume=100;}
if (maxvolume<0) {maxvolume=0;}

_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
}

/*是个音乐播放器的 部分代码*/
onClipEvent(load)
{
_root.soundstatus="on";
_root.mySound = new Sound(_level0);
_root.mySound2 = new Sound(_level1);
_root.mySound3 = new Sound(_level2);
_root.mySound4 = new Sound(_level3);
_root.mySound5 = new Sound(_level4);
maxvolume=100;
minvolume=0;
}
//进行声音的加载,音量的初始化

onClipEvent(enterFrame)
{
if(_root.soundstatus=="on") {step=5}
if(_root.soundstatus=="off") {step=-5}

maxvolume+=step;

if (maxvolume>100) {maxvolume=100;}
if (maxvolume<0) {maxvolume=0;}

_root.mySound.setVolume(maxvolume);
_root.mySound2.setVolume(maxvolume);
_root.mySound3.setVolume(maxvolume);
_root.mySound4.setVolume(maxvolume);
_root.mySound5.setVolume(maxvolume);
}
//是音量的控制

(由于没见到代码的环境,仅为初步分析,错误是难免的)

挂件~~一些道具,类似醒目灯..