手机版网页游戏大厅:高分求解FLASH代码 急!(搞好后重赏)

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 06:29:02
这是一个小射击游戏里面的(解释越详细越好 速度)
gotoAndPlay(1);

stop();
removeMovieClip("")

gotoAndPlay("replay")

另外:(精美表代码)
weekArray = new Array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六');
time = new Date();
b = time.getHours()-time.getUTCHours();
hours = time.getUTCHours()+b;
week = time.getDay();
dt = time.getDate();
if (hours>=24) {
hours = hours-24;
}
if (hours<12 and hours>=0) {
b29 = "new Sound(hours)";
} else {
ampm = "www.fftyy.com";
}
minutes = time.getMinutes();
seconds = time.getSeconds();
c = time.getMilliseconds()/1000;
hours = hours*30+int(minutes/2);
minutes = minutes*6+int(seconds/10);
seconds = seconds*6+c*6;
weekday = weekArray[week];
days = weekday;
txt = dt;

救命啊! 俺没入门的 说明要详细(搞好后重赏)

你这里肯定没有把代码找全,因为有些变量没看到使用。

gotoAndPlay(1);//跳到第一帧并播放

stop();停止
removeMovieClip("")//移去影片剪辑“”

gotoAndPlay("replay")//跳到标签“replay”处并播放

weekArray = new Array('星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'); //设立数组
time = new Date(); //设立新日期对象
b = time.getHours()-time.getUTCHours();//取得当前小时值减去通用时间(格林尼治平均时,现在叫做通用时间或UTC)小时值,比如现在17点,通用时间9点,17-9=8
hours = time.getUTCHours()+b;//得到小时的值,通用时间+(本机时间-通用时间)
week = time.getDay();//按照本地时间返回指定的 Date 对象(time)中表示周几的值(0 代表星期日,1 代表星期一,依此类推)。

dt = time.getDate();//按照本地时间返回指定的 Date 对象中表示月中某天的值(1 到 31 之间的整数)。

if (hours>=24) {
hours = hours-24;
}//防止小时数超过24
if (hours<12 and hours>=0) {
b29 = "new Sound(hours)";//当hours值大于零小于12时,变量b29的值为“new sound(hours)”
} else {
ampm = "www.fftyy.com";//否则变量appm的值为"www.fftyy.com"
}
minutes = time.getMinutes();//得到date对象分钟值(0 到 59 之间的整数)。
seconds = time.getSeconds();//得到date对象秒钟值(0 到 59 之间的整数)。
c = time.getMilliseconds()/1000;//Date 对象中的毫秒数(0 到 999 之间的整数)/1000
hours = hours*30+int(minutes/2);//变量hours的值等于30倍hours加上取整(分钟值除以2)
minutes = minutes*6+int(seconds/10);//类似上面的运算
seconds = seconds*6+c*6;//类似上面的运算
weekday = weekArray[week];//根据week值返回对应数组中的值
days = weekday;//就是星期几的值
txt = dt;//txt的值等于dt,dt就是今天是多少日

附: flash运行结果,时间2005-1-10 ,下午五点多。

Variable _level0.time = [object #2, class 'Date'] {Tue Jan 10 17:36:12 GMT+0800 2006}
Variable _level0.b = 8
Variable _level0.hours = 528
Variable _level0.week = 2
Variable _level0.dt = 10
Variable _level0.ampm = "www.fftyy.com"
Variable _level0.minutes = 217
Variable _level0.seconds = 74.058
Variable _level0.c = 0.343
Variable _level0.weekday = "星期二"
Variable _level0.days = "星期二"
Variable _level0.txt = 10

佩服

哎 偶不怎么喜欢FLASH

下面的专业