Frame 1
g_strClockLinkURL = "www.clocklink.com";
g_strLinkURL = "";
g_strID = "";
g_strClockName = "5005-Green";
g_strDateFormat = DateFormat;
g_strTimeFormat = TimeFormat;
g_fDisplay = eval("FALSE");
g_nRandom = Math.round(Math.random() * 1000);
var lvSend = new LoadVars();
var lvReceive = new LoadVars();
var strTimeGenURL = (("http://" + g_strClockLinkURL) + "/scripts/PSP/ClockLink/TimeGen.dll?");
strTimeGenURL = strTimeGenURL + ("ID=" + g_strID);
strTimeGenURL = strTimeGenURL + ("&Clock=" + g_strClockName);
strTimeGenURL = strTimeGenURL + ("&TimeZone=" + TimeZone);
strTimeGenURL = strTimeGenURL + ("&DateFormat=" + g_strDateFormat);
strTimeGenURL = strTimeGenURL + ("&TimeFormat=" + g_strTimeFormat);
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 _local1 = this;
var _local3 = new Date(_local1.Year, _local1.Month - 1, _local1.Day, _local1.Hour, _local1.Minute, _local1.Second, _local1.Millisecond);
var _local2 = new Date();
g_nServerBaseTime = _local3.getTime() + ((_local2.getTime() - g_nLocalBaseTime) / 2);
g_nLocalBaseTime = _local2.getTime();
if (_local1.LinkURL != undefined) {
g_strLinkURL = _local1.LinkURL;
}
g_fDisplay = eval("TRUE");
};
Frame 2
function displayHour(vHour) {
var _local1 = [1, 1, 1, 1, 1, 1, 1];
getDigitalFormat(_local1, Math.floor(vHour / 10));
if (_local1[0] == 1) {
h1lt.gotoAndPlay(1);
} else {
h1lt.gotoAndPlay(6);
}
if (_local1[1] == 1) {
h1t.gotoAndPlay(1);
} else {
h1t.gotoAndPlay(6);
}
if (_local1[2] == 1) {
h1rt.gotoAndPlay(1);
} else {
h1rt.gotoAndPlay(6);
}
if (_local1[3] == 1) {
h1rb.gotoAndPlay(1);
} else {
h1rb.gotoAndPlay(6);
}
if (_local1[4] == 1) {
h1b.gotoAndPlay(1);
} else {
h1b.gotoAndPlay(6);
}
if (_local1[5] == 1) {
h1lb.gotoAndPlay(1);
} else {
h1lb.gotoAndPlay(6);
}
if (_local1[6] == 1) {
h1m.gotoAndPlay(1);
} else {
h1m.gotoAndPlay(6);
}
getDigitalFormat(_local1, Math.floor(vHour % 10));
if (_local1[0] == 1) {
h2lt.gotoAndPlay(1);
} else {
h2lt.gotoAndPlay(6);
}
if (_local1[1] == 1) {
h2t.gotoAndPlay(1);
} else {
h2t.gotoAndPlay(6);
}
if (_local1[2] == 1) {
h2rt.gotoAndPlay(1);
} else {
h2rt.gotoAndPlay(6);
}
if (_local1[3] == 1) {
h2rb.gotoAndPlay(1);
} else {
h2rb.gotoAndPlay(6);
}
if (_local1[4] == 1) {
h2b.gotoAndPlay(1);
} else {
h2b.gotoAndPlay(6);
}
if (_local1[5] == 1) {
h2lb.gotoAndPlay(1);
} else {
h2lb.gotoAndPlay(6);
}
if (_local1[6] == 1) {
h2m.gotoAndPlay(1);
} else {
h2m.gotoAndPlay(6);
}
}
function displayMinute(vMinute) {
var _local1 = [1, 1, 1, 1, 1, 1, 1];
getDigitalFormat(_local1, Math.floor(vMinute / 10));
if (_local1[0] == 1) {
m1lt.gotoAndPlay(1);
} else {
m1lt.gotoAndPlay(6);
}
if (_local1[1] == 1) {
m1t.gotoAndPlay(1);
} else {
m1t.gotoAndPlay(6);
}
if (_local1[2] == 1) {
m1rt.gotoAndPlay(1);
} else {
m1rt.gotoAndPlay(6);
}
if (_local1[3] == 1) {
m1rb.gotoAndPlay(1);
} else {
m1rb.gotoAndPlay(6);
}
if (_local1[4] == 1) {
m1b.gotoAndPlay(1);
} else {
m1b.gotoAndPlay(6);
}
if (_local1[5] == 1) {
m1lb.gotoAndPlay(1);
} else {
m1lb.gotoAndPlay(6);
}
if (_local1[6] == 1) {
m1m.gotoAndPlay(1);
} else {
m1m.gotoAndPlay(6);
}
getDigitalFormat(_local1, Math.floor(vMinute % 10));
if (_local1[0] == 1) {
m2lt.gotoAndPlay(1);
} else {
m2lt.gotoAndPlay(6);
}
if (_local1[1] == 1) {
m2t.gotoAndPlay(1);
} else {
m2t.gotoAndPlay(6);
}
if (_local1[2] == 1) {
m2rt.gotoAndPlay(1);
} else {
m2rt.gotoAndPlay(6);
}
if (_local1[3] == 1) {
m2rb.gotoAndPlay(1);
} else {
m2rb.gotoAndPlay(6);
}
if (_local1[4] == 1) {
m2b.gotoAndPlay(1);
} else {
m2b.gotoAndPlay(6);
}
if (_local1[5] == 1) {
m2lb.gotoAndPlay(1);
} else {
m2lb.gotoAndPlay(6);
}
if (_local1[6] == 1) {
m2m.gotoAndPlay(1);
} else {
m2m.gotoAndPlay(6);
}
}
function displaySecond(vSecond) {
var _local1 = [1, 1, 1, 1, 1, 1, 1];
getDigitalFormat(_local1, Math.floor(vSecond / 10));
if (_local1[0] == 1) {
s1lt.gotoAndPlay(1);
} else {
s1lt.gotoAndPlay(6);
}
if (_local1[1] == 1) {
s1t.gotoAndPlay(1);
} else {
s1t.gotoAndPlay(6);
}
if (_local1[2] == 1) {
s1rt.gotoAndPlay(1);
} else {
s1rt.gotoAndPlay(6);
}
if (_local1[3] == 1) {
s1rb.gotoAndPlay(1);
} else {
s1rb.gotoAndPlay(6);
}
if (_local1[4] == 1) {
s1b.gotoAndPlay(1);
} else {
s1b.gotoAndPlay(6);
}
if (_local1[5] == 1) {
s1lb.gotoAndPlay(1);
} else {
s1lb.gotoAndPlay(6);
}
if (_local1[6] == 1) {
s1m.gotoAndPlay(1);
} else {
s1m.gotoAndPlay(6);
}
getDigitalFormat(_local1, Math.floor(vSecond % 10));
if (_local1[0] == 1) {
s2lt.gotoAndPlay(1);
} else {
s2lt.gotoAndPlay(6);
}
if (_local1[1] == 1) {
s2t.gotoAndPlay(1);
} else {
s2t.gotoAndPlay(6);
}
if (_local1[2] == 1) {
s2rt.gotoAndPlay(1);
} else {
s2rt.gotoAndPlay(6);
}
if (_local1[3] == 1) {
s2rb.gotoAndPlay(1);
} else {
s2rb.gotoAndPlay(6);
}
if (_local1[4] == 1) {
s2b.gotoAndPlay(1);
} else {
s2b.gotoAndPlay(6);
}
if (_local1[5] == 1) {
s2lb.gotoAndPlay(1);
} else {
s2lb.gotoAndPlay(6);
}
if (_local1[6] == 1) {
s2m.gotoAndPlay(1);
} else {
s2m.gotoAndPlay(6);
}
}
function displayAMPM(vAmpm) {
if (vAmpm == "AM") {
a.gotoAndPlay(1);
p.gotoAndPlay(6);
m.gotoAndPlay(1);
} else if (vAmpm == "PM") {
a.gotoAndPlay(6);
p.gotoAndPlay(1);
m.gotoAndPlay(1);
} else {
a.gotoAndPlay(6);
p.gotoAndPlay(6);
m.gotoAndPlay(6);
}
}
function displayColon(vMilliseconds) {
if (vMilliseconds < 600) {
colon.gotoAndPlay(1);
} else {
colon.gotoAndPlay(6);
}
}
function getDigitalFormat(vFormat, vNumber) {
var _local1 = vFormat;
_local1[0] = 1;
_local1[1] = 1;
_local1[2] = 1;
_local1[3] = 1;
_local1[4] = 1;
_local1[5] = 1;
_local1[6] = 1;
switch (vNumber) {
case 0 :
_local1[6] = 0;
return;
case 1 :
_local1[0] = 0;
_local1[1] = 0;
_local1[4] = 0;
_local1[5] = 0;
_local1[6] = 0;
return;
case 2 :
_local1[0] = 0;
_local1[3] = 0;
return;
case 3 :
_local1[0] = 0;
_local1[5] = 0;
return;
case 4 :
_local1[1] = 0;
_local1[4] = 0;
_local1[5] = 0;
return;
case 5 :
_local1[2] = 0;
_local1[5] = 0;
return;
case 6 :
_local1[2] = 0;
return;
case 7 :
_local1[0] = 0;
_local1[4] = 0;
_local1[5] = 0;
_local1[6] = 0;
return;
case 8 :
return;
case 9 :
_local1[5] = 0;
}
}
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();
var dDisplayNow = new Date();
var nLocalNowTime = dLocalNow.getTime();
var nBias = (nLocalNowTime - g_nLocalBaseTime);
var nDisplayNowTime = (g_nServerBaseTime + nBias);
dDisplayNow.setTime(nDisplayNowTime);
var vHourIn24 = dDisplayNow.getHours();
var vHour = vHourIn24;
var vMinutes = dDisplayNow.getMinutes();
var vSeconds = dDisplayNow.getSeconds();
var vMilliSeconds = dDisplayNow.getMilliseconds();
var vAmpm;
var vNameOfMonth = monthArray[dDisplayNow.getMonth()];
if (vHourIn24 > 11) {
vAmpm = "PM";
} else {
vAmpm = "AM";
}
if (vHourIn24 > 12) {
vHour = vHourIn24 - 12;
}
if (vHour == 0) {
vHour = 12;
}
var vFormatLen = 0;
vFormatLen = String(g_strTimeFormat).length;
if (vFormatLen > 0) {
displayColon(vMilliSeconds);
if (String(g_strTimeFormat).indexOf("HH") != -1) {
displayHour(vHourIn24);
} else {
displayHour(vHour);
}
displayMinute(vMinutes);
displaySecond(vSeconds);
if (String(g_strTimeFormat).indexOf("TT") != -1) {
displayAMPM(vAmpm);
} else {
displayAMPM("");
}
} else {
displayColon(vMilliSeconds);
displayHour(vHour);
displayMinute(vMinutes);
displaySecond(vSeconds);
displayAMPM(vAmpm);
}
}
Frame 3
gotoAndPlay (2);
Symbol 75 MovieClip Frame 6
stop();
Symbol 77 Button
on (release) {
if (g_strLinkURL == "") {
g_strLinkURL = "www.clocklink.com";
}
var strClickManURL = (("http://" + 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");
}
Symbol 78 Button
on (release) {
var strClickManURL = (("http://" + g_strClockLinkURL) + "/scripts/PSP/ClockLink/ClickMan.dll?");
strClickManURL = strClickManURL + ("ID=" + ID);
strClickManURL = strClickManURL + ("&Clock=" + g_strClockName);
strClickManURL = strClickManURL + ("&Link=" + g_strClockLinkURL);
strClickManURL = strClickManURL + ("&Random=" + Math.round(Math.random() * 100000).toString());
trace(strClickManURL);
var lvSend = new LoadVars();
lvSend.load(strClickManURL);
getURL ("http://" + g_strClockLinkURL, "_blank");
}