Frame 1
Array.prototype.removeMatch = function (match) {
var _local2 = 0;
while (_local2 < this.length) {
if (this[_local2] == match) {
return(this.splice(_local2, 1));
}
_local2++;
}
};
_global.setTimeout = function (a, b, c, args) {
if (typeof(a) == "function") {
args = arguments.slice(2);
var ID;
var _local2 = function () {
a.apply(null, args);
clearInterval(ID);
};
ID = setInterval(_local2, b, args);
} else {
args = arguments.slice(3);
var ID;
var _local2 = function () {
a[b].apply(a, args);
clearInterval(ID);
};
ID = setInterval(_local2, c, args);
}
return(ID);
};
_global.clearTimeout = clearInterval;
_global.getRandomFromArray = function (ar, remove, remember) {
var _local2 = getRandomNumber(0, ar.length - 1);
var _local3 = ar[_local2];
if (remove) {
ar.splice(_local2, 1);
}
if (remember) {
ar.history = ar.history || (new String());
if (ar.history.indexOf(_local2 + ",") >= 0) {
return(((ar.history.split(",").length <= ar.length) ? (getRandomFromArray(ar, false, true)) : null));
}
ar.history = ar.history + (_local2 + ",");
}
return(_local3);
};
_global.getRandomNumber = function (floor, ceiling) {
var _local1 = Math.round(Math.random() * ceiling);
_local1 = Math.max(floor, _local1);
return(_local1);
};
Number.prototype.roundTo = function (places) {
var _local3 = new String(this);
var _local2 = _local3.split(".");
return((_local2[1] ? (Math.round(_local3) + parseFloat("0." + _local2[1].substring(0, places))) : (Math.round(_local2[0]))));
};
XML.prototype.toArray = function () {
function tagChildren(node) {
var _local2 = 0;
while (_local2 < node.childNodes.length) {
child = node.childNodes[_local2];
if (node[child.nodeName] == undefined) {
node[child.nodeName] = child;
} else {
if (node[child.nodeName].length == undefined) {
temp = node[child.nodeName];
node[child.nodeName] = new Array();
node[child.nodeName][0] = temp;
}
node[child.nodeName].push(child);
}
if (child.hasChildNodes && (child.firstChild.nodeType == 1)) {
tagChildren(child);
} else {
child.parentNode[child.nodeName] = child.firstChild.nodeValue;
}
_local2++;
}
}
tagChildren(this);
};
MovieClip.prototype.loadImage = function (sURL, holderName, timeout) {
var h = (holderName || "holder");
if (!this[h]) {
this.createEmptyMovieClip(h, 1);
}
this._visible = false;
this[h].loadMovie(sURL);
var start = new Date();
this.sURL = sURL;
var id = setInterval(function (mc) {
if (((mc.onTimeout && (timeout)) && (mc[h].getBytesLoaded() == 0)) && ((new Date() - start) >= timeout)) {
clearInterval(id);
mc.onTimeout(mc.sURL);
}
if (mc[h]._width > 0) {
clearInterval(id);
mc._visible = true;
mc.onImageLoad(mc[h]);
mc.onImageComplete();
} else {
mc.onImageLoad();
}
}, 80, this);
};
MovieClip.prototype.drawRect = function (x, y, w, h) {
this.moveTo(x, y);
this.lineTo(x + w, y);
this.lineTo(x + w, y + h);
this.lineTo(x, y + h);
this.lineTo(x, y);
};
MovieClip.prototype.show = function () {
this._visible = true;
return(this);
};
MovieClip.prototype.hide = function () {
this._visible = false;
return(this);
};
MovieClip.prototype.center = function (xoff, yoff) {
this._x = ((Stage.width - this._width) / 2) + (xoff || 0);
this._y = ((Stage.height - this._height) / 2) + (yoff || 0);
return(this);
};
MovieClip.prototype.fadeIn = function (speed) {
if (!speed) {
speed = 7;
}
this._alpha = 0;
var speed = 9;
this.onEnterFrame = function () {
var _local2 = Math.ceil((100 - this._alpha) / speed);
if (this._alpha < 100) {
this._alpha = this._alpha + _local2;
} else {
this._alpha = 100;
this.onEnterFrame = null;
}
};
return(this);
};
Stage.scaleMode = "noScale";
Stage.align = "TL";
var start = new Date();
TextTitle.text = (TextBy.text = "");
var clip = _root.createEmptyMovieClip("daImageClip", 0);
clip.onImageLoad = function () {
var _local2 = Math.round((this.holder.getBytesLoaded() / this.holder.getBytesTotal()) * 100) || 0;
if (_local2 < 10) {
_local2 = " " + _local2;
}
TextBy.htmlText = ((sTextBy + " ( ") + _local2) + "% )";
};
clip.onImageComplete = function () {
TextBy.htmlText = sTextBy;
logoimage.stop();
logoimage.hide();
clip.center(null, -30);
clip2.hide();
clip._alpha = 0;
clip.show();
clip.fadeIn();
clip.filters = [new flash.filters.DropShadowFilter(2, 45, 0, 0.4, 7, 7, 1.5, 3)];
};
clip.onRelease = function () {
getURL (("http://www.deviantart.com/view/" + this.deviationid) + "/");
};
logo.onRelease = function () {
getURL ("http://www.deviantart.com");
};
var info = new XML();
info.ignoreWhite = true;
info.onLoad = function (success) {
TextTitle._width = (TextBy._width = Stage.width);
this.toArray();
clip2.filters = [new flash.filters.DropShadowFilter(2, 45, 0, 0.4, 7, 7, 1, 3)];
if (this.array.error) {
clip2.center().show();
logoimage.center().show();
logoimage.gotoAndStop(1);
TextBy._y = (clip2._y + clip2._height) + 10;
TextBy.text = "Deviation does not exist.";
return(undefined);
}
var _local6 = (Stage.width - 300) / 2;
var _local4 = Math.round((300 / this.array.width) * this.array.height);
var _local5 = ((Stage.height - _local4) / 2) - 20;
clip2._height = _local4;
clip2._width = 300;
clip2.center(null, -30).show();
logoimage.center(null, -30).show();
TextTitle._y = (_local5 + _local4) + 10;
TextBy._y = TextTitle._y + TextTitle._height;
TextTitle.filters = [new flash.filters.DropShadowFilter(2, 45, 0, 0.4, 3, 3, 1, 3)];
var _local3 = new Date(this.array.ts * 1000);
TextTitle.htmlText = ((("<a href=\"http://www.deviantart.com/view/" + this.array.deviationid) + "\">") + this.array.title) + "</a>";
TextBy.htmlText = (sTextBy = ((((((((("by <a href=\"http://" + this.array.username) + ".deviantart.com/\"><font color=\"#333333\">") + this.array.symbol) + this.array.username) + "</font></a> \u00A9 ") + ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"][_local3.getMonth()]) + " ") + _local3.getDate()) + ", ") + _local3.getFullYear());
clip.deviationid = this.array.deviationid;
clip.hide();
if (this.array.fileurl.indexOf(".gif") > 0) {
clip.loadImage(this.array.fileurl);
logoimage.hide();
} else if (_root.size == 150) {
clip.loadImage(this.array.onefifty);
} else {
clip.loadImage(this.array.threehundred + (_root.nocache ? ("?" + Math.random()) : ""));
}
};
info.load("http://backend.deviantart.com/embed/info.php?id=" + (_root.id || 40202128));
logoimage.hide();
clip2.hide();
stop();