flash代码 flash代码怎么运行
您好,今天小蚪来为大家解答以上的问题。flash代码相信很多小伙伴还不知道,现在让我们一起来看看吧!
1、//Ifnotdefinedyet,//如果还没有定义if(isLoaded==undefined){//Routinetomoveplayheadtoanewframe//构造函数varupdateFrame(inc){//赋值varnewFrame=_currentframe+inc;//跳到NEWFRAME针gotoAndStop(newFrame);//如果当前针为1if(_root._currentframe==1){]你将黑色时钟和白色时钟都拖入场景中,并将黑色时钟命名为“hei”,白色时钟命名为“bai”(属性-实例名称),然后在这一帧上设置动作://BACK按钮透明度为50不可以再按backBtn._alpha=50;backBtn.enabled=false;{//BACK按钮透明度为100可- concat 联结合并多个字符串以再按backBtn._alpha=100;backBtn.enabled=true;}//如果当前针等于总针数if(_root._currentframe==_root._totalframes){//按钮透明度为50不可以再按forwardBtn._alpha=50;forwardBtn.enabled=false;{//按钮透明度为100可以再按forwardBtn._alpha=100;forwardBtn.enabled=true;}}//Whenforwardispressed//当forwardBtn被按执行函数updateFrame(1);forwardBtn.onPress(){updateFrame(1);}//Whenbackispressed//当backBtn被按执行函数updateFrame(-1);backBtn.onPress(){updateFrame(-1);}//Whenkeyboardkeysarepressed//建立新的OBJECTvarkeyListener=newObject();//当键盘被按下keyListener.onKeyDown(){//如果是Left键if(Key.isDown(37)){//调用函数updateFrame(-1);if(Key.isDown(38)){//如果是UP键执行函数updateFrame(-(_currentframe-1));if(Key.isDown(39)){//如果是right键执行函数updateFrame(1);if(Key.isDown(40)){//如果是down键执行函数updateFrame(_totalFrames+1);}}//建立Key.addListener(keyListener);//CallupdateFrameatfirsttogetstatescorrectatstart//执行函数updateFrame();}//Setloadedtoprntredefinition//赋值this.isLoaded=true;stop();。
本文到这结束,希望上面文章对大家有所帮助。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系 836084111@qq.com 删除。