on(release){ _root.提示Movie.gotoAndStop(1); _root.闹铃1.gotoAndStop(1); _root.闹铃2.gotoAndStop(1); _root.time1 = shi+fen+miao;//-----设定提示时间----- _root.激活=false; trace(_root.time1+"/"+_root.激活); } |
ring = "music01";//--提示铃声---------------- time1 = 1;//-------- 设定的提醒时间 ---------- loop = 10;//---------提示音循环次数----------- 激活 = false;//------闹铃激活状态------------- onEnterFrame = function () { //------取得当前时间: 时,分,秒-------\\ myTime = new Date(); h = myTime.getHours(); m = myTime.getMinutes(); s = myTime.getSeconds(); h1 = h; if (h<10) { h1 = "0"+h; } m1 = m; if (m<10) { m1 = "0"+m; } s1 = s; if (s<10) { s1 = "0"+s; } time2 = h1+""+m1+""+s1;//-----当前时间----\\ //----------取得当前日期---------------\\ nowDate=myTime.getFullYear()+"-"+(myTime.getMonth()+1)+"-"+myTime.getDate(); // -------- 设置指针的旋转角度 ---------\\ 时指针._rotation = h*30+(m/2); 分指针._rotation = m*6+(s/10); 秒指针._rotation = s*6; // ----------整点报时---------- if (m == 0) { if (激活 == false) { sound = new Sound(); sound.attachSound(ring); sound.start(0.05,1); 激活 = true; } } // ------------ 闹铃 ------------// function 闹铃() { trace(time1+"----"+time2); if (time1 == time2) { 提示Movie.gotoAndPlay(2); if (激活 == false) { trace("ok"); sound = new Sound(); sound.attachSound(ring); sound.start(0.05, _root.loop); 闹铃1.play(); 闹铃2.play(); 激活 = true; } } } 闹铃(); }; |
Word教程网 | Excel教程网 | Dreamweaver教程网 | Fireworks教程网 | PPT教程网 | FLASH教程网 | PS教程网 |
HTML教程网 | DIV CSS教程网 | FLASH AS教程网 | ACCESS教程网 | SQL SERVER教程网 | C语言教程网 | JAVASCRIPT教程网 |
ASP教程网 | ASP.NET教程网 | CorelDraw教程网 |