var array:Array = new Array(9, 11, 0, 9, 13, 36);
var array1:Array = new Array(9, 11, 0, 9, 16, 0);
var time:Date = new Date();
taday = time.getDay();
if (taday == 1) {
for (i=1; i<=6; i++) {
if (Number(array1[i-1])<10) {
_root["T"+i] = "0"+array1[i-1];
} else {
_root["T"+i] = array1[i-1];
}
}
A = "运动员进行曲:";
B = "共和国国歌:";
} else {
for (i=1; i<=6; i++) {
if (Number(array[i-1])<10) {
_root["T"+i] = "0"+array[i-1];
} else {
_root["T"+i] = array[i-1];
}
}
A = "运动员进行曲:";
B = "旭日东升:";
}
if (time.getHours() == T4 && time.getMinutes()>T5 && time.getSeconds()>T6) {
T = "已超时!不能播放文件!";
} else {
T = "有文件等待播放,请勿关闭!谢谢!";
}
var Paopao:MovieClip = _root.createEmptyMovieClip("paopao", _root.getNextHighestDepth());
Paopao.onEnterFrame = function() {
if (random(2) == 0) {
shuipao = Paopao.attachMovie("qipao", "qipao", Paopao.getNextHighestDepth());
shuipao._x = random(350);
shuipao._y = 80;
shuipao._alpha = random(80);
shudu = random(2)+1;
shuipao._xscale = shuipao._yscale=random(80);
shuipao.onEnterFrame = function() {
this._y -= shudu;
if (this._y<=0) {
this.removeMovieClip();
}
updateAfterEvent();
};
}
};
function shijian() {
var time:Date = new Date();
taday = time.getDay();
if (time.getHours()<10) {
shi = "0"+time.getHours();
} else {
shi = time.getHours();
}
if (time.getMinutes()<10) {
fen = "0"+time.getMinutes();
} else {
fen = time.getMinutes();
}
if (time.getSeconds()<10) {
miao = "0"+time.getSeconds();
} else {
miao = time.getSeconds();
}
Ts = shi+":"+fen+":"+miao;
if (taday == 1) {
if (T1 == time.getHours() && T2 == time.getMinutes() && T3 == time.getSeconds()) {
var sound:Sound = new Sound();
sound.attachSound("运动员进行曲");
sound.start();
T = "正在播放:"+"运动员进行曲.mp3";
sound.onSoundComplete = function() {
T = "还有文件等待播放,请勿关闭!谢谢!";
};
}
if (T4 == time.getHours() && T5 == time.getMinutes() && T6 == time.getSeconds()) {
var sound1:Sound = new Sound();
sound1.attachSound("国歌");
sound1.start();
T = "正在播放:"+"国歌.mp3";
sound1.onSoundComplete = function() {
T = "文件播放结束,可以关闭!";
};
}
} else {
if (T1 == time.getHours() && T2 == time.getMinutes() && T3 == time.getSeconds()) {
var sound:Sound = new Sound();
sound.attachSound("运动员进行曲");
sound.start();
T = "正在播放:"+"运动员进行曲.mp3";
sound.onSoundComplete = function() {
T = "还有文件等待播放,请勿关闭!谢谢!";
};
}
if (T4 == time.getHours() && T5 == time.getMinutes() && T6 == time.getSeconds()) {
var sound1:Sound = new Sound();
sound1.attachSound("旭日东升");
sound1.start();
T = "正在播放:"+"旭日东升.mp3";
sound1.onSoundComplete = function() {
T = "文件播放结束,可以关闭!";
};
}
}
}
setInterval(shijian, 1000);
课间操定时播音源代码
原创
©著作权归作者所有:来自51CTO博客作者wch3419的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
【小白源代码】小区物业管理系统
基于SpringBoot实现的小区物业管理系统是为物业管理打造的一款在线管理平台,它可以实时完成信息处理,对小区信息、住户等进行在线管理,使其系统化和规范化。
SpringBoot Vue 系统源码 课程设计