英语翻译

问题描述:

英语翻译
var bgsound = new Sound();
bgsound.attachSound("sound 49");
bgsound.start(0,999);
var flag="";
function GotoPosition(n)
{
gotoAndPlay("S"+n);
}
var objlistener = new Object();
objlistener.onKeyDown = function()
{
if(Key.getCode()== Key.HOME)
gotoAndPlay("BEGIN");
var keycode = Key.getCode();
switch(keycode)
{
case 49:flag="1";gotoAndPlay("End");break;
case 50:flag="2";gotoAndPlay("End");break;
case 51:flag="3";gotoAndPlay("End");break;
case 52:flag="4";gotoAndPlay("End");break;
case 53:flag="5";gotoAndPlay("End");break;
case 83:stopAllSounds();break;
case 192:gotoAndPlay(1);break;
case Key.BACKSPACE:(new MovieClipLoader).unloadClip(mc1);gotoAndPlay("Begin");break;
case 188:bgsound.setVolume(bgsound.getVolume()-5);break;
case 190:bgsound.setVolume(bgsound.getVolume()+5);break;
case Key.SPACE:bgsound.start(0,999);break;
}
}
Key.addListener(objlistener);

//创建一个Sound声音对象
var bgsound = new Sound();
bgsound.attachSound("sound 49"); //在声音对象上附加音频链接
bgsound.start(0,999); //开始播放
var flag="";
function GotoPosition(n)
{
gotoAndPlay("S"+n);
}
var objlistener = new Object(); //键盘事件的侦听器
//键盘按下键时
objlistener.onKeyDown = function()
{
//如果按下home键
if(Key.getCode()== Key.HOME)
gotoAndPlay("BEGIN"); //跳到开始帧
var keycode = Key.getCode(); //否则其它键 就获取按键代码
//作一个switch的分支判断
switch(keycode)
{
//按1 2 3 4 5 时 都跳到结束帧
case 49:flag="1";gotoAndPlay("End");break;
case 50:flag="2";gotoAndPlay("End");break;
case 51:flag="3";gotoAndPlay("End");break;
case 52:flag="4";gotoAndPlay("End");break;
case 53:flag="5";gotoAndPlay("End");break;
//s键 停止播放下面的类同 具体看键盘码
case 83:stopAllSounds();break;
case 192:gotoAndPlay(1);break;
case Key.BACKSPACE:(new MovieClipLoader).unloadClip(mc1);gotoAndPlay("Begin");break;
case 188:bgsound.setVolume(bgsound.getVolume()-5);break;
case 190:bgsound.setVolume(bgsound.getVolume()+5);break;
case Key.SPACE:bgsound.start(0,999);break;

}

}
Key.addListener(objlistener); //指定键盘的事件侦听器