我正在使用 AS2.0 并试图制作一部 .swf 电影,该电影在一段时间内停止 movieClip 并在另一个限制内播放。这就是我到目前为止所得到的,它可以在没有循环和 if 条件的情况下工作,但我需要有一个循环,这样它才能按我的意愿工作。请帮助我,谢谢。
myDate = new Date();
hrs = myDate.getHours();
while ( hrs >6 && hrs <21) // time range i want the movieclip to stop
{
stop(); // to stop the timeline
Night.stop(); // " Night " is the instance name of the movieclip
hrs = myDate.getHours(); // to update the time
}
stop(); // to stop the timeline
Night.play(); // it's out of the time limit so the movieclip should play