Frame 2
function init() {
trace("init");
_quality = "best";
Stage.align = "TL";
Stage.scaleMode = "noScale";
lstnRez = new Object();
Stage.addListener(lstnRez);
RESIZE_INTERVAL = 100;
lstnRez.onResize = function () {
if (!this.resizeIntervalId) {
this.resizeIntervalId = setInterval(this, "$onResize", RESIZE_INTERVAL);
}
this.$onResize = function () {
gmcViewArea.doLayout();
clearInterval(this.resizeIntervalId);
delete this.resizeIntervalId;
};
};
_global.gmcViewArea = new ViewArea(this);
gmcViewArea.addIntroTagBox();
}
stop();
init();
Symbol 5 MovieClip Frame 1
stop();
Symbol 5 MovieClip Frame 10
stop();
Symbol 14 MovieClip [sLogo] Frame 1
mcButton.onRelease = function () {
getURL ("http://www.airtightinteractive.com/projects/related_tag_browser", "_blank");
};
stop();
Symbol 21 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 10
stop();
Symbol 36 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 1
stop();
Symbol 46 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static var version = "1.1.0.52";
}
Symbol 47 MovieClip [__Packages.ViewArea] Frame 0
class ViewArea
{
var clip, mcLogo, tagCount, aTagBoxes, mcReload, focusTagBox, width, height;
function ViewArea (mainRef) {
trace("init ViewArea");
clip = mainRef.createEmptyMovieClip("tagHolder_mc", 1);
mcLogo = mainRef.attachMovie("sLogo", "logo_mc", 2);
tagCount = 0;
aTagBoxes = [];
mcReload = mainRef.attachMovie("sReloadBtn", "reload_mc", 3);
mcReload.scope = this;
mcReload.onRelease = function () {
_global.lastActiveTag = null;
this.scope.deactivateOtherTagBoxes();
this.scope.addIntroTagBox();
this.mcIcon.gotoAndPlay(2);
};
mcReload.onRollOver = function () {
this.mcIcon.gotoAndPlay(2);
};
mcReload.onPress = function () {
};
doLayout();
clip.scope = this;
clip.onEnterFrame = function () {
this.scope.focusView();
};
}
function removeTagBox(tagBox) {
}
function addTagBox(tag, x, y) {
trace((((("addTagBox: " + tag) + ", x: ") + x) + ", y: ") + y);
var _local2 = new TagBox(tag, tagCount, this);
tagCount++;
_local2.clip._x = x;
_local2.clip._y = y;
aTagBoxes.push(_local2);
return(_local2);
}
function addIntroTagBox() {
focusTagBox = new TagBox("", tagCount, this);
focusTagBox.clip.mcFrame.onRelease = undefined;
focusTagBox.clip.mcFrame.useHandCursor = false;
focusTagBox.clip.attachMovie("sIntro", "mcIntro", 1);
focusTagBox.clip.mcIntro.mcButton.scope = focusTagBox;
focusTagBox.clip.txtTag.type = "input";
focusTagBox.clip.txtTag.maxChars = 100;
focusTagBox.clip.txtTag.selectable = true;
trace("SETfocus: " + focusTagBox.clip.txtTag._name);
Selection.setFocus(focusTagBox.clip.txtTag);
Selection.setSelection(0, 0);
focusTagBox.clip.mcIntro.mcButton.onRollOver = function () {
this._parent.mcArrow.gotoAndPlay(2);
};
focusTagBox.clip.mcIntro.mcButton.onPress = function () {
this._parent.mcArrow.gotoAndPlay(2);
};
focusTagBox.clip.mcIntro.mcButton.onRelease = function () {
this.scope.onEnterText();
};
tagCount++;
aTagBoxes.push(focusTagBox);
var keyLstnr = new Object();
keyLstnr.scope = focusTagBox;
keyLstnr.onKeyDown = function () {
if (Key.isDown(13)) {
this.scope.clip.mcIntro.mcButton.onRelease();
Key.removeListener(keyLstnr);
}
};
Key.addListener(keyLstnr);
}
function setFocus(tagBox) {
focusTagBox = tagBox;
}
function deactivateOtherTagBoxes(activeId) {
for (var _local3 in aTagBoxes) {
trace("a: " + _local3);
if (_local3 != activeId) {
aTagBoxes[_local3].deactivate();
}
}
}
function focusView() {
var _local3 = (100 * width) / (focusTagBox.sizingClip._width + STAGEPADDING);
var _local4 = (100 * height) / (focusTagBox.sizingClip._height + STAGEPADDING);
var _local2 = Math.min(_local3, _local4);
if (_local2 > 100) {
_local2 = 100;
}
var _local6 = (width / 2) - ((focusTagBox.clip._x * _local2) / 100);
var _local5 = (height / 2) - ((focusTagBox.clip._y * _local2) / 100);
clip._xscale = clip._xscale + ((_local2 - clip._xscale) / ACCEL);
clip._yscale = clip._yscale + ((_local2 - clip._yscale) / ACCEL);
clip._x = clip._x + ((_local6 - clip._x) / ACCEL);
clip._y = clip._y + ((_local5 - clip._y) / ACCEL);
}
function doLayout() {
trace("doLayout");
width = Stage.width;
height = Stage.height;
mcLogo._x = Math.floor((width - mcLogo._width) - 15);
mcLogo._y = Math.floor((height - mcLogo._height) - 10);
mcReload._x = 15;
mcReload._y = Math.floor((height - mcReload._height) - 10);
}
static var STAGEPADDING = 300;
static var ACCEL = 4;
static var EASEFUNC = mx.transitions.easing.Elastic.easeInOut;
static var TWEENLEN = 30;
}
Symbol 48 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 49 MovieClip [__Packages.TagBox] Frame 0
class TagBox
{
var tag, id, viewAreaRef, loadedRelatedTags, gotThumbPaths, clip, active, mouseInside, curThumbsPage, aThumbs, sizingClip, showingImage, mcThumbPie, buildDone, thumbData_xml, relatedTags_xml, loader, loader_mcl, lstnrLoad;
function TagBox (ptag, pid, pviewAreaRef) {
tag = ptag;
id = pid;
viewAreaRef = pviewAreaRef;
loadedRelatedTags = false;
gotThumbPaths = false;
clip = viewAreaRef.clip.attachMovie("sTagBox", "mcImg" + id, id + 1);
clip._rotation = (Math.random() * 10) - 5;
clip.txtTag.text = String(tag).toUpperCase();
clip.txtError._visible = false;
trace("clip.txtTag.text: " + clip.txtTag.text);
clip.mcFrame.scope = this;
clip.mcFrame.onRelease = function () {
if (!this.scope.active) {
this.scope.activate();
}
};
active = false;
mouseInside = false;
clip.mcFrame.onEnterFrame = function () {
if (this.mcBox.hitTest(_root._xmouse, _root._ymouse, false) && (this.scope.active)) {
if (!this.mouseInside) {
this.mouseInside = true;
this.scope.zoomIn();
}
} else if (this.scope.loadedRelatedTags) {
this.mouseInside = false;
this.scope.zoomOut();
}
};
curThumbsPage = 1;
aThumbs = [];
clip.g1._visible = false;
clip.g2._visible = false;
clip.g3._visible = false;
clip.mcImageFrame._visible = false;
clip.mcThumbNav._visible = false;
sizingClip = clip.g1;
showingImage = false;
clip.btnGoTo._visible = false;
clip.attachMovie("sCirc", "mcCirc", clip.getNextHighestDepth());
clip.mcCirc._width = TAG_RADIUS;
clip.mcCirc._height = TAG_RADIUS;
clip.mcCirc._visible = false;
new mx.transitions.Tween(clip, "_alpha", null, 0, 100, TWEENLEN, false);
clip.mcThumbNav.mcBack_btn._visible = false;
clip.mcThumbNav.mcMore_btn.scope = this;
clip.mcThumbNav.mcMore_btn.onRelease = function () {
this.scope.loadNextThumbs();
};
clip.mcThumbNav.mcMore_btn.onRollOver = function () {
this.mcArrow.gotoAndPlay(2);
};
clip.mcThumbNav.mcMore_btn.onPress = function () {
this.mcArrow.gotoAndPlay(2);
};
clip.mcThumbNav.mcBack_btn.onRollOver = function () {
this.mcArrow.gotoAndPlay(2);
};
clip.mcThumbNav.mcBack_btn.onPress = function () {
this.mcArrow.gotoAndPlay(2);
};
clip.mcThumbNav.mcBack_btn.scope = this;
clip.mcThumbNav.mcBack_btn.onRelease = function () {
this.scope.loadPrevThumbs();
};
mcThumbPie = clip.mcThumbArea.createEmptyMovieClip("mcPie", 9999);
mcThumbPie._x = 225;
mcThumbPie._y = 225;
mcThumbPie._visible = false;
buildDone = false;
}
function zoomOut() {
sizingClip = clip.mcCirc;
}
function zoomIn() {
if (showingImage) {
sizingClip = clip.g3;
} else {
sizingClip = clip.g2;
}
}
function onEnterText() {
tag = clip.txtTag.text;
trace("tag:" + tag);
if (tag == "") {
trace("PPP");
return(undefined);
}
clip.txtTag.type = "dynamic";
activate();
clip.mcIntro._visible = false;
clip.txtTag.selectable = false;
}
function activate() {
trace("activate");
sizingClip = clip.g2;
clip.mcFrame.enabled = false;
active = true;
new mx.transitions.Tween(clip.mcFrame, "_width", EASEFUNC, clip.mcFrame._width, clip.g2._width, TWEENLEN, false);
new mx.transitions.Tween(clip.mcFrame, "_height", EASEFUNC, clip.mcFrame._height, clip.g2._height, TWEENLEN, false);
new mx.transitions.Tween(clip.mcFrame, "_x", EASEFUNC, clip.mcFrame._x, clip.g2._x, TWEENLEN, false);
new mx.transitions.Tween(clip.mcFrame, "_y", EASEFUNC, clip.mcFrame._y, clip.g2._y, TWEENLEN, false);
new mx.transitions.Tween(clip.txtTag, "_x", EASEFUNC, clip.txtTag._x, clip.g2_t._x, TWEENLEN, false);
var _local2 = new mx.transitions.Tween(clip.txtTag, "_y", EASEFUNC, clip.txtTag._y, clip.g2_t._y, TWEENLEN, false);
_local2.scope = this;
_local2.onMotionFinished = function () {
this.scope.buildDone = true;
if (!this.scope.gotThumbPaths) {
this.scope.mcThumbPie._visible = true;
}
if (this.scope.gotThumbPaths) {
this.scope.onGotThumbPaths(true);
}
};
viewAreaRef.setFocus(this);
viewAreaRef.deactivateOtherTagBoxes(id);
getThumbPaths();
getRelatedTags();
}
function deactivate() {
trace("deactivate");
active = false;
removeMovieClip(clip);
}
function loadNextThumbs() {
curThumbsPage++;
getThumbPaths();
}
function loadPrevThumbs() {
curThumbsPage--;
getThumbPaths();
}
function getThumbPaths() {
var _local2 = 0;
while (_local2 < THUMBCOUNT) {
aThumbs[_local2].remove();
_local2++;
}
thumbData_xml = new XML();
thumbData_xml.onLoad = onGotThumbPaths;
thumbData_xml.ignoreWhite = true;
clip.mcThumbNav.txtPageInfo._visible = false;
clip.mcThumbNav.mcBack_btn.enabled = false;
clip.mcThumbNav.mcMore_btn.enabled = false;
clip.mcThumbNav.mcBack_btn.gotoAndStop(1);
clip.mcThumbNav.mcMore_btn.gotoAndStop(1);
var caller = this;
thumbData_xml.onLoad = function (r) {
caller.onGotThumbPaths(r);
};
var _local3 = GET_IMAGES_URL + tag;
_local3 = (((_local3 + "&per_page=") + THUMBCOUNT) + "&page=") + curThumbsPage;
thumbData_xml.load(_local3);
mcThumbPie.clear();
mcThumbPie.scope = this;
mcThumbPie.switcher = true;
mcThumbPie.arc = 0;
if (buildDone) {
mcThumbPie._visible = true;
}
mcThumbPie.onEnterFrame = function () {
if (this.switcher) {
this.arc = this.arc - 5;
} else {
this.arc = this.arc + 5;
}
if (this.arc <= -360) {
this.switcher = !this.switcher;
}
if (this.arc >= 0) {
this.switcher = !this.switcher;
}
this.clear();
this.lineStyle(1, 15658734, 0);
this.beginFill(15658734);
if (this.switcher) {
Drawingx.wedge(this, 0, 0, 90, this.arc, 60);
} else {
Drawingx.wedge(this, 0, 0, (90 - this.arc) + 360, this.arc, 60);
}
};
}
function getRelatedTags(tagBox) {
relatedTags_xml = new XML();
relatedTags_xml.onLoad = onGotRelatedTags;
relatedTags_xml.ignoreWhite = true;
var caller = this;
relatedTags_xml.onLoad = function (r) {
caller.onGotRelatedTags(r);
};
var _local3 = tag.split(",");
var _local2 = GET_RELATED_URL + _local3[0];
trace("-----------------------");
trace("getRelatedTags:" + _local2);
relatedTags_xml.load(_local2);
}
function onGotThumbPaths(success) {
trace("-----------------------");
gotThumbPaths = true;
if (!buildDone) {
return(undefined);
}
mcThumbPie._visible = false;
if (curThumbsPage > 1) {
clip.mcThumbNav.mcBack_btn._visible = true;
} else {
clip.mcThumbNav.mcBack_btn._visible = false;
}
if (success && (thumbData_xml.firstChild.firstChild.attributes.code != "0")) {
var _local4 = thumbData_xml.firstChild.firstChild;
var _local9 = Number(_local4.childNodes.length);
if (_local9 == 0) {
clip.txtError._visible = true;
clip.txtError.text = "NO IMAGES FOUND";
} else {
clip.mcThumbNav.mcBack_btn.enabled = true;
clip.mcThumbNav.mcMore_btn.enabled = true;
clip.mcThumbNav._visible = true;
var _local10 = Number(_local4.attributes.total);
var _local12 = (Number(_local4.attributes.perpage) * (Number(_local4.attributes.page) - 1)) + 1;
var _local11 = (_local12 + Number(_local4.attributes.perpage)) - 1;
if (_local11 > _local10) {
_local11 = _local10;
}
clip.mcThumbNav.txtPageInfo._visible = true;
clip.mcThumbNav.txtPageInfo.text = (((numberToString(_local12) + "-") + numberToString(_local11)) + " OF ") + numberToString(_local10);
trace((Number(_local4.attributes.page) * Number(_local4.attributes.perpage)) < Number(_local4.attributes.total));
if ((Number(_local4.attributes.page) * Number(_local4.attributes.perpage)) < Number(_local4.attributes.total)) {
clip.mcThumbNav.mcMore_btn._visible = true;
} else {
clip.mcThumbNav.mcMore_btn._visible = false;
}
var _local3 = 0;
while (_local3 < _local9) {
var _local2 = _local4.childNodes[_local3];
var _local5 = _local2.attributes.title;
var _local8 = ((((("http://static.flickr.com/" + _local2.attributes.server) + "/") + _local2.attributes.id) + "_") + _local2.attributes.secret) + "_s.jpg";
var _local6 = ((((("http://static.flickr.com/" + _local2.attributes.server) + "/") + _local2.attributes.id) + "_") + _local2.attributes.secret) + ".jpg";
var _local7 = (("http://www.flickr.com/photos/" + _local2.attributes.owner) + "/") + _local2.attributes.id;
aThumbs[_local3] = new Thumbnail(_local3, _local5, _local8, _local6, _local7, this);
_local3++;
}
}
} else {
trace("Load XML failed");
clip.txtError._visible = true;
clip.txtError.text = "FLICKR SERVICES ARE CURRENTLY UNAVAILABLE. PLEASE TRY AGAIN LATER.";
}
}
function onGotRelatedTags(success) {
trace("-----------------------");
trace("onGotRelatedTags:" + relatedTags_xml);
if (success) {
var _local12 = relatedTags_xml.firstChild.firstChild;
var _local13 = Number(_local12.childNodes.length);
loadedRelatedTags = true;
var _local6 = Math.min(MAXTAGS, _local13);
var _local11 = false;
var _local10 = [];
var _local3 = 0;
while (_local3 < _local6) {
var _local7 = _local12.childNodes[_local3];
var _local4 = String(_local7.firstChild).toUpperCase();
_local10.push(_local4);
trace(("check tag: '" + _local4) + "'");
if (_local4 == _global.lastActiveTag) {
trace("lastTagMatch = true");
_local11 = true;
}
_local3++;
}
if ((!_local11) && (_global.lastActiveTag != undefined)) {
_local10.push(_global.lastActiveTag);
_local6++;
}
_global.lastActiveTag = tag;
_local3 = 0;
while (_local3 < _local6) {
var _local5 = (((Math.PI*2) / _local6) * _local3) + Math.PI;
var _local9 = (Math.cos(_local5) * 800) + clip._x;
var _local8 = (Math.sin(_local5) * 800) + clip._y;
viewAreaRef.addTagBox(_local10[_local3], _local9, _local8);
_local3++;
}
} else {
trace("Load XML failed");
}
}
function loadImage(thumbRef) {
new mx.transitions.Tween(clip.mcFrame, "_width", EASEFUNC, clip.mcFrame._width, clip.g3._width, TWEENLEN, false);
var _local2 = new mx.transitions.Tween(clip.mcFrame, "_height", EASEFUNC, clip.mcFrame._height, clip.g3._height, TWEENLEN, false);
new mx.transitions.Tween(clip.mcFrame, "_x", EASEFUNC, clip.mcFrame._x, clip.g3._x, TWEENLEN, false);
new mx.transitions.Tween(clip.mcFrame, "_y", EASEFUNC, clip.mcFrame._y, clip.g3._y, TWEENLEN, false);
new mx.transitions.Tween(clip.mcThumbArea, "_x", EASEFUNC, clip.mcThumbArea._x, clip.g3_thumbarea._x, TWEENLEN, false);
new mx.transitions.Tween(clip.txtTag, "_x", EASEFUNC, clip.txtTag._x, clip.g3_t._x, TWEENLEN, false);
new mx.transitions.Tween(clip.mcThumbNav, "_x", EASEFUNC, clip.mcThumbNav._x, clip.g3_thumbarea._x, TWEENLEN, false);
sizingClip = clip.g3;
showingImage = true;
_local2.scope = this;
_local2.onMotionFinished = function () {
this.scope.clip.mcImageFrame._visible = true;
};
loader = clip.mcImageFrame.createEmptyMovieClip("mcLoader", 3);
loader_mcl = new MovieClipLoader();
loader_mcl.loadClip(thumbRef.imageURL, loader);
lstnrLoad = new Object();
lstnrLoad.scope = this;
loader_mcl.addListener(lstnrLoad);
lstnrLoad.onLoadInit = function () {
this.scope.onImageLoaded();
};
loader._alpha = 0;
clip.btnGoTo._visible = false;
clip.btnGoTo.txtTitle.text = thumbRef.title.toUpperCase();
clip.btnGoTo.photoPageURL = thumbRef.photoPageURL;
clip.btnGoTo.onRelease = function () {
getURL (this.photoPageURL, "flickr");
};
clip.btnGoTo.onRollOver = function () {
this.mcArrow.gotoAndPlay(2);
};
clip.btnGoTo.onPress = function () {
this.mcArrow.gotoAndPlay(2);
};
var arc_mc = clip.mcImageFrame.createEmptyMovieClip("mcPie", 2);
arc_mc._x = clip.mcImageFrame._width / 2;
arc_mc._y = clip.mcImageFrame._height / 2;
arc_mc.clear();
lstnrLoad.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal) {
var _local1 = (-Math.round((bytesLoaded / bytesTotal) * 100)) * 3.6;
arc_mc.lineStyle(1, 16185078, 0);
arc_mc.beginFill(16185078);
Drawingx.wedge(arc_mc, 0, 0, 90, _local1, 60);
};
}
function onImageLoaded() {
clip.btnGoTo._visible = true;
new mx.transitions.Tween(loader, "_alpha", EASEFUNC, 0, 100, TWEENLEN, false);
loader._x = ((-loader._width) / 2) + (IMAGEDIM / 2);
loader._y = ((-loader._height) / 2) + (IMAGEDIM / 2);
}
function numberToString(n) {
var _local4 = n.toString();
var _local3 = _local4.split(".");
var _local1 = "";
var _local2 = _local3[0].length;
while (_local2--) {
if ((_local2 < (_local3[0].length - 1)) && ((((_local3[0].length - _local2) - 1) % 3) == 0)) {
_local1 = "," + _local1;
}
_local1 = _local3[0].substr(_local2, 1) + _local1;
}
if (_local3.length > 1) {
_local1 = _local1 + ("." + _local3[1]);
}
return(_local1);
}
static var THUMBCOUNT = 36;
static var EASEFUNC = mx.transitions.easing.Strong.easeInOut;
static var TWEENLEN = 15;
static var IMAGEDIM = 500;
static var MAXTAGS = 36;
static var TAG_RADIUS = 1500;
static var GET_RELATED_URL = "http://api.flickr.com/services/rest/?method=flickr.tags.getRelated&api_key=b40dc56c795c0103c6170731e6271e04&tag=";
static var GET_IMAGES_URL = "http://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=b40dc56c795c0103c6170731e6271e04&tag_mode=all&tags=";
}
Symbol 50 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 51 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 52 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 53 MovieClip [__Packages.Drawingx] Frame 0
class Drawingx
{
function Drawingx () {
}
static function wedge(clip_mc, x, y, startAngle, arc, radius, yRadius) {
clip_mc.moveTo(x, y);
if (yRadius == undefined) {
yRadius = radius;
}
var _local19;
var _local1;
var _local2;
var _local4;
var _local13;
var _local18;
var _local17;
var _local12;
var _local10;
var _local11;
var _local9;
if (Math.abs(arc) > 360) {
arc = 360;
}
_local13 = Math.ceil(Math.abs(arc) / 45);
_local19 = arc / _local13;
_local1 = (-(_local19 / 180)) * Math.PI;
_local2 = (-(startAngle / 180)) * Math.PI;
if (_local13 > 0) {
_local18 = x + (Math.cos((startAngle / 180) * Math.PI) * radius);
_local17 = y + (Math.sin(((-startAngle) / 180) * Math.PI) * yRadius);
clip_mc.lineTo(_local18, _local17);
var _local3 = 0;
while (_local3 < _local13) {
_local2 = _local2 + _local1;
_local4 = _local2 - (_local1 / 2);
_local12 = x + (Math.cos(_local2) * radius);
_local10 = y + (Math.sin(_local2) * yRadius);
_local11 = x + (Math.cos(_local4) * (radius / Math.cos(_local1 / 2)));
_local9 = y + (Math.sin(_local4) * (yRadius / Math.cos(_local1 / 2)));
clip_mc.curveTo(_local11, _local9, _local12, _local10);
_local3++;
}
clip_mc.lineTo(x, y);
}
}
static function rectangle(clip_mc, x1, y1, x2, y2) {
clip_mc.moveTo(x1, y1);
clip_mc.lineTo(x2, y1);
clip_mc.lineTo(x2, y2);
clip_mc.lineTo(x1, y2);
clip_mc.lineTo(x1, y1);
}
}
Symbol 54 MovieClip [__Packages.Thumbnail] Frame 0
class Thumbnail
{
var id, title, thumbURL, imageURL, photoPageURL, tagBoxRef, clip, loader, loader_mcl, lstnrLoad;
function Thumbnail (pid, ptitle, pthumbURL, pimageURL, pphotoPageURL, ptagBoxRef) {
id = pid;
title = ptitle;
thumbURL = pthumbURL;
imageURL = pimageURL;
photoPageURL = pphotoPageURL;
tagBoxRef = ptagBoxRef;
clip = tagBoxRef.clip.mcThumbArea.attachMovie("sThumb", "mcThumb" + id, id + 1);
var _local2 = id;
clip._x = (THUMB_DIM + THUMB_PADDING) * (_local2 % COLUMN_COUNT);
clip._y = (THUMB_DIM + THUMB_PADDING) * Math.floor(_local2 / COLUMN_COUNT);
loader = clip.createEmptyMovieClip("mcLoader", 1);
loader_mcl = new MovieClipLoader();
loader_mcl.loadClip(thumbURL, loader);
lstnrLoad = new Object();
lstnrLoad.scope = this;
loader_mcl.addListener(lstnrLoad);
lstnrLoad.onLoadInit = function () {
this.scope.onThumbLoaded();
};
loader._alpha = 0;
}
function onThumbLoaded() {
new mx.transitions.Tween(loader, "_alpha", EASEFUNC, 0, 100, TWEENLEN, false);
clip.scope = this;
clip.onRelease = function () {
this.scope.tagBoxRef.loadImage(this.scope);
};
clip.onRollOver = function () {
this.tagBoxRef.zoomIn();
};
}
function remove() {
loader_mcl.removeListener(lstnrLoad);
delete lstnrLoad;
delete loader_mcl;
removeMovieClip(loader);
removeMovieClip(clip);
}
static var THUMB_DIM = 75;
static var THUMB_PADDING = 1;
static var COLUMN_COUNT = 6;
static var EASEFUNC = mx.transitions.easing.Strong.easeInOut;
static var TWEENLEN = 15;
}