Frame 1
header = "<header><vrs>2</vrs><gid>493</gid><mid>0</mid><dat>2010-12-13 04:31:55</dat></header>";
values = "<parameters><element0><pid></pid><val></val><par>-1</par></element0><element1><pid>6167</pid><val>40</val><par>-1</par></element1><element2><pid>6168</pid><val>50</val><par>-1</par></element2><element3><pid>6171</pid><val>50</val><par>-1</par></element3><element4><pid>6172</pid><val>20</val><par>-1</par></element4><element5><pid>6173</pid><val>center</val><par>-1</par></element5><element6><pid>6218</pid><val>342</val><par>-1</par></element6><element7><pid></pid><val></val><par>-1</par></element7><element8><pid></pid><val></val><par>-1</par></element8><element9><pid>6174</pid><val>2</val><par>-1</par></element9><element10><pid>6177</pid><val>30</val><par>-1</par></element10><element11><pid>6180</pid><val>60</val><par>-1</par></element11><element12><pid>6183</pid><val>30</val><par>-1</par></element12><element13><pid>6186</pid><val>0x333333</val><par>-1</par></element13><element14><pid>6189</pid><val>0xDDDDDD</val><par>-1</par></element14><element15><pid></pid><val></val><par>-1</par></element15><element16><pid>6175</pid><val>2</val><par>-1</par></element16><element17><pid>6178</pid><val>30</val><par>-1</par></element17><element18><pid>6181</pid><val>60</val><par>-1</par></element18><element19><pid>6184</pid><val>30</val><par>-1</par></element19><element20><pid>6187</pid><val>0x333333</val><par>-1</par></element20><element21><pid>6190</pid><val>0xDDDDDD</val><par>-1</par></element21><element22><pid></pid><val></val><par>-1</par></element22><element23><pid>6176</pid><val>2</val><par>-1</par></element23><element24><pid>6179</pid><val>30</val><par>-1</par></element24><element25><pid>6182</pid><val>60</val><par>-1</par></element25><element26><pid>6185</pid><val>30</val><par>-1</par></element26><element27><pid>6188</pid><val>0x333333</val><par>-1</par></element27><element28><pid>6191</pid><val>0xDDDDDD</val><par>-1</par></element28><element29><pid></pid><val></val><par>-1</par></element29><element30><pid>6169</pid><val>false</val><par>-1</par></element30><element31><pid>6192</pid><val>0</val><par>-1</par></element31><element32><pid>6193</pid><val>16</val><par>-1</par></element32><element33><pid>6194</pid><val>0x333333</val><par>-1</par></element33><element34><pid></pid><val></val><par>-1</par></element34><element35><pid>6170</pid><val>true</val><par>-1</par></element35><element36><pid>6195</pid><val>0</val><par>-1</par></element36><element37><pid>6196</pid><val>16</val><par>-1</par></element37><element38><pid>6197</pid><val>0x333333</val><par>-1</par></element38><element39><pid></pid><val></val><par>-1</par></element39><element40><pid>6198</pid><val>25</val><par>-1</par></element40><element41><pid>6201</pid><val>25</val><par>-1</par></element41><element42><pid>6199</pid><val>20</val><par>-1</par></element42><element43><pid>6200</pid><val>10</val><par>-1</par></element43><element44><pid></pid><val></val><par>-1</par></element44><element45><pid>6166</pid><val>000000</val><par>-1</par></element45><element46><pid>6163</pid><val></val><par>-1</par></element46><element47><pid>6164</pid><val></val><par>-1</par></element47><element48><pid></pid><val></val><par>-1</par></element48><element49><pid>6315</pid><val>0_493_0</val><par>-1</par></element49></parameters>";
getvalue = function (gval, gtype, defval) {
ngval = gval;
if (gtype == 0) {
if (isNaN(ngval) == false) {
ngval = Number(ngval);
} else {
ngval = defval;
}
}
if (gtype == 1) {
if (ngval == "false") {
ngval = false;
} else if (ngval == "true") {
ngval = true;
} else {
ngval = defval;
}
}
return(ngval);
};
marginleft = getvalue("25", 0, 20);
marginright = getvalue("25", 0, 20);
margintop = getvalue("20", 0, 20);
marginbottom = getvalue("10", 0, 20);
setdimensions = function (px, py) {
if (sizedone == true) {
return(undefined);
}
sizedone = true;
width = (px + marginleft) + marginright;
height = (py + margintop) + marginbottom;
width = Math.ceil(width);
height = Math.ceil(height);
hideLinkBack = "0_493_0".split("_");
if (hideLinkBack[0] == false) {
this.attachMovie("linkBack", "linkBack", 1000, {movieWidth:width, movieHeight:height, xPosition:"right", yPosition:"bottom", hBorders:1, vBorders:0, upAlpha:50, overAlpha:80, generatorId:hideLinkBack[1], exampleId:hideLinkBack[2]});
}
if ((_root.autoWidth == "1") || (_root.autoHeight == "1")) {
getURL (((((((((("javascript:flashVortexSetFlashSize('" + _root.divId) + "',") + _root.autoWidth) + ",") + _root.autoHeight) + ",") + ((width == null) ? 0 : (width))) + ",") + ((height == null) ? 0 : (height))) + ")");
}
};
attachMovie("flip_clock", "clock", getNextHighestDepth());
Symbol 2 MovieClip Frame 1
this.onMouseMove = function () {
this.predX = (_root._xmouse - this._x) * 5;
this.predY = (_root._ymouse - this._y) * 5;
this._x = _root._xmouse;
this._y = _root._ymouse;
};
Symbol 10 Button
on (rollOver) {
linkBack._alpha = 100;
}
on (rollOut) {
linkBack._alpha = overAlpha;
}
on (release) {
getURL ((("http://www.flashvortex.com/referer.php?generatorId=" + generatorId) + "&exampleId=") + exampleId, "_top");
}
Symbol 11 MovieClip [linkBack] Frame 1
this.onEnterFrame = function () {
if (start == true) {
if (((((_root._xmouse + this.mouseCheck.predX) > movieWidth) || ((_root._ymouse + this.mouseCheck.predY) > movieHeight)) || ((_root._xmouse + this.mouseCheck.predX) < 0)) || ((_root._ymouse + this.mouseCheck.predY) < 0)) {
mouseOn = false;
} else {
mouseOn = true;
}
}
if (mouseOn == true) {
if (linkBack._alpha < overAlpha) {
linkBack._alpha = linkBack._alpha + showSpeed;
}
} else if (linkBack._alpha > upAlpha) {
linkBack._alpha = linkBack._alpha - hideSpeed;
}
};
this.onMouseMove = function () {
start = true;
};
if (movieWidth == undefined) {
movieWidth = Stage.width;
}
if (movieHeight == undefined) {
movieHeight = Stage.height;
}
if (hBorders == undefined) {
hBorders = 1;
}
if (vBorders == undefined) {
vBorders = 0;
}
if (xPosition == undefined) {
xPosition = "right";
}
if (yPosition == undefined) {
yPosition = "bottom";
}
if (upAlpha == undefined) {
upAlpha = 50;
}
if (overAlpha == undefined) {
overAlpha = 80;
}
if (showSpeed == undefined) {
showSpeed = 4;
}
if (hideSpeed == undefined) {
hideSpeed = 3;
}
linkBack._alpha = upAlpha;
start = false;
if (typeof(xPosition) == "string") {
if (xPosition == "left") {
linkBack._x = hBorders;
}
if (xPosition == "center") {
linkBack._x = Math.floor((movieWidth - linkBack._width) / 2);
}
if (xPosition == "right") {
linkBack._x = (movieWidth - linkBack._width) - hBorders;
}
} else {
linkBack._x = xPosition;
}
if (typeof(yPosition) == "string") {
if (yPosition == "top") {
linkBack._y = vBorders;
}
if (yPosition == "middle") {
linkBack._y = Math.floor((movieHeight - linkBack._height) / 2);
}
if (yPosition == "bottom") {
linkBack._y = (movieHeight - linkBack._height) - vBorders;
}
} else {
linkBack._y = yPosition;
}
stop();
Symbol 16 MovieClip [flip_clock] Frame 1
getvalue = _parent.getvalue;
flipheight = getvalue("40", 0, 40);
flipspeed = getvalue("50", 0, 50);
flipspeed = 55 - flipspeed;
alphaspeed = getvalue("50", 0, 50);
alphaspeed = 55 - alphaspeed;
numbergap = getvalue("20", 0, 20);
numberverticalalignment = getvalue("center", 2, "bottom");
hourdigitgap = getvalue("2", 0, 2);
minutedigitgap = getvalue("2", 0, 2);
seconddigitgap = getvalue("2", 0, 2);
hournumberwidth = getvalue("30", 0, 40);
minutenumberwidth = getvalue("30", 0, 40);
secondnumberwidth = getvalue("30", 0, 40);
hournumberheight = getvalue("60", 0, 100);
minutenumberheight = getvalue("60", 0, 80);
secondnumberheight = getvalue("60", 0, 60);
hournumbertextsize = getvalue("30", 0, 50);
minutenumbertextsize = getvalue("30", 0, 50);
secondnumbertextsize = getvalue("30", 0, 50);
hournumbertextcolor = getvalue("0x333333", 0, 3355443);
minutenumbertextcolor = getvalue("0x333333", 0, 3355443);
secondnumbertextcolor = getvalue("0x333333", 0, 3355443);
hournumberbackcolor = getvalue("0xDDDDDD", 0, 14540253);
minutenumberbackcolor = getvalue("0xDDDDDD", 0, 14540253);
secondnumberbackcolor = getvalue("0xDDDDDD", 0, 14540253);
military = getvalue("false", 1, false);
ampmmargin = getvalue("0", 0, 0);
ampmtextsize = getvalue("16", 0, 16);
ampmcolor = getvalue("0x333333", 0, 3355443);
showdate = getvalue("true", 1, true);
datemargin = getvalue("0", 0, 0);
datetextsize = getvalue("16", 0, 16);
datecolor = getvalue("0x333333", 0, 3355443);
setcolor = function (colormov, colornum) {
clr = new Color(colormov);
clr.setRGB(colornum);
};
_alpha = 0;
attachMovie("clocknumber", "hour1", getNextHighestDepth());
attachMovie("clocknumber", "hour2", getNextHighestDepth());
attachMovie("clocknumber", "minute1", getNextHighestDepth());
attachMovie("clocknumber", "minute2", getNextHighestDepth());
attachMovie("clocknumber", "second1", getNextHighestDepth());
attachMovie("clocknumber", "second2", getNextHighestDepth());
currentx = 0;
maxnumberheight = 0;
setnumber = function (number1, number2, numbername) {
numberwidth = this[numbername + "numberwidth"];
numberheight = this[numbername + "numberheight"];
numbertextsize = this[numbername + "numbertextsize"];
numbertextcolor = this[numbername + "numbertextcolor"];
numberbackcolor = this[numbername + "numberbackcolor"];
fmt = new TextFormat();
fmt.size = numbertextsize;
fmt.color = numbertextcolor;
number1.front.back._width = (number1.back.back._width = numberwidth);
number1.front.back._height = (number1.back.back._height = numberheight);
number1.front.txt.text = (number1.back.txt.text = "0");
number1.front.txt.autoSize = (number1.back.txt.autoSize = true);
number1.front.txt.setTextFormat(fmt);
number1.back.txt.setTextFormat(fmt);
number1.front.txt._y = (number1.back.txt._y = (numberheight - number1.front.txt._height) / 2);
number1.front.txt._x = (number1.back.txt._x = (numberwidth - number1.front.txt._width) / 2);
number1._x = currentx;
currentx = currentx + (numberwidth + this[numbername + "digitgap"]);
number2.front.txt.text = (number2.back.txt.text = "0");
number2.front.back._width = (number2.back.back._width = numberwidth);
number2.front.back._height = (number2.back.back._height = numberheight);
number2.front.txt.autoSize = (number2.back.txt.autoSize = true);
number2.front.txt.setTextFormat(fmt);
number2.back.txt.setTextFormat(fmt);
number2.front.txt._y = (number2.back.txt._y = (numberheight - number2.front.txt._height) / 2);
number2.front.txt._x = (number2.back.txt._x = (numberwidth - number2.front.txt._width) / 2);
number2._x = currentx;
setcolor(number1.front.back, numberbackcolor);
setcolor(number1.back.back, numberbackcolor);
setcolor(number2.front.back, numberbackcolor);
setcolor(number2.back.back, numberbackcolor);
currentx = currentx + (numberwidth + numbergap);
if (maxnumberheight < numberheight) {
maxnumberheight = numberheight;
}
};
setnumber(hour1, hour2, "hour");
setnumber(minute1, minute2, "minute");
setnumber(second1, second2, "second");
if (numberverticalalignment == "top") {
}
if (numberverticalalignment == "center") {
hour1._y = (hour2._y = (maxnumberheight - hournumberheight) / 2);
minute1._y = (minute2._y = (maxnumberheight - minutenumberheight) / 2);
second1._y = (second2._y = (maxnumberheight - secondnumberheight) / 2);
}
if (numberverticalalignment == "bottom") {
hour1._y = (hour2._y = maxnumberheight - hournumberheight);
minute1._y = (minute2._y = maxnumberheight - minutenumberheight);
second1._y = (second2._y = maxnumberheight - secondnumberheight);
}
ampmfmt = new TextFormat();
ampmfmt.size = ampmtextsize;
ampmfmt.color = ampmcolor;
ampm.txt.setTextFormat(ampmfmt);
ampm.txt.autoSize = true;
datefmt = new TextFormat();
datefmt.size = datetextsize;
datefmt.color = datecolor;
txt.txt.setTextFormat(datefmt);
txt.txt.autoSize = true;
txt.txt._width = currentx - numbergap;
txt._visible = showdate;
txt._x = (currentx - numbergap) - txt._width;
ampm._x = 0;
ampm._y = maxnumberheight + ampmmargin;
txt._y = maxnumberheight + datemargin;
currenty = maxnumberheight;
if (military != true) {
if (currenty < (ampm._y + ampm._height)) {
currenty = ampm._y + ampm._height;
}
}
if (showdate == true) {
if (currenty < (txt._y + txt._height)) {
currenty = txt._y + txt._height;
}
}
createEmptyMovieClip("showclock", getNextHighestDepth());
showclock.onEnterFrame = function () {
animate(this._parent, "_alpha", 100, alphaspeed, true);
if (this._parent._alpha == this._parent.previous_alpha) {
this.onEnterFrame = function () {
checkcenter();
};
}
checkcenter();
};
showclock.onEnterFrame();
checkcenter = function () {
if ((prevwidth != Stage.width) || (prevheight != Stage.height)) {
_x = ((Stage.width - (currentx - numbergap)) * (_parent.marginleft / (_parent.marginleft + _parent.marginright)));
_y = ((Stage.height - currenty) * (_parent.margintop / (_parent.margintop + _parent.marginbottom)));
prevwidth = Stage.width;
prevheight = Stage.height;
}
};
onEnterFrame = function () {
time = new Date();
hours = time.getHours();
minutes = time.getMinutes();
seconds = time.getSeconds();
txt.txt.text = (((get_month(time.getMonth()) + " ") + String(time.getDate())) + ", ") + String(time.getFullYear());
txt.txt.setTextFormat(datefmt);
newx = (currentx - numbergap) - txt._width;
if (txt._x != newx) {
txt._x = newx;
}
if (military == false) {
if (hours < 12) {
ampm.txt.text = "AM";
} else {
ampm.txt.text = "PM";
}
if (hours > 12) {
hours = hours - 12;
}
if (hours == 0) {
hours = 12;
}
ampm.txt.setTextFormat(ampmfmt);
ampm._visible = true;
} else {
ampm._visible = false;
}
numberdone = false;
setnumbertext(hour1, (hours - (hours % 10)) / 10, "hour");
if (numberdone == true) {
return(undefined);
}
setnumbertext(hour2, hours % 10, "hour");
if (numberdone == true) {
return(undefined);
}
setnumbertext(minute1, (minutes - (minutes % 10)) / 10, "minute");
if (numberdone == true) {
return(undefined);
}
setnumbertext(minute2, minutes % 10, "minute");
if (numberdone == true) {
return(undefined);
}
setnumbertext(second1, (seconds - (seconds % 10)) / 10, "second");
if (numberdone == true) {
return(undefined);
}
setnumbertext(second2, seconds % 10, "second");
if (numberdone == true) {
return(undefined);
}
};
setnumbertext = function (number, numbertext, numbername) {
numberwidth = this[numbername + "numberwidth"];
numberheight = this[numbername + "numberheight"];
numbertextsize = this[numbername + "numbertextsize"];
numbertextcolor = this[numbername + "numbertextcolor"];
fmt = new TextFormat();
fmt.size = numbertextsize;
fmt.color = numbertextcolor;
if (number.ctext == numbertext) {
return(undefined);
}
numberdone = true;
number.ctext = numbertext;
number.front.txt.text = (number.back.txt.text = numbertext);
number.front.txt.setTextFormat(fmt);
number.back.txt.setTextFormat(fmt);
number.front.txt._y = (number.back.txt._y = (numberheight - number.front.txt._height) / 2);
number.front.txt._x = (number.back.txt._x = (numberwidth - number.front.txt._width) / 2);
prepareflip(number, true);
number.deg = 0;
number.done = false;
flip(number, number.deg, true);
number.onEnterFrame = function () {
animate(this, "deg", 360, flipspeed, true);
flip(this, this.deg, true);
if (this.deg == this.previousdeg) {
delete this.onEnterFrame;
}
};
};
get_month = function (num) {
if (num == 0) {
return("January");
}
if (num == 1) {
return("February");
}
if (num == 2) {
return("March");
}
if (num == 3) {
return("April");
}
if (num == 4) {
return("May");
}
if (num == 5) {
return("June");
}
if (num == 6) {
return("July");
}
if (num == 7) {
return("August");
}
if (num == 8) {
return("September");
}
if (num == 9) {
return("October");
}
if (num == 10) {
return("November");
}
if (num == 11) {
return("December");
}
};
prepareflip = function (flipobj, useback) {
if (flipobj.degrees.length > 0) {
f = 0;
while (f <= (flipobj.degrees.length - 1)) {
flipobj.degrees[f].removeMovieClip();
f++;
}
}
flipobj.frontlines.removeMovieClip();
flipobj.backlines.removeMovieClip();
flipobj.front._visible = true;
flipobj.back._visible = false;
flipobj.bitmapdata_front = new flash.display.BitmapData(flipobj._width, flipobj._height, true, 16777215);
flipobj.bitmapdata_front.draw(flipobj);
renderface(flipobj, flipobj.bitmapdata_front, "frontlines");
if (useback == true) {
flipobj.front._visible = false;
flipobj.back._visible = true;
flipobj.bitmapdata_back = new flash.display.BitmapData(flipobj._width, flipobj._height, true, 16777215);
flipobj.bitmapdata_back.draw(flipobj);
renderface(flipobj, flipobj.bitmapdata_back, "backlines");
}
flipobj.front._visible = true;
flipobj.back._visible = true;
flipobj.frontlines._visible = false;
flipobj.backlines._visible = false;
};
renderface = function (flipobj, bitmapdata, facename) {
flipface = flipobj.createEmptyMovieClip(facename + flipobj.getNextHighestDepth(), flipobj.getNextHighestDepth());
flipobj[facename] = flipface;
flipface.array = new Array();
flipface.cacheAsBitmap = true;
if (bitmapdata.width > 0) {
f = 0;
while (f <= (bitmapdata.width - 1)) {
linedata = new flash.display.BitmapData(1, bitmapdata.height, true, 16777215);
rect = new flash.geom.Rectangle(f, 0, 1, bitmapdata.height);
pnt = new flash.geom.Point(0, 0);
linedata.copyPixels(bitmapdata, rect, pnt);
line = flipface.createEmptyMovieClip("line" + flipface.getNextHighestDepth(), flipface.getNextHighestDepth());
line.attachBitmap(linedata, 1, "", true);
flipface.array.push(line);
if (f < (bitmapdata.width - 2)) {
line._width = 2;
} else {
line._width = 2;
}
f++;
}
}
};
flip = function (flipobj, degree, useback) {
flipobj.front._visible = false;
flipobj.back._visible = false;
flipobj.frontlines._visible = false;
flipobj.backlines._visible = false;
if (useback != true) {
flipface = flipobj.frontlines;
} else if ((degree <= 90) || (degree > 270)) {
flipface = flipobj.frontlines;
} else {
flipface = flipobj.backlines;
}
flipface._visible = true;
wid = flipobj.bitmapdata_front.width;
hei = flipobj.bitmapdata_front.height;
heightvar = 0;
if (degree <= 90) {
heightvar = (flipheight * degree) / 90;
}
if ((degree > 90) && (degree <= 180)) {
heightvar = (flipheight * (180 - degree)) / 90;
}
if ((degree > 180) && (degree <= 270)) {
heightvar = (flipheight * (90 - (270 - degree))) / 90;
}
if (degree > 270) {
heightvar = (flipheight * (360 - degree)) / 90;
}
newhei = hei - ((hei * heightvar) / 100);
percenthei = ((hei * heightvar) / 100) * 2;
i = 0;
while (i <= (flipface.array.length - 1)) {
line = flipface.array[i];
if (degree <= 90) {
line._x = i;
}
if ((degree > 90) && (degree <= 180)) {
line._x = wid - i;
}
if ((degree > 180) && (degree <= 270)) {
line._x = wid - i;
}
if (degree > 270) {
line._x = i;
}
if (degree <= 180) {
percent = ((wid - i) / wid) * 100;
} else {
percent = ((i + 1) / wid) * 100;
}
line._height = newhei + ((percenthei * percent) / 100);
line._y = ((newhei + percenthei) - line._height) / 2;
i++;
}
degreepercent = 0;
if (degree <= 90) {
degreepercent = ((90 - degree) / 90) * 100;
}
if ((degree > 90) && (degree <= 180)) {
degreepercent = ((degree - 90) / 90) * 100;
}
if ((degree > 180) && (degree <= 270)) {
degreepercent = ((90 - (degree - 180)) / 90) * 100;
}
if (degree > 270) {
degreepercent = ((degree - 270) / 90) * 100;
}
flipface._width = (wid * degreepercent) / 100;
flipface._x = (wid - flipface._width) / 2;
flipface._y = (hei - flipface._height) / 2;
};
animate = function (mov, prop, val, anispeed, feedattribute) {
if (feedattribute == true) {
mov["previous" + prop] = mov[prop];
}
if (Math.abs(mov[prop] - val) > 1) {
if (mov[prop] > val) {
mov[prop] = mov[prop] - ((mov[prop] - val) / anispeed);
} else {
mov[prop] = mov[prop] + ((val - mov[prop]) / anispeed);
}
} else if (mov[prop] != val) {
mov[prop] = val;
}
};
_parent.setdimensions(currentx - numbergap, currenty);