Frame 1
g_strClockLinkURL = "http://www.clocklink.com";
g_strLinkURL = "";
g_strID = "";
g_strClockName = "5020";
g_strDateFormat = DateFormat;
g_fDisplay = eval("FALSE");
g_nRandom = Math.round(Math.random() * 1000);
name.text = "Loading ...";
var lvSend = new LoadVars();
var lvReceive = new LoadVars();
var strTimeGenURL = (g_strClockLinkURL + "/scripts/PSP/ClockLink/TimeGen.dll?");
strTimeGenURL = strTimeGenURL + ("ID=" + g_strID);
strTimeGenURL = strTimeGenURL + ("&Clock=" + g_strClockName);
strTimeGenURL = strTimeGenURL + ("&TimeZone=" + TimeZone);
strTimeGenURL = strTimeGenURL + ("&Place=" + Place);
strTimeGenURL = strTimeGenURL + ("&DateFormat=" + g_strDateFormat);
strTimeGenURL = strTimeGenURL + ("&Random=" + g_nRandom);
if (ClockLinkGoGoGo != undefined) {
g_strLinkURL = ClockLinkGoGoGo;
}
trace(strTimeGenURL);
var dLocalNow = new Date();
g_nLocalBaseTime = dLocalNow.getTime();
g_nServerBaseTime = g_nLocalBaseTime;
lvSend.sendAndLoad(strTimeGenURL, lvReceive);
lvReceive.onLoad = function () {
var _local3 = new Date(this.Year, this.Month - 1, this.Day, this.Hour, this.Minute, this.Second, this.Millisecond);
var _local2 = new Date();
g_nServerBaseTime = _local3.getTime() + ((_local2.getTime() - g_nLocalBaseTime) / 2);
g_nLocalBaseTime = _local2.getTime();
if (this.LinkURL != undefined) {
g_strLinkURL = this.LinkURL;
}
g_fDisplay = eval("TRUE");
};
Frame 2
dateArray = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
monthArray = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
if (g_fDisplay == eval("TRUE")) {
place = Place;
var dLocalNow = new Date();
call(function () {
});
var dDisplayNow = new Date();
var nLocalNowTime = dLocalNow.getTime();
var nBias = (nLocalNowTime - g_nLocalBaseTime);
var nDisplayNowTime = (g_nServerBaseTime + nBias);
dDisplayNow.setTime(nDisplayNowTime);
var vYear = dDisplayNow.getFullYear();
var vYear2Digit = (vYear - 2000);
var vMonth = (dDisplayNow.getMonth() + 1);
var vDay = dDisplayNow.getDate();
var vDate = dateArray[dDisplayNow.getDay()];
var vHour = dDisplayNow.getHours();
var vMinutes = dDisplayNow.getMinutes();
var vSeconds = dDisplayNow.getSeconds();
var vAmpm;
var vNameOfMonth = monthArray[dDisplayNow.getMonth()];
var vDateFormatArray = g_strDateFormat.split("-");
if (vHour > 11) {
vAmpm = "PM";
} else {
vAmpm = "AM";
}
if (vHour > 12) {
vHour = vHour - 12;
}
if (String(vMonth).length == 1) {
vMonth = "" + vMonth;
}
if (String(vDay).length == 1) {
vDay = "" + vDay;
}
if (String(vHour).length == 1) {
vHour = "" + vHour;
}
if (String(vMinutes).length == 1) {
vMinutes = "0" + vMinutes;
}
if (String(vSeconds).length == 1) {
vSeconds = "0" + vSeconds;
}
if (String(vYear2Digit).length == 1) {
vYear2Digit = "0" + vYear2Digit;
}
calender = "";
if (vDateFormatArray.length > 0) {
i = 0;
for ( ; i < vDateFormatArray.length ; i++) {
if (vDateFormatArray[i] == "YYYY") {
calender = calender + vYear;
} else if (vDateFormatArray[i] == "YY") {
calender = calender + vYear2Digit;
} else if (vDateFormatArray[i] == "MM") {
calender = calender + vMonth;
} else if (vDateFormatArray[i] == "mm") {
calender = calender + vNameOfMonth;
} else if (vDateFormatArray[i] == "DD") {
calender = calender + vDay;
} else {
continue;
}
if (i < (vDateFormatArray.length - 1)) {
calender = calender + "-";
}
}
calender = (calender + " ") + vDate;
} else {
calender = (((((vYear + " . ") + vMonth) + " . ") + vDay) + " ") + vDate;
}
clock = ((((vHour + ":") + vMinutes) + ":") + vSeconds) + vAmpm;
}
Frame 3
gotoAndPlay (2);
Symbol 24 MovieClip Frame 6
stop();
Symbol 26 Button
on (release) {
if (g_strLinkURL == "") {
g_strLinkURL = "www.clocklink.com";
}
var strClickManURL = (g_strClockLinkURL + "/scripts/PSP/ClockLink/ClickMan.dll?");
strClickManURL = strClickManURL + ("ID=" + ID);
strClickManURL = strClickManURL + ("&Clock=" + g_strClockName);
strClickManURL = strClickManURL + ("&Link=" + g_strLinkURL);
strClickManURL = strClickManURL + ("&Random=" + g_nRandom);
var lvSend = new LoadVars();
lvSend.load(strClickManURL);
getURL ("http://" + g_strLinkURL, "_blank");
}