actionscript3中怎样按一个我想要的键(比如说a)就让影片播放到第二帧(要具体的代码)
2个回答
展开全部
package
{
import flash.display.MovieClip;
import flash.events.KeyboardEvent;
//文档类
public class Main extends MovieClip {
public function Main()
{
this.stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
}
private function keyDownHandler(e:KeyboardEvent):void
{
switch(e.keyCode)
{
case 65://65是键盘上a的键值
youMC.gotoAndStop(2);//youMC为舞台上你要控制的影片剪辑
}
}
}
}
{
import flash.display.MovieClip;
import flash.events.KeyboardEvent;
//文档类
public class Main extends MovieClip {
public function Main()
{
this.stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownHandler);
}
private function keyDownHandler(e:KeyboardEvent):void
{
switch(e.keyCode)
{
case 65://65是键盘上a的键值
youMC.gotoAndStop(2);//youMC为舞台上你要控制的影片剪辑
}
}
}
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询