Добрый день всем, помогите разобраться с кодом.
Есть код экшена (ActionScript 3.0) - часов с 4-мя часовыми поясами.
Сделал всё так как написано в статье было (
http://naublog.ru/2010/06/analogovye...tionscript3-0/), но к сожалению скрипт так и не работает…
Не могу понять в чем дело!.. Так как сам только начал недавно изучать Flash.
Могли бы вы подробнее описать как правильно создать такие часики или в чём там ошыбка.
Очень важный вопрос для меня. Заранее благодаерн за ответ.
Вот код самого скрипта:

Код:
stage.addEventListener(Event.ENTER_FRAME, enterFrame);
function enterFrame(e:Event):void {
var currentDate:Date = new Date();
var currentMonth = currentDate.month; // 0-11
var currentDay = currentDate.day; //0-6 (0-Sunday)
var currentD = currentDate.date; //1-31
var sec:Number = currentDate.getUTCSeconds();
var min:Number = currentDate.getUTCMinutes();
var hour:Number = currentDate.getUTCHours();
if( (currentMonth==2 && (currentD > 24+currentDay)) || (currentMonth>2 && currentMonth<9) || (currentMonth==9 && (currentD < 24+currentDay)) ){
//New-York
//NewSecLine.rotation = 6*sec;
NewMinLine.rotation = 6*min + sec*0.1;
NewHLine.rotation = 30*(hour-4) + min/2;
//London
//SecLine.rotation = 6*sec;
MinLine.rotation = 6*min + sec*0.1;
HLine.rotation = 30*(hour+1) + min/2;
//Moscow
//MosSecLine.rotation = 6*sec;
MosMinLine.rotation = 6*min + sec*0.1;
MosHLine.rotation = 30*(hour+4) + min/2;
//Tokio
//TokSecLine.rotation = 6*sec;
TokMinLine.rotation = 6*min + sec*0.1;
TokHLine.rotation = 30*(hour+10) + min/2;
}else{
//New-York
//NewSecLine.rotation = 6*sec;
NewMinLine.rotation = 6*min + sec*0.1;
NewHLine.rotation = 30*(hour-5) + min/2;
//London
//SecLine.rotation = 6*sec;
MinLine.rotation = 6*min + sec*0.1;
HLine.rotation = 30*hour + min/2;
//Moscow
//MosSecLine.rotation = 6*sec;
MosMinLine.rotation = 6*min + sec*0.1;
MosHLine.rotation = 30*(hour+3) + min/2;
//Tokio
//TokSecLine.rotation = 6*sec;
TokMinLine.rotation = 6*min + sec*0.1;
TokHLine.rotation = 30*(hour+9) + min/2;
}
}