Frame 1
function animTick() {
if (animCurrentFrame > images[ii].frameAmount) {
animCurrentFrame = 1;
} else {
animCurrentFrame++;
}
TheGif = flash.display.BitmapData.loadBitmap(images[ii].name + animCurrentFrame);
}
function changeImage() {
if (images[ii].anim == 0) {
TheGif = flash.display.BitmapData.loadBitmap(images[ii].name);
} else {
trace(("Switching to animation, the first frame is:" + images[ii].name) + animCurrentFrame);
TheGif = flash.display.BitmapData.loadBitmap(images[ii].name + animCurrentFrame);
}
}
function toggleHelp() {
if (UIButtons.helpBox._alpha == 0) {
UIButtons.helpBox._alpha = 100;
} else {
UIButtons.helpBox._alpha = 0;
}
}
function activate() {
UIButtons.btnForward._alpha = 30;
UIButtons.btnBack._alpha = 30;
UIButtons.btnSongBack._alpha = 30;
UIButtons.btnSongForward._alpha = 30;
UIButtons.btnAuto._alpha = 30;
UIButtons.btnFullAuto._alpha = 30;
UIButtons.showHelp._alpha = 30;
if (btnUiHide._y == 710) {
showing = true;
btnUiHide._rotation = 0;
} else if (btnUiHide._y == 655) {
hiding = true;
btnUiHide._alpha = 100;
btnUiHide._rotation = 180;
btnUiHide.enabled = false;
}
}
function changeUI() {
if (hiding) {
UIButtons._alpha = UIButtons._alpha - 15;
if (btnUiHide._y < 710) {
btnUiHide._y = btnUiHide._y + 5;
} else if (btnUiHide._y == 710) {
hiding = false;
btnUiHide._alpha = 0;
btnUiHide.enabled = true;
UIButtons.btnForward.enabled = false;
UIButtons.btnBack.enabled = false;
UIButtons.btnSongBack.enabled = false;
UIButtons.btnSongForward.enabled = false;
UIButtons.btnAuto.enabled = false;
UIButtons.btnFullAuto.enabled = false;
UIButtons.showHelp.enabled = false;
}
} else if (showing) {
btnUiHide._alpha = 8;
UIButtons._alpha = UIButtons._alpha + 15;
UIButtons.scode._alpha = UIButtons.scode._alpha + 15;
if (btnUiHide._y > 655) {
btnUiHide._y = btnUiHide._y - 5;
} else if (btnUiHide._y == 655) {
showing = false;
UIButtons.btnForward.enabled = true;
UIButtons.btnBack.enabled = true;
UIButtons.btnSongBack.enabled = true;
UIButtons.btnSongForward.enabled = true;
UIButtons.btnAuto.enabled = true;
UIButtons.btnFullAuto.enabled = true;
UIButtons.showHelp.enabled = true;
}
}
}
function otherOnEnterFrame() {
changeUI();
UIButtons.scode = songs[ss].myRhythm.substr(beat, length(songs[ss].myRhythm) - beat) + songs[ss].myRhythm;
while (UIButtons.scode.length < 150) {
UIButtons.scode = UIButtons.scode + songs[ss].myRhythm;
}
if ((song.position > nextup) && ((song.position - nextup) < 1500)) {
if (songs[ss].myRhythm.charAt(beat) == "x") {
blackening = false;
yblur = 96;
}
if (songs[ss].myRhythm.charAt(beat) == "o") {
blackening = false;
xblur = 96;
}
if (songs[ss].myRhythm.charAt(beat) == "+") {
blackening = true;
xblur = 500;
}
if ((songs[ss].myRhythm.charAt(beat) != ".") && (songs[ss].myRhythm.charAt(beat) != "+")) {
changeit();
}
beat = (beat + 1) % length(songs[ss].myRhythm);
nextup = int(beat * blen);
}
if (((song.position < 100) && (!shrekActivated)) && (!shrekedOut)) {
if ((!shrekActivated) && (fullAuto)) {
shrekedOut = true;
trace("HOLEE SHET, A SHREK?");
var _local2 = 1;
var _local3 = 100;
var _local1 = Math.floor(Math.random() * ((_local3 - _local2) + 1)) + _local2;
trace("We rolled: " + _local1);
if (_local1 <= shrekChance) {
trace("SHREK ACTIVATED");
dreck._alpha = 10;
dreck.enabled = true;
shrekActivated = true;
} else {
trace("SHREK NOT ACTIVATED :(");
}
}
} else if (song.position > 100) {
shrekedOut = false;
} else if (((song.position < 100) && (shrekActivated)) && (!shrekedOut)) {
trace("SHREK GOT AWAY SAFELY");
dreck.enabled = false;
dreck._alpha = 0;
shrekActivated = false;
}
if (blackening) {
blackThing._alpha = blackThing._alpha + 25;
} else {
blackThing._alpha = 0;
}
UIButtons.tcode = conv(song.position, 4);
UIButtons.bcode = conv(beat, 2);
UIButtons.xcode = conv(xblur, 2);
UIButtons.ycode = conv(yblur, 2);
UIButtons.imageName = images[ii].name.toUpperCase();
blur = new flash.filters.BlurFilter(xblur, yblur, 1);
if (isShrek) {
bmp[0].copyPixels(flash.display.BitmapData.loadBitmap("imgdreck"), fullscreen, origin);
} else {
bmp[0].copyPixels(TheGif, fullscreen, origin);
}
if ((xblur * yblur) != 1) {
bmp[0].applyFilter(bmp[0], fullscreen, origin, blur);
}
if (xblur != 1) {
xblur = xblur / 2;
}
if (yblur != 1) {
yblur = yblur / 2;
}
}
function changeit() {
if (!isShrek) {
if (fullAuto) {
var _local2 = ii;
while (_local2 == ii) {
var _local1 = random(images.length);
if (contains(_local1, imageQueue) == -1) {
imageQueue.push(_local1);
if (imageQueue.length > (images.length * 0.75)) {
imageQueue.shift();
}
ii = _local1;
}
}
var _local3 = "";
changeImage();
} else if (changeAuto && (beat == 0)) {
ii = ((ii + random(images.length - 2)) + 1) % images.length;
changeImage();
}
}
if (!isShrek) {
cc = ((cc + random(colors.length - 2)) + 1) % colors.length;
} else {
cc = shrekColors[random(shrekColors.length - 1)];
}
UIButtons.ccode = conv(cc, 2);
UIButtons.ctxt = colors[cc].toUpperCase();
UIButtons.xcode = cc % 4;
UIButtons.ycode = int(cc / 4) % 4;
UIButtons.zcode = int(cc / 16);
x = cc % 4;
y = int(cc / 4) % 4;
z = int(cc / 16);
rect(1, 0, 0, setWidth, setHeight, ((4278190080 + (5570560 * x)) + (21760 * y)) + (85 * z));
}
function conv(cn, cd) {
rs = cn.toString(16).toUpperCase();
while (rs.length < cd) {
rs = "0" + rs;
}
return(rs);
}
function rect(l, x, y, w, h, c) {
bmp[l].fillRect(new flash.geom.Rectangle(x, y, w, h), c);
}
function playForward() {
if (!isShrek) {
changeAuto = false;
fullAuto = false;
UIButtons.mode = "NORMAL";
if (ii < (images.length - 1)) {
ii++;
} else {
ii = 0;
}
if (images[ii].anim == 1) {
animTimer = setInterval(animTick, images[ii].animationLength / images[ii].frameAmount);
animCurrentFrame = 1;
} else {
clearInterval(animTimer);
animCurrentFrame = 1;
}
changeImage();
}
}
function playBack() {
if (!isShrek) {
changeAuto = false;
fullAuto = false;
UIButtons.mode = "NORMAL";
if (ii > 0) {
ii--;
} else {
ii = images.length - 1;
}
if (images[ii].anim == 1) {
animTimer = setInterval(animTick, images[ii].animationLength / images[ii].frameAmount);
animCurrentFrame = 1;
} else {
clearInterval(animTimer);
animCurrentFrame = 1;
}
changeImage();
}
}
function playAuto() {
fullAuto = false;
if (changeAuto) {
changeAuto = false;
UIButtons.mode = "NORMAL";
} else {
changeAuto = true;
UIButtons.mode = "AUTO";
}
}
function playFullAuto() {
changeAuto = false;
if (fullAuto) {
fullAuto = false;
UIButtons.mode = "NORMAL";
} else {
fullAuto = true;
UIButtons.mode = "FULL AUTO";
}
}
function colImgInitializations() {
images = new Array({name:"Megumi", anim:0}, {name:"lolicatgirl", anim:0}, {name:"kagami", anim:0}, {name:"yukari", anim:0}, {name:"konata", anim:0}, {name:"shinobu", anim:0}, {name:"yotsuba", anim:0}, {name:"misaka", anim:0}, {name:"louise", anim:0}, {name:"ibara", anim:0}, {name:"madotsuki", anim:0}, {name:"yasuna", anim:0}, {name:"lain", anim:0, frameAmount:18, animationLength:2000}, {name:"nee-san", anim:0}, {name:"kurisu", anim:0}, {name:"mao", anim:0}, {name:"tomoko", anim:0}, {name:"kyoko", anim:0}, {name:"demon sisters", anim:0}, {name:"cirno", anim:0}, {name:"kyubey", anim:0}, {name:"yui", anim:0}, {name:"renge", anim:0}, {name:"rei", anim:0}, {name:"astraea", anim:0}, {name:"taiga", anim:0}, {name:"lucy", anim:0}, {name:"nano", anim:0}, {name:"hakase", anim:0}, {name:"asuka", anim:0}, {name:"flandre", anim:0}, {name:"haruko", anim:0}, {name:"kirino", anim:0}, {name:"kanoe", anim:0}, {name:"akarin", anim:0}, {name:"mio", anim:0}, {name:"ryuuko", anim:0}, {name:"maka", anim:0}, {name:"agiri", anim:0}, {name:"hitoha", anim:0}, {name:"holo", anim:0}, {name:"karen", anim:0}, {name:"luccini", anim:0}, {name:"miho", anim:0}, {name:"miyako", anim:0}, {name:"noel", anim:0}, {name:"ritsu", anim:0}, {name:"stocking", anim:0}, {name:"ika", anim:0}, {name:"ayase", anim:0}, {name:"senjougahara", anim:0}, {name:"melfina", anim:0}, {name:"chitanda", anim:0}, {name:"hanako", anim:0}, {name:"haruhi", anim:0}, {name:"kyouko", anim:0}, {name:"mayuri", anim:0}, {name:"ruri", anim:0}, {name:"mami", anim:0}, {name:"misaki", anim:0}, {name:"miu", anim:0}, {name:"motoko", anim:0}, {name:"excel", anim:0}, {name:"miku", anim:0}, {name:"suiseiseki", anim:0}, {name:"rin", anim:0}, {name:"faye", anim:0}, {name:"fuu", anim:0}, {name:"chrona", anim:0}, {name:"chiri", anim:0}, {name:"haruhi fujioka", anim:0}, {name:"morgiana", anim:0}, {name:"shiina", anim:0}, {name:"yuno", anim:0}, {name:"mayoi", anim:0}, {name:"rika", anim:0}, {name:"eureka", anim:0}, {name:"yunocchi", anim:0});
images.sortOn("name");
ii = 0;
colors = new Array();
colors[0] = "black";
colors[1] = "brick";
colors[2] = "crimson";
colors[3] = "red";
colors[4] = "turtle";
colors[5] = "sludge";
colors[6] = "brown";
colors[7] = "orange";
colors[8] = "green";
colors[9] = "grass";
colors[10] = "maize";
colors[11] = "citrus";
colors[12] = "lime";
colors[13] = "leaf";
colors[14] = "chartreuse";
colors[15] = "yellow";
colors[16] = "midnight";
colors[17] = "plum";
colors[18] = "pomegranate";
colors[19] = "rose";
colors[20] = "swamp";
colors[21] = "dust";
colors[22] = "dirt";
colors[23] = "blossom";
colors[24] = "sea";
colors[25] = "ill";
colors[26] = "haze";
colors[27] = "peach";
colors[28] = "spring";
colors[29] = "mantis";
colors[30] = "brilliant";
colors[31] = "canary";
colors[32] = "navy";
colors[33] = "grape";
colors[34] = "mauve";
colors[35] = "purple";
colors[36] = "cornflower";
colors[37] = "deep";
colors[38] = "lilac";
colors[39] = "lavender";
colors[40] = "aqua";
colors[41] = "steel";
colors[42] = "grey";
colors[43] = "pink";
colors[44] = "bay";
colors[45] = "marina";
colors[46] = "tornado";
colors[47] = "saltine";
colors[48] = "blue";
colors[49] = "twilight";
colors[50] = "orchid";
colors[51] = "magenta";
colors[52] = "azure";
colors[53] = "liberty";
colors[54] = "royalty";
colors[55] = "thistle";
colors[56] = "ocean";
colors[57] = "sky";
colors[58] = "periwinkle";
colors[59] = "carnation";
colors[60] = "cyan";
colors[61] = "turquoise";
colors[62] = "powder";
colors[63] = "white";
cc = 0;
}
function songStuff() {
songs = new Array();
ss = 0;
songs = new Array({myname:"Madeon - Finale", myFile:"finale", buildUp:1, buildUpFile:"finaleBuild", myRhythm:"x..xo...x...o...x..xo...x...o...x..xo...x...o...x..xo...x...oxoox..xo...x...o...x..xo...x...o...x..xo...x...o...x...o...x...oooo"}, {myname:"Imagine Dragons - Radioactive", myFile:"Radioactive", myRhythm:"o...x.o.o...x.o.o...x...o...x.o.o...x.o.o...x.......x.......x..."}, {myname:"Row Row Fight the Power", myFile:"RowRow", myRhythm:"o...x...o...x...o...x...o...x...o...x...o...x...o...x...o...xxx.x...x...o...x...o...x...o...x...o...x...o...x...o...o...o...o..."}, {myname:"Outlaw Star OST - Desire", myFile:"Desire.wav", myRhythm:"o...x...o.o.x.x...o.x...o.o.x...o...x...o.o.x.x...o.x...oo..x.x.o...x...o.o.x.x...o.x...oo..x.x.o...x...o.o.x.x...o.x...x...x.xx"}, {myname:"The Bloody Beetroots - Out of Sight", myFile:"Sight", myRhythm:"o.....oox.......o.o....ox.......o.....oox...o...o.o....ox.......o......ox.......o.o....ox.......o.....oox...o...o.o.....+......."}, {myname:"Buckethead - Smile Without a Face", myFile:"Smile", myRhythm:"o......ox.....o.o.......x.......o......ox.....o.o.....o.x.ooooooo......ox.....o.o.......x.......o......ox.....o.o.....o.x.oooooo"}, {myname:"Crystal Castles - Courtship Date", myFile:"Courtship", myRhythm:"o...x.....o.x...o...x.....o.x...o...x.....o.x...o...x.....o.+..."}, {myname:"Aphex Twin - Vordhosbn", myFile:"Vordhosbn", myRhythm:"o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-o...x..---o.x...-.o.x------.x..-o.-.x.o..-.ox-.-----x-o-------o-"}, {myname:"Culprate - Orange Sunrise, Sunset", myFile:"Orange", myRhythm:"o.o.x..o.x.x....o..ox......x....o...x....o.x....o...x....o.xx...o.o.x..o.x.x....o..ox......x....o...x....o.x...xo...x....o.xx..."}, {myname:"Hyper - Spoiler", myFile:"spoiler1", myRhythm:"x+......o+......x+......o+......x+......o+......x+......o+......x+......o+......x+......o+......x+......o+......x+..............x+......o+......x+......o+......x+......o+......x+......o+......x+......o+......x+......o+......x---------------x+......o......."}, {myname:"DJ Fresh - Kryptonite", myFile:"Kryptonite", myRhythm:"o.x..ox.o.x..ox.o.x..ox.o.x..ox.o.x..xx.o.x..xx.o.x..xx.o.x..xx.o.x..ox.o.x..ox.o.x..ox.o.x..ox.o.x..xx.o.x..xx.o.xx.xx.o.x..xx."}, {myname:"STS9 - Beyond Right Now (Glitch Mob Remix)", myFile:"Glitch", myRhythm:"o.......x...o.......o...xxxxx...o.o.....x...o.......o...xxxxx...o.......x...o.......o...xxxxx...o.......x...o...o.......+.......o.......x...o.......o...xxxxx...o.o.....x...o...-.-.o.-.xxx+x+x+o.......x...o.......o...xxxxx...o.......x...o...o...x.x.+......."}, {myname:"Kanye West - Hold My Liquor", myFile:"Liquor", myRhythm:"o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...o...............+..."}, {myname:"Triple-Q - All Star Circulation", myFile:"All-Star", myRhythm:"o...x..oo.o.x...o...x..oo.o.x...o...x..oo.o.x...o...x..oo.x.x...o...x..oo.o.x...o...x..oo.o.x...o...x..oo.o.x...o...x..oo.o.x..."});
UIButtons.stxt = songs[0].myname.toUpperCase();
song = new Sound();
song.attachSound(songs[ss].myFile);
if (songs[ss].buildUp == 1) {
delaySong();
} else {
song.start(0.01, 9999);
beat = (nextup = 0);
xblur = (yblur = 1);
}
blen = song.duration / length(songs[ss].myRhythm);
}
function checkForEndOfDelay() {
if (thebuildSong.position > (thebuildSong.duration - 50)) {
song.start(0.01, 9999);
beat = (nextup = 0);
xblur = (yblur = 1);
clearInterval(checkForEndBuild);
}
}
function delaySong() {
thebuildSong = new Sound();
thebuildSong.attachSound("finaleBuild");
thebuildSong.start();
checkForEndBuild = setInterval(this, "checkForEndOfDelay", 5);
}
function changeSong() {
song.stop();
song.attachSound(songs[ss].myFile);
song.start(0.01, 9999);
beat = (nextup = 0);
xblur = (yblur = 1);
UIButtons.stxt = songs[ss].myname.toUpperCase();
blen = song.duration / length(songs[ss].myRhythm);
}
function songForward() {
if (!isShrek) {
if (ss < (songs.length - 2)) {
ss++;
} else {
ss = 0;
}
changeSong();
}
}
function songBack() {
if (!isShrek) {
if (ss > 0) {
ss--;
} else {
ss = songs.length - 2;
}
changeSong();
}
}
var changeAuto = false;
var fulAuto = false;
UIButtons.mode = "AUTO";
colImgInitializations();
var song = "";
var rhythm = "";
var setHeight = 720;
var setWidth = 1280;
var preShrekSS = 0;
var isShrek = false;
var shrekActivated = false;
var shrekedOut = false;
var shrekChance = 2;
var shrekColors = [9, 11, 12, 13, 20, 24, 28, 30, 33, 40, 45, 47, 52, 56, 60, 61];
dreck.enabled = false;
var imageQueue = new Array();
var TheGif;
var animCurrentFrame = 1;
changeImage();
if (images[ii].anim == 1) {
animTimer = setInterval(animTick, images[ii].animationLength / images[ii].frameAmount);
animCurrentFrame = 1;
} else {
clearInterval(animTimer);
animCurrentFrame = 1;
}
fullscreen = new flash.geom.Rectangle(0, 0, setWidth, setHeight);
origin = new flash.geom.Point(0, 0);
focusRect = false;
tabEnabled = false;
bmp = new Array();
x = 0;
while (x < 2) {
bmp[x] = new flash.display.BitmapData(setWidth, setHeight, true, 4278190080);
x++;
}
bh.attachBitmap(bmp[0], 0);
br.attachBitmap(bmp[1], 1);
if (isShrek) {
bmp[0].copyPixels(flash.display.BitmapData.loadBitmap("imgdreck"), new flash.geom.Rectangle(0, 0, setWidth, setHeight), origin);
} else {
bmp[0].copyPixels(TheGif, new flash.geom.Rectangle(0, 0, setWidth, setHeight), origin);
}
songStuff();
this.desiredFrameRate = 60;
this.callFunctionInt = setInterval(this, "otherOnEnterFrame", 10 / this.desiredFrameRate);
UIButtons.btnForward._alpha = 30;
UIButtons.btnBack._alpha = 30;
UIButtons.btnSongBack._alpha = 30;
UIButtons.btnSongForward._alpha = 30;
UIButtons.btnAuto._alpha = 30;
UIButtons.btnFullAuto._alpha = 30;
UIButtons.showHelp._alpha = 30;
UIButtons.btnForward.onRollOver = function () {
this._alpha = 100;
};
UIButtons.btnForward.onRollOut = function () {
this._alpha = 30;
};
UIButtons.btnBack.onRollOver = function () {
this._alpha = 100;
};
UIButtons.btnBack.onRollOut = function () {
this._alpha = 30;
};
UIButtons.btnSongBack.onRollOver = function () {
this._alpha = 100;
};
UIButtons.btnSongBack.onRollOut = function () {
this._alpha = 30;
};
UIButtons.btnSongForward.onRollOver = function () {
this._alpha = 100;
};
UIButtons.btnSongForward.onRollOut = function () {
this._alpha = 30;
};
UIButtons.btnAuto.onRollOver = function () {
this._alpha = 100;
};
UIButtons.btnAuto.onRollOut = function () {
this._alpha = 30;
};
UIButtons.btnFullAuto.onRollOver = function () {
this._alpha = 100;
};
UIButtons.btnFullAuto.onRollOut = function () {
this._alpha = 30;
};
UIButtons.showHelp.onRollOver = function () {
this._alpha = 100;
};
UIButtons.showHelp.onRollOut = function () {
this._alpha = 30;
};
btnUiHide.onRollOver = function () {
this._alpha = 100;
};
btnUiHide.onRollOut = function () {
if (this._y == 710) {
this._alpha = 0;
} else if (btnUiHide.enabled) {
this._alpha = 8;
}
};
dreck.onRelease = function () {
if (isShrek) {
isShrek = false;
ss = preShrekSS;
changeSong();
UIButtons.mode = "NORMAL";
dreck._alpha = 0;
dreck.enabled = false;
shrekActivated = false;
} else {
isShrek = true;
preShrekSS = ss;
ss = songs.length - 1;
changeSong();
UIButtons.mode = "SHREK IS DRECK";
}
};
UIButtons.btnForward.onRelease = playForward;
UIButtons.btnBack.onRelease = playBack;
UIButtons.btnSongBack.onRelease = songBack;
UIButtons.btnSongForward.onRelease = songForward;
UIButtons.btnAuto.onRelease = playAuto;
UIButtons.btnFullAuto.onRelease = playFullAuto;
btnUiHide.onRelease = activate;
UIButtons.showHelp.onRelease = toggleHelp;
hiding = false;
showing = false;
keylistener = new Object();
keylistener.onKeyDown = function () {
if (Key.getCode() == 39) {
playForward();
}
if (Key.getCode() == 37) {
playBack();
}
if (Key.getCode() == 38) {
songForward();
}
if (Key.getCode() == 40) {
songBack();
}
if (Key.getCode() == 65) {
playAuto();
}
if (Key.getCode() == 70) {
playFullAuto();
}
if (Key.getCode() == 72) {
activate();
}
if (Key.getCode() == 66) {
nextAnimationFrame();
}
};
Key.addListener(keylistener);
var blackening = false;
contains = function (input, arrayData) {
i = 0;
while (i < arrayData.length) {
if (arrayData[i] == input) {
return(1);
}
i++;
}
return(-1);
};
Symbol 171 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 172 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";
}