资源描述:
《flash动画代码大全》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、适时时间代码:this.createTextField("my_year",1,100,100,300,100);this.createTextField("my_month",2,200,100,300,100);this.createTextField("my_day",3,300,100,300,100);this.createTextField("my_hours",4,100,150,300,100);this.createTextField("my_minutes",5,200,150,300,100);
2、this.createTextField("my_seconds",6,300,150,300,100);this.onEnterFrame=function(){varmy_date:Date=newDate();my_txt.text=my_date.getSeconds();my_year.text=my_date.getFullYear()+"年";my_month.text=int(int(my_date.getMonth())+1)+"月";my_day.text=my_date.getDate()+"日
3、";my_hours.text=my_date.getHours()+"时";my_minutes.text=my_date.getMinutes()+"分";my_seconds.text=my_date.getSeconds()+"秒";};两个mc相撞问题:我做了两个MC,分别是jj和oo,,oo是一个正方形,jj是一个圆,影片剪辑的动作是on(keyPress""){this._x+=5;}两个影片剪辑同在一帧上,帧上的动作是:_root.onEnterFrame=function(){if(j
4、j.hitTest(oo)){oo._x+=5;}};我想实现的是jj向右移动遇到oo,然后jj推着oo一起移动,类似于以推箱子的小游戏。问题是jj遇到oo后照样跑了,oo动都不动,望指点。判断i能不能被2整除if(i%2==0){otherstaffoftheCentre.Duringthewar,ZhuwastransferredbacktoJiangxi,andDirectorofthenewOfficeinJingdezhen,JiangxiCommitteeSecretary.Startingin1939s
5、ervedasrecorderoftheWestNorthOrganization,SecretaryoftheSpecialCommitteeAfterthevictoryofthelongMarch,hehasbeentheNorthwestOfficeoftheFederationofStateenterprisesMinister,ShenmufuguSARmissions,DirectorofNingxiaCountypartyCommitteeSecretaryandrecorderoftheCounty
6、partyCommitteeSecretary,Ministersandd=2//能被2整除}else{d=1;}在某帧上停留一定的时间stop(); //停止播放影片varfantast=setInterval(go,5000); //设置每5秒钟调用一次go()函数。functiongo(){ //自定义函数 play(); //函数内容,就是继续播放影
7、片。 clearInterval(fantast); //清除setInterval()轮询}在影片剪辑上写下面代码播放点击时调用库中的另外影片剪辑(这个影片剪辑属性标识符为对应的“h”+n)onClipEvent(load){vari=0;}on(press){++i;varn=random(3);attachMovie("h"+n,"mc"+i,i);this["mc"+i]._x=this._xmouse;this["mc"+i]._y=this._ymouse;this["mc"+i].
8、_rotation=random(5)*120;}随机改变颜色:colorpy1=random(255);colorpy2=random(255);colorpy3=random(255);mycolor=newColor(eval("a"+i));myobject={rb:colorpy1,gb:colorpy2,bb:colorpy3};o