题目
英语翻译
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);
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);
提问时间:2021-02-18
答案
//创建一个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); //指定键盘的事件侦听器
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); //指定键盘的事件侦听器
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
最新试题
热门考点
- 123.的道理
- 2一支队伍匀速前进,通讯员从队尾赶到队前传达命令后立即返回40 m到达队尾时,队伍已前进了200 m,在整个过程中,通讯员共用了40
- 3江苏省人民出版社八年级数学暑假乐园
- 4夜,来临了.这是一个非常幽美的海滨的夏夜.
- 5Happening once again means to be the beginning of a habit .
- 6在二次函数y=ax平方+bx+c的图像上有点A(2,y1),B(-2,y2),当y1-y2=-12时,b的值是?
- 7在数列(an)中 an≠0 an=3a(n-1)/3+2a(n-1)(n≥2)【n-1为a的角标】 a1=3/5(1)求证数列(1/an)为等差数列
- 8要英语短文啦.我的生日聚会.最少70字.要用正在进行时
- 9——When shall we meet again next time?——______day is all right.A.any B.None C.Either
- 10阴极射线是原子核发生衰变形成的电子流,它是一种电磁波