Frame 1
function startHandler() {
getURL ("http://www.ideawork.com", "_blank");
}
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var item1 = new ContextMenuItem("Created by Ideawork... check us out!", startHandler);
my_cm.customItems.push(item1);
this.menu = my_cm;
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var item1 = new ContextMenuItem("created by ideawork check out our site.", startHandler);
my_cm.customItems.push(item1);
_root.menu = my_cm;
Stage.align = "LT";
Stage.scaleMode = "noScale";
winWatcher = new Object();
winWatcher.cb = this;
winWatcher.onResize = function () {
trace("resize " + navBar);
sW = Stage.width;
sH = Stage.height;
hW = Stage.width / 2;
hH = Stage.height / 2;
bg._width = sW;
bg._height = sH;
bg._x = 0;
bg._y = 0;
if (sH < (622 - navBar._height)) {
}
};
Stage.addListener(winWatcher);
winWatcher.onResize();
Frame 79
lossMessage._visible = false;
levelMessage._visible = false;
endPost._visible = false;
challengeFriend._visible = false;
champs._visible = false;
postScore._visible = false;
var game = (new com.cds.zumanity.ZumanityGame(this));
godMenu.game = this.game;
var connection_nc = new NetConnection();
connection_nc.connect(null);
var stream_ns0 = new NetStream(connection_nc);
vidTarget.my_video.attachVideo(stream_ns0);
stream_ns.setBufferTime(10);
var connection_nc1 = new NetConnection();
connection_nc1.connect(null);
var stream_ns1 = new NetStream(connection_nc1);
var connection_nc2 = new NetConnection();
connection_nc2.connect(null);
var stream_ns2 = new NetStream(connection_nc2);
var connection_nc3 = new NetConnection();
connection_nc3.connect(null);
var stream_ns3 = new NetStream(connection_nc3);
levelClipTarget.my_video.attachVideo();
var connection_nc4 = new NetConnection();
connection_nc4.connect(null);
var stream_ns4 = new NetStream(connection_nc4);
var connection_nc5 = new NetConnection();
connection_nc5.connect(null);
var stream_ns5 = new NetStream(connection_nc5);
var connection_nc6 = new NetConnection();
connection_nc6.connect(null);
var stream_ns6 = new NetStream(connection_nc6);
var connection_nc7 = new NetConnection();
connection_nc7.connect(null);
var stream_ns7 = new NetStream(connection_nc7);
var connection_nc8 = new NetConnection();
connection_nc8.connect(null);
var stream_ns8 = new NetStream(connection_nc8);
var connection_nc9 = new NetConnection();
connection_nc9.connect(null);
var stream_ns9 = new NetStream(connection_nc9);
var connection_nc10 = new NetConnection();
connection_nc10.connect(null);
var stream_ns10 = new NetStream(connection_nc10);
var checkBufferTime = function (cb) {
var _local1 = Math.min(Math.round((cb.stream_ns.bufferLength / cb.stream_ns.bufferTime) + 100), 100);
bufferBAR.updateBar(_local1);
if (_local1 > 0.9) {
bufferBAR._visible = false;
} else {
bufferBAR._visible = true;
}
};
var buffer_interval = setInterval(checkBufferTime, 100, this);
stop();
var my_sound = new Sound();
my_sound.onSoundComplete = function () {
my_sound.start();
trace("replay music " + my_sound);
};
var musicPlaying = true;
navBar.audioOFF._visible = false;
var soundToggle = function () {
trace("sound toggle");
if (game.introComplete) {
if (musicPlaying) {
this.createEmptyMovieClip("music_mc", this.getNextHighestDepth());
music_mc.attachAudio(stream_ns0);
var _local2 = new Sound(music_mc);
_local2.setVolume(0);
this.createEmptyMovieClip("music_mc1", this.getNextHighestDepth());
music_mc1.attachAudio(stream_ns1);
var _local3 = new Sound(music_mc1);
_local3.setVolume(0);
my_sound.stop();
musicPlaying = false;
navBar.audioON._visible = false;
navBar.audioOFF._visible = true;
} else {
my_sound.start();
this.createEmptyMovieClip("music_mc", this.getNextHighestDepth());
music_mc.attachAudio(stream_ns0);
var _local2 = new Sound(music_mc);
_local2.setVolume(100);
this.createEmptyMovieClip("music_mc1", this.getNextHighestDepth());
music_mc1.attachAudio(stream_ns1);
var _local3 = new Sound(music_mc1);
_local3.setVolume(100);
musicPlaying = true;
navBar.audioON._visible = true;
navBar.audioOFF._visible = false;
}
} else if (musicPlaying) {
this.createEmptyMovieClip("music_mc", this.getNextHighestDepth());
music_mc.attachAudio(stream_ns0);
var _local2 = new Sound(music_mc);
_local2.setVolume(0);
musicPlaying = false;
navBar.audioON._visible = false;
navBar.audioOFF._visible = true;
} else {
this.createEmptyMovieClip("music_mc", this.getNextHighestDepth());
music_mc.attachAudio(stream_ns0);
var _local2 = new Sound(music_mc);
_local2.setVolume(100);
my_sound.start();
musicPlaying = true;
navBar.audioON._visible = true;
navBar.audioOFF._visible = false;
}
};
Symbol 5 MovieClip [vidTarget] Frame 1
stop();
Symbol 10 MovieClip [VideoPlayer] Frame 1
#initclip 70
Object.registerClass("VideoPlayer", mx.video.VideoPlayer);
#endinitclip
Symbol 14 MovieClip [FLVPlayback] Frame 1
#initclip 71
Object.registerClass("FLVPlayback", mx.video.FLVPlayback);
#endinitclip
stop();
Symbol 32 MovieClip Frame 1
_root.stop();
tb = _root.getBytesTotal();
this.onEnterFrame = function () {
bl = _root.getBytesLoaded();
if (bl >= tb) {
_root.play();
delete this.onEnterFrame;
} else {
percent = Math.round((bl / tb) * 100);
loadBar_mc._xscale = percent;
}
};
Symbol 39 MovieClip Frame 1
stop();
Symbol 44 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 1
stop();
Symbol 77 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 1
stop();
Symbol 293 MovieClip [__Packages.com.cds.zumanity.ZumanityGame] Frame 0
class com.cds.zumanity.ZumanityGame
{
var mc, myService, timeListener, levels, levelNames, xNode, loseClip, point_1, point_2, levelClip, winClip, levelName, lossMessage, losses, cuedFunctions, clipTime;
function ZumanityGame (inMC) {
mc = inMC;
myService = new mx.remoting.Service("http://www.zumanityhoops.com/flashservices/gateway", null, "remoteservices", null, null);
mc.myClass = this;
timeListener = new Object();
var xml = new XML();
xml.ignoreWhite = true;
xml.cb = this;
xml.onLoad = function () {
this.cb.xNode = xml.firstChild;
this.cb.build();
};
var _local2 = Math.random();
trace("ran : " + _local2);
introVid = intro_absolute;
var _local3 = "levels_absolute.xml?ran=" + _local2;
var _local4 = "levels_absolute.xml";
xml.load(_local3);
}
function build() {
com.mosesSupposes.fuse.ZigoEngine.register(com.mosesSupposes.fuse.FuseItem, com.mosesSupposes.fuse.FuseFMP, com.mosesSupposes.fuse.PennerEasing);
com.mosesSupposes.fusefx.FuseFX.register(com.mosesSupposes.util.MixerFX, com.mosesSupposes.util.TextFX);
mc._parent.winWatcher.onResize();
mc._parent.navBar._visible = true;
levels = new Array();
levelNames = new Array();
levels = com.jc.util.SortXML.sortBy("id", xNode);
var _local2 = 0;
while (_local2 < levels.length) {
levelNames.push(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[_local2], "./levelID").firstChild.nodeValue);
_local2++;
}
mc.levelIntro._visible = false;
mc.onEnterFrame = function () {
this.myClass.updatePosition();
};
mc.levelClipTarget._visible = false;
_local2 = 0;
while (_local2 < levelNames.length) {
trace("levelName : " + levelNames[_local2]);
mc[levelNames[_local2]]._visible = false;
mc[levelNames[_local2]].stop();
mc.levelMessage[levelNames[_local2]]._visible = false;
mc.levelMessage[levelNames[_local2]].stop();
_local2++;
}
mc.navBar.challengeBut.cb = this;
mc.navBar.challengeBut.onRelease = function () {
this.cb.challenge();
};
startGame();
}
function fadeOut(window) {
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push({target:window, alpha:0, time:1, y:"5", ease:com.robertprenner.Ease.outQuad});
_local2.push({func:closeDisplay, args:window});
_local2.start();
}
function showWindow(window) {
var _local2 = mc[window];
var _local3 = new com.mosesSupposes.fuse.Fuse();
_local3.push({target:_local2, start_alpha:0, time:0.5, y:"-5", ease:com.robertprenner.Ease.outSine});
_local3.start();
_local2.show();
}
function challenge() {
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push({target:mc.challengeFriend, start_alpha:0, time:0.5, y:"-5", ease:com.robertprenner.Ease.outSine});
_local2.start();
mc.challengeFriend.show();
}
function playFinalTitle() {
mc.challengeFriend._y = mc.challengeFriend._y - 50;
mc.challengeFriend.swapDepths(mc.goldSeal);
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push({target:mc.goldSeal, y:300, time:1, trigger:0.1, ease:"easeOutCirc"});
_local2.push({target:mc.navBar, y:"-100", time:1, ease:"easeOutQuint"});
_local2.push({func:gameWinner, scope:this});
_local2.start();
}
function gameWinner() {
mc.endPost._visible = true;
mc.endPost.postBut.cb = this;
mc.endPost.postBut.onRelease = function () {
trace("post");
this.cb.postGameWinner();
};
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push({target:mc.endPost, alpha:100, start_alpha:0, y:"-5", time:0.5});
_local2.start();
}
function postGameWinner() {
var _local2 = mc.endPost.myName.text;
trace("post winner : " + this);
trace("winner name : " + _local2);
mc.endPost.err.text = "";
if ((_local2.length < 2) || (_local2 == undefined)) {
mc.endPost.err.text = "ENTER YOUR NAME PLEASE";
trace("nope");
} else {
var _local3 = new Object();
_local3.myName = _local2;
_local3.myScore = 8;
var _local4 = myService.zumanity_postscore(_local3);
_local4.__set__responder(new mx.rpc.RelayResponder(this, "post_Result", "post_Fault"));
}
}
function post_Result(re) {
fadeOut(mc.endPost);
mc.champs._y = mc.champs._y - 50;
showWindow("champs");
}
function post_Fault(re) {
for (var _local3 in re) {
trace((("val : " + _local3) + " is : ") + re[_local3]);
for (var _local2 in re[_local3]) {
trace((("val : " + _local2) + " is : ") + re[_local3][_local2]);
}
}
}
function startGame() {
for (var _local3 in levelNames) {
mc[levelNames[_local3]].stop();
mc[levelNames[_local3]].circ.useHandCursor = false;
mc[levelNames[_local3]].circ.cb = this;
mc[levelNames[_local3]].circ.onRollOver = function () {
if (this.cb.gameAlmostON) {
this.cb.gameAlmostON = false;
this.cb.mc.levelIntro.gotoAndPlay("countdown");
this.cb.volume(100);
this.cb.toggleCurrent();
}
};
}
while (_local3 < 10) {
mc["stream_ns" + _local3].cb = this;
mc["stream_ns" + _local3].onStatus = function (infoObject) {
for (var _local2 in infoObject) {
}
if (infoObject[_local2] == "NetStream.Play.Stop") {
this.cb.videoFinished();
}
};
mc["stream_ns" + _local3].onCuePoint = function (infoObject) {
var _local3 = false;
for (var _local5 in infoObject) {
if (_local5 != "parameters") {
trace((_local5 + " = ") + infoObject[_local5]);
} else {
trace("parameters =");
if (infoObject.parameters != undefined) {
for (var _local4 in infoObject.parameters) {
trace(((" " + _local4) + ": ") + infoObject.parameters[_local4]);
if (_local4 == "endcue") {
this.cb.mc.stream_ns1.pause();
this.cb.playFinalTitle();
break;
}
if (_local4 == "curtain") {
_local3 = true;
}
}
} else {
trace("undefined");
}
}
}
trace("---------");
if (_local3) {
trace("close");
}
trace("onCuePoint: " + _local3);
this.cb.updateLossClip(infoObject.parameters.vid);
};
mc["stream_ns" + _local3].onMetaData = function (infoObject) {
this.cb.clipTime = infoObject.duration;
};
_local3++;
}
mc.curtain.gotoAndPlay("open");
var _local7 = introVid;
mc.stream_ns0.play(_local7);
trace("started INTRO : " + _local7);
}
function videoFinished() {
if (current == 4) {
navTransform();
}
trace("video finished");
mc.stream_ns0.close();
mc.stream_ns1.close();
mc.vidTarget.my_video.clear();
mc.successMSG._alpha = 0;
mc.failMSG._alpha = 0;
if (!introComplete) {
mc.skipBut._visible = false;
mc.skipBut.enabled = false;
introComplete = true;
startGameIntro();
} else if (!gameON) {
if (lossPlaying) {
lossPlaying = false;
tryAgainPlaying = true;
mc.my_video._visible = true;
mc.vidTarget.my_video.attachVideo(mc.stream_ns1);
var _local5 = loseClip;
mc.stream_ns1.play(_local5);
if (mc.musicPlaying) {
mc.createEmptyMovieClip("music_mc2", mc.getNextHighestDepth());
mc.music_mc2.attachAudio(mc.stream_ns1);
var _local3 = new Sound(mc.music_mc2);
_local3.setVolume(100);
} else {
mc.createEmptyMovieClip("music_mc2", mc.getNextHighestDepth());
mc.music_mc2.attachAudio(mc.stream_ns1);
var _local3 = new Sound(mc.music_mc2);
_local3.setVolume(0);
}
} else if (tryAgainPlaying) {
stageTransform(false);
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push({target:mc.lossMessage, start_alpha:0, time:0.5, y:"-5", ease:com.robertprenner.Ease.outSine});
_local2.start();
tryAgainPlaying = false;
totalLosses++;
if (totalLosses > maxLosses) {
mc.lossMessage.doOver.text = "THERE'S ALWAYS NEXT TIME";
mc.lossMessage._visible = true;
mc.lossMessage.replayBut._visible = false;
mc.lossMessage.replayBut.enabled = false;
} else {
mc.lossMessage._visible = true;
mc.lossMessage.display(this);
var _local4 = (maxLosses - totalLosses) + 1;
if (_local4 == 2) {
mc.lossMessage.doOver.text = "YOU MAY HAVE TWO DO-OVERS PER GAME";
} else {
mc.lossMessage.doOver.text = "YOU ONLY HAVE ONE DO OVER LEFT!";
}
}
} else {
startLevel();
}
} else {
levelWinner();
}
}
function updatePosition() {
if (gameON) {
chron++;
if (chron >= levelTime) {
}
var _local2 = new Object();
_local2.remaining = levelTime - chron;
_local2.passed = chron;
_local2.total = levelTime;
onTime(_local2);
point_1 = new flash.geom.Point(_xmouse - mc[currentLevel]._x, _ymouse - mc[currentLevel]._y);
point_2 = new flash.geom.Point(mc[currentLevel].circ._x, mc[currentLevel].circ._y);
var _local3 = flash.geom.Point.distance(point_1, point_2);
if (tolerance < _local3) {
outs++;
if (outs > maxOuts) {
levelOut();
}
}
}
}
function startLevel(level) {
chron = 0;
lossClip = 1;
outs = 0;
if (level == undefined) {
level = current;
} else {
current = level;
}
currentLevel = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./levelID").firstChild.nodeValue;
mc[currentLevel].circ._visible = false;
for (var _local3 in levelNames) {
mc[levelNames[_local3]]._visible = false;
}
trace("current lvl : " + currentLevel);
mc[currentLevel].gotoAndStop(1);
tolerance = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./tolerance").firstChild.nodeValue);
maxOuts = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./maxOuts").firstChild.nodeValue);
levelTime = Number(com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./levelTime").firstChild.nodeValue);
levelClip = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./levelClip").firstChild.nodeValue;
winClip = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./winClip").firstChild.nodeValue;
loseClip = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./loseClip").firstChild.nodeValue;
var _local8 = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./tunes").firstChild.nodeValue;
levelName = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./name").firstChild.nodeValue;
lossMessage = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./lossMessage").firstChild.nodeValue;
trace("tol " + tolerance);
var _local6 = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(levels[current], "./lossClips");
var _local2 = _local6.firstChild;
var _local3 = 0;
losses = new Array();
while (_local2 != null) {
losses[_local3] = _local2;
_local2 = _local2.nextSibling;
_local3++;
}
startLevelMessage();
mc.vidTarget.my_video.clear();
var _local4 = current + 2;
mc.vidTarget.my_video.attachVideo(mc["stream_ns" + _local4]);
mc.levelClipTarget._visible = true;
var _local7 = levelClip;
mc["stream_ns" + _local4].play(_local7);
toggleCurrent();
trace("play : " + levelClip);
}
function closeDisplay(obj) {
obj._visible = false;
}
function startLevelMessage() {
if (current > 0) {
mc.levelMessage._visible = true;
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push({target:mc.levelMessage, start_alpha:0, time:0.5, y:"-5", ease:com.robertprenner.Ease.outSine});
_local2.start();
mc.levelMessage[currentLevel].gotoAndStop(1);
mc.levelMessage.display(this);
} else {
levelMessagePlay();
}
}
function levelMessagePlay() {
var _local3 = new com.mosesSupposes.fuse.Fuse();
_local3.push({target:mc.levelMessage, alpha:0, time:0.5, y:"5", ease:com.robertprenner.Ease.outSine});
_local3.push({func:closeDisplay, args:mc.levelMessage});
_local3.start();
trace("almost");
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push({target:mc[currentLevel], start_alpha:0, delay:0.5, ease:"easeOutSine", time:1});
_local2.push({func:levelReady, scope:this});
_local2.start();
mc[currentLevel]._visible = true;
}
function ballShowing() {
}
function showBall() {
mc[currentLevel].circ._visible = true;
gameAlmostON = true;
}
function levelReady() {
mc.levelIntro._visible = true;
mc.levelIntro.gotoAndPlay(2);
}
function curtainsAreOpen() {
mc.levelMessage[currentLevel].play();
}
function cueFunction(obj, fuct) {
cuedFunctions[fuct] = new Object({owner:obj, method:fuct});
}
function playCuedFunctions() {
for (var _local2 in cuedFunctions) {
cuedFunctions[_local2].owner[cuedFunctions[_local2].method];
}
}
function toggleCurrent() {
var _local2 = current + 2;
mc["stream_ns" + _local2].pause();
}
function levelWinner() {
stageTransform(false);
trace("win");
godMode = false;
var _local2 = current + 2;
mc["stream_ns" + _local2].close();
mc[levelNames[current]]._visible = false;
mc[levelNames[current]].stop();
gameON = false;
if (current == 3) {
navTransform();
}
next();
trace("now playing: " + winClip);
mc.vidTarget.my_video.attachVideo(mc.stream_ns1);
var _local4 = winClip;
mc.stream_ns1.play(_local4);
if (mc.musicPlaying) {
mc.createEmptyMovieClip("music_mc5", mc.getNextHighestDepth());
mc.music_mc5.attachAudio(mc.stream_ns1);
var _local3 = new Sound(mc.music_mc5);
_local3.setVolume(100);
} else {
mc.createEmptyMovieClip("music_mc5", mc.getNextHighestDepth());
mc.music_mc5.attachAudio(mc.stream_ns1);
var _local3 = new Sound(mc.music_mc5);
_local3.setVolume(0);
}
volume(20);
}
function levelOut() {
if (!godMode) {
var _local2 = current + 2;
mc["stream_ns" + _local2].close();
mc[levelNames[current]]._visible = false;
mc[levelNames[current]].stop();
gameON = false;
lossPlaying = true;
volume(20);
mc.stream_ns0.close();
mc.stream_ns1.close();
mc.vidTarget.my_video.attachVideo(mc.stream_ns0);
trace("play loss " + lossClip);
var _local4 = losses[lossClip].firstChild.nodeValue;
mc.stream_ns0.play(_local4);
if (mc.musicPlaying) {
mc.createEmptyMovieClip("music_mc9", mc.getNextHighestDepth());
mc.music_mc9.attachAudio(mc.stream_ns0);
var _local3 = new Sound(mc.music_mc9);
_local3.setVolume(100);
} else {
mc.createEmptyMovieClip("music_mc7", mc.getNextHighestDepth());
mc.music_mc7.attachAudio(mc.stream_ns1);
var _local3 = new Sound(mc.music_mc7);
_local3.setVolume(0);
}
}
}
function navTransform() {
trace("nav trans");
if (navDown) {
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push([{target:mc.navBar, time:0.5, y:"-75", ease:com.robertprenner.Ease.outQuad}]);
_local2.start();
navDown = false;
} else {
trace("nav down");
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push([{target:mc.navBar, time:0.5, y:"75", ease:com.robertprenner.Ease.outQuad}]);
_local2.start();
navDown = true;
}
}
function stageTransform(goSmall) {
if (!goSmall) {
if (stageIsSmall) {
stageIsSmall = false;
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push([{target:mc.goldSeal, scale:100, time:0.5, y:"75", ease:com.robertprenner.Ease.outQuad}, {target:mc.top, y:"75", time:0.5, ease:com.robertprenner.Ease.outQuad}]);
_local2.start();
}
} else {
stageIsSmall = true;
trace("trans");
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push([{target:mc.goldSeal, scale:50, time:0.5, y:"-75", ease:com.robertprenner.Ease.outQuad}, {target:mc.top, y:"-75", time:0.5, ease:com.robertprenner.Ease.outQuad}]);
_local2.start();
}
}
function fadeSound(lvl) {
if (mc.musicPlaying) {
var _local2 = lvl;
var _local3 = 100;
if ((mc.my_sound.getVolume() < 50) || (mc.my_sound.position == 0)) {
mc.my_sound.stop();
com.mosesSupposes.fuse.ZigoEngine.doTween(mc.my_sound, [com.mosesSupposes.util.MixerFX.VOLUME, com.mosesSupposes.util.MixerFX.PAN], [0, -100], 0);
mc.my_sound.start(0, 99);
_local2 = 100;
_local3 = 0;
}
com.mosesSupposes.fuse.ZigoEngine.doTween(mc.my_sound, com.mosesSupposes.util.MixerFX.VOLUME, _local2, 3, "easeInOutQuint", 0, {scope:mc.my_sound, func:function () {
if (this.getVolume() == 0) {
this.stop();
}
}});
com.mosesSupposes.fuse.ZigoEngine.doTween(mc.my_sound, com.mosesSupposes.util.MixerFX.PAN, _local3, 3, "easeInOutQuint");
} else {
mc.my_sound.stop();
}
}
function volume(lvl) {
fadeSound(lvl);
}
function next() {
current++;
}
function prev() {
}
function skipIntro() {
videoFinished();
}
function addTimeListener(lis) {
timeListener[lis.name] = lis;
}
function onTime(time) {
for (var _local3 in timeListener) {
timeListener[_local3].onTime(time);
}
}
function updateLevelTimer(myTime) {
mc.goldSeal[currentLevel + "timer"]._visible = true;
var _local2 = mc.goldSeal[currentLevel + "timer"].masker;
_local2._x = _local2._width - ((myTime.remaining / myTime.total) * _local2._width);
}
function replayLevel(levelNum, godMode) {
if (levelNum == undefined) {
levelNum = current;
}
if ((godMode == true) && (introComplete)) {
this.godMode = true;
}
mc[levelNames[levelNum]].gotoAndStop(1);
startLevel(levelNum);
mc.stream_ns0.close();
mc.stream_ns1.close();
}
function startGameIntro() {
mc.gameIntro._visible = true;
mc.gameIntro.play();
}
function gameIntroComplete() {
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push({target:mc.gameIntro, alpha:0, time:0.5, ease:com.robertprenner.Ease.outSine});
_local2.push({func:closeDisplay, args:mc.gameIntro});
_local2.start();
startLevel();
mc.my_sound.loadSound("tunes/tunes.mp3", true);
mc.my_sound.stop();
}
function startDemo() {
trace("demo");
}
function levelIntroComplete() {
trace((("begin " + clipTime) + " current :") + currentLevel);
mc.goldSeal[currentLevel + "timer"].gotoAndStop(1);
var _local2 = new com.mosesSupposes.fuse.Fuse();
_local2.push({target:mc.goldSeal[currentLevel + "timer"], _frame:90, ease:"linear", time:clipTime});
_local2.start();
mc.levelIntro._visible = false;
gameON = true;
mc[currentLevel].play();
stageTransform(transformer());
}
function updateLossClip(vidNum) {
if (vidNum == undefined) {
} else {
lossClip = vidNum - 1;
}
}
function transformer() {
var _local2 = false;
for (var _local3 in transformLevels) {
trace("trans : " + transformLevels[_local3]);
if (transformLevels[_local3] == current) {
trace("found");
_local2 = true;
}
}
return(_local2);
}
function randNum() {
var _local1 = 1000;
var _local3 = 10000;
var _local2 = Math.floor(Math.random() * ((_local3 - _local1) + 1)) + _local1;
return(_local2);
}
var current = 0;
var gameON = false;
var gameAlmostON = false;
var intro_absolute = "http://www2.zumanityhoops.com/clips/intro_a.flv";
var introVid = "clips/intro_a.flv";
var winClipDuration = 0;
var godMode = false;
var currentClipTime = 0;
var curtainsOpen = false;
var transformLevels = [2, 3, 4, 5, 6, 7];
var transformNav = [3];
var stageIsSmall = false;
var tolerance = 100;
var maxOuts = 20;
var outs = 0;
var levelTime = 300;
var chron = 0;
var currentLevel = "levelIII";
var tryAgainPlaying = false;
var lossPlaying = false;
var lossClip = 1;
var introComplete = false;
var navDown = false;
var totalLosses = 0;
var maxLosses = 2;
}
Symbol 294 MovieClip [__Packages.com.mosesSupposes.fuse.FuseKitCommon] Frame 0
class com.mosesSupposes.fuse.FuseKitCommon
{
static var logOutput;
function FuseKitCommon () {
}
static function _cts() {
return("|_tint|_tintPercent|_brightness|_brightOffset|_contrast|_invertColor|_colorReset|_colorTransform|");
}
static function _resetTo100() {
return("|_alpha|_contrast|_invertColor|_tintPercent|_xscale|_yscale|_scale|");
}
static function _resetTo0() {
return("|_brightness|_brightOffset|_colorReset|_rotation|");
}
static function _underscoreable() {
return(_cts() + "_frame|_x|_y|_xscale|_yscale|_scale|_width|_height|_size|_rotation|_alpha|_fade|_visible|");
}
static function _cbprops() {
return("|skipLevel|cycles|roundResults|extra1|extra2|func|scope|args|startfunc|startscope|startargs|updfunc|updscope|updargs|");
}
static function _fuseEvents() {
return("|onStart|onStop|onPause|onResume|onAdvance|onComplete|");
}
static function _fuseprops() {
return("|command|label|delay|event|eventparams|target|addTarget|trigger|startAt|ease|easing|seconds|duration|time|");
}
static function _validateFuseCommand(c, inGroup, hasArg, outputLevel, simple) {
var _local1 = false;
var _local2 = false;
switch (c) {
case "start" :
case "stop" :
case "pause" :
case "resume" :
case "setStartProps" :
if (inGroup != true) {
_local1 = true;
}
break;
case "delay" :
case "trigger" :
if (simple == true) {
if (hasArg == true) {
_local1 = true;
}
} else {
_local2 = true;
}
inGroup = false;
break;
case "skipTo" :
if (!((hasArg == true) && (inGroup != true))) {
break;
}
_local1 = true;
}
if ((outputLevel > 0) && (_local1 == false)) {
error("109", c, inGroup, _local2);
}
return(_local1);
}
static function output(s) {
if (typeof(logOutput) == "function") {
logOutput(s);
} else {
trace(s);
}
}
static function error(errorCode) {
var _local3 = arguments[1];
var _local4 = arguments[2];
var _local6 = arguments[3];
if (VERBOSE != true) {
output(("[FuseKitCommon#" + errorCode) + "]");
return(undefined);
}
var _local2 = "";
var _local5 = newline;
switch (errorCode) {
case "001" :
_local2 = _local2 + "** ERROR: When using simpleSetup to extend prototypes, you must pass the Shortcuts class. **";
_local2 = _local2 + (_local5 + " import com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + " ZigoEngine.simpleSetup(Shortcuts);") + _local5);
break;
case "002" :
_local2 = _local2 + "** ZigoEngine.doShortcut: shortcuts missing. Use the setup commands: import com.mosesSupposes.fuse.*; ZigoEngine.register(Shortcuts); **";
break;
case "003" :
_local2 = _local2 + ((_local5 + "*** Error: DO NOT use #include \"lmc_tween.as\" with this version of ZigoEngine! ***") + _local5);
break;
case "004" :
_local2 = _local2 + (("** ZigoEngine.doTween - too few arguments [" + _local3) + "].");
if (Boolean(_local4) == true) {
_local2 = _local2 + " If you are trying to use Object Syntax without Fuse, pass FuseItem in your register() or simpleSetup() call. **";
} else {
_local2 = _local2 + " Object syntax call failed. **";
}
break;
case "005" :
_local2 = _local2 + (((("** ZigoEngine.doTween - missing targets[" + _local3) + "] and/or props[") + _local4) + "] **");
break;
case "006" :
_local2 = _local2 + (("** Error: easing shortcut string not recognized (\"" + _local3) + "\"). You may need to pass the in PennerEasing class during register or simpleSetup. **");
break;
case "007" :
_local2 = _local2 + (((("- ZigoEngine: Target locked [" + _local3) + "], ignoring tween call [") + _local4) + "]");
break;
case "008" :
_local2 = _local2 + "** You must register the Shortcuts class in order to use easy string-type callback parsing. **";
break;
case "009" :
_local2 = _local2 + (("** ZigoEngine: A callback parameter \"" + _local3) + "\" was not recognized. **");
break;
case "010" :
_local2 = _local2 + ((((("** " + ((_local3 == true) ? "ZigoEngine" : "FuseItem")) + " unable to parse ") + ((_local4 == 1) ? "callback[" : (String(_local4) + " callbacks["))) + _local6) + "]. Try using the syntax {scope:this, func:\"myFunction\"} **");
break;
case "011" :
_local2 = _local2 + (((("- ZigoEngine: Callbacks discarded via skipLevel 2 option [" + _local3) + "|") + _local4) + "].");
break;
case "012" :
_local2 = _local2 + (((((("- Engine set props or ignored no-change tween on: " + _local3) + ", props passed:[") + _local4) + "], endvals passed:[") + _local6) + "]");
break;
case "013" :
_local2 = _local2 + (((((("- Engine added tween on:\n\ttargets:[" + _local3) + "]\n\tprops:[") + _local4) + "]\n\tendvals:[") + _local6) + "]");
break;
case "014" :
_local2 = _local2 + "** Error: easing function passed is not usable with this engine. Functions need to follow the Robert Penner model. **";
break;
case "015" :
_local2 = _local2 + "** Error: The CustomEasing class must be passed during setup (register or simpleSetup) to use custom easing Arrays. **";
break;
case "016" :
_local2 = _local2 + (("[ ZigoEngine.TIME_MULTIPLIER: " + String(Number(Number(_local3) * 100))) + "% ]");
break;
case "101" :
_local2 = _local2 + "** ERROR: Fuse simpleSetup was removed in version 2.0! **";
_local2 = _local2 + (_local5 + " You must now use the following commands:");
_local2 = _local2 + ((_local5 + _local5) + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + (_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);");
_local2 = _local2 + ((_local5 + "Note that PennerEasing is optional, and FuseFMP is also accepted. (FuseFMP.simpleSetup is run automatically if included.)") + _local5);
break;
case "102" :
_local2 = _local2 + (((("** Fuse " + _local3) + " index or label not found (") + _local4) + ") or out of range. **");
break;
case "103" :
_local2 = _local2 + (((("** Fuse skipTo (" + _local3) + ") ignored - targets the current index (") + _local4) + "). **");
break;
case "104" :
_local2 = _local2 + (("** Fuse fastForward index out of play range (" + _local3) + ") - skipTo has been called instead. **");
break;
case "105" :
_local2 = _local2 + "** An unsupported Array method was called on Fuse. **";
break;
case "106" :
_local2 = _local2 + "** ERROR: You have not set up Fuse correctly. **";
_local2 = _local2 + (_local5 + "You must now use the following commands (PennerEasing is optional).");
_local2 = _local2 + (_local5 + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);") + _local5);
break;
case "107" :
_local2 = _local2 + "** Fuse :: id not found - Aborting open(). **";
break;
case "108" :
_local2 = _local2 + "** Fuse.startRecent: No recent Fuse found to start! **";
break;
case "109" :
_local2 = _local2 + (("** Command \"" + _local3) + "\" discarded. ");
if (_local4 == true) {
_local2 = _local2 + "Not allowed within a group. **";
} else if (_local6 == true) {
_local2 = _local2 + (("Not supported in Object Syntax, use the " + _local3) + " property instead. **");
} else {
_local2 = _local2 + "The command may be unrecognized or missing an argument. **";
}
break;
case "110" :
_local2 = _local2 + (((("** " + _local3) + " illegal Fuse property discarded:\"") + _local4) + "\". Bezier keywords other than x and y cannot be set as start values. **");
break;
case "112" :
_local2 = _local2 + "** Fuse: missing com.mosesSupposes.fuse.ZigoEngine! Cannot tween. **";
break;
case "113" :
_local2 = _local2 + "** FuseItem: A callback has been discarded. Actions with a command may only contain: label, delay, scope, args. **";
break;
case "115" :
_local2 = _local2 + ((_local3 + " overlapping prop discarded: ") + _local4);
break;
case "116" :
_local2 = _local2 + ("** FuseItem Error: Delays within groups (arrays) and start/update callbacks are not supported when using Fuse without ZigoEngine. Although you need to restructure your Fuse, it should be possible to achieve the same results. **" + _local5);
break;
case "117" :
_local2 = _local2 + (("** " + _local3) + ": infinite cycles are not allowed within Fuses - discarded. **");
break;
case "118" :
_local2 = _local2 + ((("** " + _local3) + ": No targets found!") + ((_local4 == true) ? " [Unable to set start props] **" : " [Skipping tween parameters in this action] **"));
break;
case "119" :
_local2 = _local2 + ((((("** " + _local3) + ": ") + ((_local4 == 1) ? "" : (_local4 + " actions in the group"))) + " missing targets") + ((_local6 == true) ? " during setStartProps **" : " **"));
break;
case "120" :
_local2 = _local2 + (((("** " + _local3) + ": conflict with \"") + _local4) + "\". Property might be doubled within a grouped-action array. **");
break;
case "121" :
_local2 = _local2 + "** Fuse timecode formatting requires \"00:\" formatting (example:\"01:01:33\" yields 61.33 seconds.) **";
break;
case "122" :
_local2 = _local2 + (("** Event \"" + _local3) + "\" reserved by Fuse. **");
break;
case "123" :
_local2 = _local2 + (("** A Fuse event parameter failed in " + _local3) + " **");
break;
case "124" :
_local2 = _local2 + (((("** " + _local3) + ": trigger:") + _local4) + " ignored - only one trigger is allowed per action **");
break;
case "125" :
_local2 = _local2 + (_local3 + " Warning - fastForward hit an item during its tween cycle, may malfunction.");
break;
case "201" :
_local2 = _local2 + (("**** FuseFMP cannot initialize argument " + _local3) + " (BitmapFilters cannot be applied to this object type) ****");
break;
case "202" :
_local2 = _local2 + (((("** FuseFMP error: A " + _local3) + " could not be created for ") + _local4) + " **");
break;
case "203" :
_local2 = _local2 + (("** FuseFMP.setFilterProps - too few arguments passed (" + _local3) + ") - minimum 2 required. **");
break;
case "204" :
_local2 = _local2 + (("** FuseFMP.setFilterProps could not locate the filter passed. (" + _local3) + ") **");
}
output(_local2);
}
static function parseCallback(callback, targets, outputLevel, callerIsEngine, addprefix) {
if (callback._vcb == true) {
return(callback);
}
var validCBs = {_vcb:true, skipLevel:_global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL, cycles:1};
if (callback == undefined) {
return(validCBs);
}
var cbErrors = [];
if (typeof(callback) == "object") {
if (((callback.skipLevel != undefined) && (typeof(callback.skipLevel) == "number")) && (callback.skipLevel != _global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL)) {
if ((callback.skipLevel >= 0) && (callback.skipLevel <= 2)) {
validCBs.skipLevel = callback.skipLevel;
}
}
if (callback.cycles != undefined) {
if ((typeof(callback.cycles) == "number") && (callback.cycles > -1)) {
validCBs.cycles = callback.cycles;
} else if (callback.cycles.toUpperCase() == "LOOP") {
validCBs.cycles = 0;
}
}
if (callback.extra1 != undefined) {
validCBs.extra1 = callback.extra1;
}
if (callback.extra2 != undefined) {
validCBs.extra2 = callback.extra2;
}
if ((callback.roundResults === true) || (callback.roundResults === false)) {
validCBs.roundResults = callback.roundResults;
}
} else {
callback = {func:callback};
}
var prefixes = ["start", "upd", ""];
var easyfuncparse = _global.com.mosesSupposes.fuse.Shortcuts.parseStringTypeCallback;
for (var i in prefixes) {
var prefix = prefixes[i];
var fstr = callback[prefix + "func"];
if (((fstr != undefined) && (typeof(fstr) == "string")) && (fstr.indexOf("(") > -1)) {
if (easyfuncparse != undefined) {
var efc = easyfuncparse(fstr);
if (efc.func != undefined) {
callback[prefix + "scope"] = efc.scope;
callback[prefix + "func"] = efc.func;
callback[prefix + "args"] = efc.args;
}
} else if (outputLevel > 0) {
error("008");
}
}
}
var basescope = callback.scope;
for (var i in callback) {
var fi = i.toLowerCase().indexOf("func");
if (fi > -1) {
var prefix = i.slice(0, fi);
var func = callback[i];
var args = callback[prefix + "args"];
var scope = ((callback[prefix + "scope"] == undefined) ? (basescope) : (callback[prefix + "scope"]));
if ((typeof(func) == "string") && (scope[func] == undefined)) {
for (var j in targets) {
var targ = targets[j];
if (typeof(targ[func]) == "function") {
scope = targ;
break;
}
if (typeof(targ._parent[func]) == "function") {
scope = targ._parent;
break;
}
}
if ((scope == undefined) && (_level0[func] != undefined)) {
scope = _level0;
}
if ((scope == undefined) && (_global[func] != undefined)) {
scope = _global;
}
}
if (typeof(func) != "function") {
if (typeof(scope[String(func)]) == "function") {
func = scope[String(func)];
} else {
func = eval (String(func));
}
}
if (func == undefined) {
cbErrors.push(String((((((((addprefix == null) ? (i) : (addprefix + i)) + ":") + ((typeof(callback[i]) == "string") ? (("\"" + callback[i]) + "\"") : (callback[i]))) + "/") + prefix) + "scope:") + scope));
} else {
if ((args != undefined) && (!(args instanceof Array))) {
args = [args];
}
if (prefix == "") {
prefix = "end";
}
validCBs[prefix] = {s:scope, f:func, a:args};
if (callerIsEngine == true) {
validCBs[prefix].id = ++cbTicker;
}
if (prefix == "start") {
validCBs.start.fired = false;
}
}
} else if (_cbprops().indexOf(("|" + i) + "|") == -1) {
error("009", i);
}
}
if ((cbErrors.length > 0) && (outputLevel > 0)) {
if (outputLevel > 0) {
error("010", callerIsEngine, cbErrors.length, cbErrors.toString());
}
}
return(validCBs);
}
static var VERSION = "Fuse Kit 2.1.3 Copyright (c) 2006 Moses Gunesch, MosesSupposes.com under MIT Open Source License";
static var VERBOSE = true;
static var ALL = "ALL";
static var ALLCOLOR = "ALLCOLOR";
static var cbTicker = 0;
}
Symbol 295 MovieClip [__Packages.com.mosesSupposes.fuse.Fuse] Frame 0
class com.mosesSupposes.fuse.Fuse extends Array
{
var _nID, _aDefaultTargs, length, scope, _nIndex, _oDel1, dispatchEvent, label, autoClear, duration, easing;
function Fuse (fuseAction) {
super();
mx.events.EventDispatcher.initialize(this);
_nID = registerInstance(this);
_nState = -1;
_aDefaultTargs = new Array();
if (arguments.length > 0) {
splice.apply(this, new Array(0, 0).concat(arguments));
}
var _local4 = ["concat", "join", "sort", "sortOn"];
for (var _local5 in _local4) {
com.mosesSupposes.fuse.Fuse.prototype[_local4[_local5]] = function () {
if (com.mosesSupposes.fuse.Fuse.OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("105");
}
};
}
}
function addEventListener(event, handler) {
}
function removeEventListener(event, handler) {
}
function destroy() {
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " destroy.");
}
stop(true);
splice(0, length);
_aDefaultTargs = null;
scope = null;
_global.ASSetPropFlags(this, null, 0, 7);
var _local4 = _nID;
for (var _local3 in this) {
delete this[_local3];
}
removeInstanceAt(_local4, true);
}
static function getInstance(idOrLabel) {
if (typeof(idOrLabel) == "number") {
return(_aInstances[idOrLabel]);
}
if (typeof(idOrLabel) == "string") {
for (var _local2 in _aInstances) {
if (com.mosesSupposes.fuse.Fuse(_aInstances[_local2]).label == idOrLabel) {
return(_aInstances[_local2]);
}
}
}
return(null);
}
static function getInstances(stateFilter, targets) {
var _local10 = (stateFilter == null) || (stateFilter.toUpperCase() == "ALL");
if (!(targets instanceof Array)) {
targets = arguments.slice(1);
}
var _local8 = [];
for (var _local11 in _aInstances) {
var _local5 = _aInstances[_local11];
if (_aInstances[_local11] == null) {
continue;
}
if ((_local10 == false) && (_local5.__get__state() != stateFilter)) {
continue;
}
var _local3 = targets.length == 0;
if (_local3 == false) {
if (_local3 == true) {
continue;
}
var _local2 = _local5.getActiveTargets(true);
for (var _local7 in targets) {
for (var _local6 in _local2) {
if (_local2[_local6] == targets[_local7]) {
_local3 = true;
break;
}
}
}
}
if (_local3 == true) {
_local8.unshift(_local5);
}
}
return(_local8);
}
function get id() {
return(_nID);
}
function get state() {
switch (_nState) {
case -1 :
return("stopped");
case 0 :
return("paused");
case 1 :
return("playing");
}
return(undefined);
}
function get currentIndex() {
return(_nIndex);
}
function get currentLabel() {
return(this[_nIndex].label);
}
function get target() {
return(((_aDefaultTargs.length == 1) ? (_aDefaultTargs[0]) : (_aDefaultTargs)));
}
function set target(t) {
delete _aDefaultTargs;
if (t != null) {
addTarget(t);
}
//return(target);
}
function addTarget(t) {
if (_aDefaultTargs == null) {
_aDefaultTargs = [];
}
if (arguments[0] instanceof Array) {
arguments=arguments[0];//parameter overwritten
arguments[0];
}
for (var _local5 in arguments) {
var _local3 = false;
for (var _local4 in _aDefaultTargs) {
if (arguments[_local5] == _aDefaultTargs[_local4]) {
_local3 = true;
break;
}
}
if (_local3 == false) {
_aDefaultTargs.push(arguments[_local5]);
}
}
}
function removeTarget(t) {
if ((_aDefaultTargs == null) || (_aDefaultTargs.length == 0)) {
return(undefined);
}
if (arguments[0] instanceof Array) {
arguments=arguments[0];//parameter overwritten
arguments[0];
}
for (var _local4 in arguments) {
for (var _local3 in _aDefaultTargs) {
if (arguments[_local4] == _aDefaultTargs[_local3]) {
_aDefaultTargs.splice(Number(_local3), 1);
}
}
}
}
function getActiveTargets(includeDefaults) {
if (_nState == -1) {
return([]);
}
var _local2;
if (includeDefaults == true) {
_local2 = _aDefaultTargs.slice();
} else {
_local2 = [];
}
return(com.mosesSupposes.fuse.FuseItem(this[_nIndex]).getActiveTargets(_local2));
}
function clone() {
var _local3 = [];
var _local2 = 0;
while (_local2 < length) {
_local3.push(com.mosesSupposes.fuse.FuseItem(this[_local2]).getInitObj());
_local2++;
}
var _local4 = new com.mosesSupposes.fuse.Fuse();
_local4.push.apply(_local4, _local3);
_local4.scope = scope;
_local4.__set__target(target);
return(_local4);
}
function push(fuseAction) {
splice.apply(this, new Array(length, 0).concat(arguments));
return(length);
}
function pushTween(targets, props, endvals, seconds, ease, delay, callback) {
push({__buildMode:true, tweenargs:arguments});
return(length);
}
function pop() {
var _local2 = com.mosesSupposes.fuse.FuseItem(this[length - 1]).getInitObj();
splice(length - 1, 1);
return(_local2);
}
function unshift(fuseAction) {
splice.apply(this, new Array(0, 0).concat(arguments));
return(length);
}
function shift() {
var _local2 = com.mosesSupposes.fuse.FuseItem(this[0]).getInitObj();
splice(0, 1);
return(_local2);
}
function splice(startIndex, deleteCount, fuseAction) {
stop(true);
var _local7 = Number(arguments.shift());
if (_local7 < 0) {
_local7 = length + _local7;
}
deleteCount = Number(arguments.shift());
var _local8 = new Array();
var _local5 = 0;
while (_local5 < arguments.length) {
var _local4 = ((arguments[_local5] instanceof com.mosesSupposes.fuse.Fuse) ? (arguments[_local5]) : (new com.mosesSupposes.fuse.FuseItem(_local7 + _local5, arguments[_local5], _nID)));
addEventListener("onStop", _local4);
addEventListener("evtSetStart", _local4);
_local8.push(_local4);
_local5++;
}
var _local6 = super.splice.apply(this, new Array(_local7, deleteCount).concat(_local8));
for (var _local9 in _local6) {
var _local4 = _local6[_local9];
removeEventListener("onStop", _local4);
removeEventListener("evtSetStart", _local4);
if (_local4 instanceof com.mosesSupposes.fuse.Fuse) {
_local4.removeEventListener("onComplete", _oDel1);
} else {
_local4.destroy();
}
}
_local5 = 0;
while (_local5 < length) {
com.mosesSupposes.fuse.FuseItem(this[_local5])._nItemID = _local5;
_local5++;
}
}
function slice(indexA, indexB) {
var _local6 = super.slice(indexA, indexB);
var _local5 = new Array();
var _local4 = 0;
while (_local4 < arguments.length) {
_local5.push(com.mosesSupposes.fuse.FuseItem(this[_local4]).getInitObj());
_local4++;
}
return(_local5);
}
function reverse() {
stop(true);
super.reverse();
var _local3 = 0;
while (_local3 < length) {
com.mosesSupposes.fuse.FuseItem(this[_local3])._nItemID = _local3;
_local3++;
}
}
function traceItems(indexA, indexB) {
var _local5 = "";
var _local4 = super.slice(indexA, indexB);
_local5 = _local5 + ((getHandle() + " traceItems:") + "\n----------\n");
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3] instanceof com.mosesSupposes.fuse.Fuse) {
_local5 = _local5 + (((((getHandle() + ">Item#") + _local3) + ": [Nested Fuse] ") + _local4[_local3]) + newline);
} else {
_local5 = _local5 + (_local4[_local3] + newline);
}
_local3++;
}
_local5 = _local5 + "----------";
com.mosesSupposes.fuse.FuseKitCommon.output(_local5);
}
function toString() {
return(((getHandle() + " (contains ") + length) + ((length == 1) ? " item)" : " items)"));
}
function setStartProps(trueOrItemIDs) {
var _local8 = ((arguments.length == 0) || (trueOrItemIDs === true)) || (trueOrItemIDs == com.mosesSupposes.fuse.FuseKitCommon.ALL);
dispatchEvent({target:this, type:"evtSetStart", all:_local8, filter:((trueOrItemIDs instanceof Array) ? (trueOrItemIDs) : arguments), curIndex:((_nState == 1) ? (_nIndex) : -1), targs:_aDefaultTargs, scope:scope});
}
function start(setStart) {
close();
stop(true);
_nState = 1;
if (length == 0) {
advance(false, true, false);
}
if ((setStart != null) && (setStart != false)) {
setStartProps.apply(this, arguments);
}
dispatchEvent({target:this, type:"onStart"});
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " start.");
}
playCurrentItem();
}
function stop() {
if (_nState != -1) {
var _local3 = 0;
while (_local3 < length) {
if (this[_local3] instanceof com.mosesSupposes.fuse.Fuse) {
com.mosesSupposes.fuse.Fuse(this[_local3]).removeEventListener("onComplete", _oDel1);
if (com.mosesSupposes.fuse.Fuse(this[_local3]).__get__state() == "playing") {
com.mosesSupposes.fuse.Fuse(this[_local3]).stop();
}
} else if ((_local3 == _nIndex) || (com.mosesSupposes.fuse.FuseItem(this[_local3]).hasTriggerFired() == true)) {
com.mosesSupposes.fuse.FuseItem(this[_local3]).stop();
}
_local3++;
}
}
var _local4 = _nState;
_nState = -1;
if ((!(arguments[0] === true)) && (_local4 != -1)) {
dispatchEvent({target:this, type:"onStop"});
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " stop.");
}
}
_nIndex = 0;
clearInterval(_nDelay);
_nTimeCache = (_nDelay = -1);
}
function skipTo(indexOrLabel) {
close();
var _local3 = normalizeIndex(indexOrLabel);
if (_local3 == null) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("102", "skipTo", String(indexOrLabel));
}
return(undefined);
}
if ((_local3 == _nIndex) && (arguments[1] === true)) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("103", String(indexOrLabel), _nIndex);
}
}
if (this[_nIndex] instanceof com.mosesSupposes.fuse.Fuse) {
com.mosesSupposes.fuse.Fuse(this[_nIndex]).removeEventListener("onComplete", _oDel1);
}
stop(true);
_nIndex = _local3;
var _local4 = _nState;
_nState = 1;
if (_local4 == -1) {
dispatchEvent({target:this, type:"onStart"});
}
playCurrentItem();
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output("skipTo:" + _local3);
}
}
function pause() {
if (_nState == 1) {
var _local2 = 0;
while (_local2 <= _nIndex) {
if ((this[_local2].state === "playing") || (this[_local2]._nPlaying > 0)) {
this[_local2].pause();
}
_local2++;
}
if (_nTimeCache != -1) {
_nTimeCache = _nTimeCache - getTimer();
clearInterval(_nDelay);
}
_nState = 0;
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " pause.");
}
dispatchEvent({target:this, type:"onPause"});
}
}
function resume() {
if (_nState != 0) {
return(undefined);
}
close();
_nState = 1;
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " resume.");
}
dispatchEvent({target:this, type:"onResume"});
if (_nTimeCache != -1) {
playCurrentItem(false, true);
}
var _local2 = 0;
while (_local2 <= _nIndex) {
if ((this[_local2] instanceof com.mosesSupposes.fuse.Fuse) && (this[_local2].state == "paused")) {
com.mosesSupposes.fuse.Fuse(this[_local2]).resume();
} else if (this[_local2]._nPlaying == 0) {
com.mosesSupposes.fuse.FuseItem(this[_local2]).pause(true);
}
_local2++;
}
}
function fastForward(resumeAtIndexOrLabel) {
var _local3 = ((resumeAtIndexOrLabel == null) ? (length) : (normalizeIndex(resumeAtIndexOrLabel)));
if (_local3 == null) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("102", "fastForward", String(resumeAtIndexOrLabel));
}
return(undefined);
}
if ((_local3 == 0) || (_local3 <= _nIndex)) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("104", _local3);
}
skipTo(_local3);
return(undefined);
}
clearInterval(_nDelay);
var _local2 = _nIndex;
while (_local2 < _local3) {
this[_local2].fastForward(null, _aDefaultTargs, scope);
advance(false, true, !((_local2 == (_local3 - 1)) && (_local3 < length)));
_local2++;
}
}
function getHandle() {
return("-Fuse" + ((label != undefined) ? ((" \"" + label) + "\"") : ("#" + String(_nID))));
}
function advance(wasTriggered, silentStop, isFF) {
if (_nState < 1) {
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("** DEVELOPER ALERT: " + getHandle()) + " advance called out of turn! (state:") + state) + " currentIndex:") + currentIndex) + ") Please report this Fuse's details to MosesSupposes.com. **");
}
return(undefined);
}
var _local3 = false;
if ((_nIndex == (length - 1)) && (isFF != true)) {
var _local2 = length - 1;
while (_local2 > -1) {
if (com.mosesSupposes.fuse.FuseItem(this[_local2])._nPlaying > -1) {
return(undefined);
}
_local2--;
}
_local3 = true;
}
if ((wasTriggered == true) && (_local3 == false)) {
return(undefined);
}
if (this[_nIndex] instanceof com.mosesSupposes.fuse.Fuse) {
com.mosesSupposes.fuse.Fuse(this[_nIndex]).removeEventListener("onComplete", _oDel1);
}
if ((_nIndex + 1) >= length) {
stop(silentStop);
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " complete.");
}
_nIndex = length - 1;
dispatchEvent({target:this, type:"onComplete"});
if ((autoClear == true) || ((!(autoClear === false)) && (AUTOCLEAR == true))) {
destroy();
}
return(undefined);
}
_nIndex++;
if (isFF == true) {
return(undefined);
}
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output((getHandle() + " advance: ") + _nIndex);
}
dispatchEvent({target:this, type:"onAdvance"});
playCurrentItem();
}
function playCurrentItem(postDelay, resumeDelay) {
clearInterval(_nDelay);
if ((postDelay != true) || (resumeDelay == true)) {
var _local3 = 0;
if (resumeDelay != true) {
_local3 = (com.mosesSupposes.fuse.FuseItem(this[_nIndex]).evalDelay(scope) || 0) * 1000;
}
if ((_local3 > 0) || (resumeDelay == true)) {
if (resumeDelay == true) {
_local3 = _nTimeCache;
_nTimeCache = _nTimeCache + getTimer();
} else {
var _local4 = Math.abs(_global.com.mosesSupposes.fuse.ZigoEngine.TIME_MULTIPLIER);
if (_global.isNaN(_local4) == true) {
_local4 = 1;
}
_local3 = _local3 * _local4;
_nTimeCache = getTimer() + _local3;
}
_nDelay = setInterval(this, "playCurrentItem", _local3, true);
return(undefined);
}
}
_nTimeCache = (_nDelay = -1);
if (this[_nIndex] instanceof com.mosesSupposes.fuse.Fuse) {
if (_oDel1 == null) {
_oDel1 = mx.utils.Delegate.create(this, advance);
}
com.mosesSupposes.fuse.Fuse(this[_nIndex]).addEventListener("onComplete", _oDel1);
com.mosesSupposes.fuse.Fuse(this[_nIndex]).start(_aDefaultTargs, scope);
} else {
var _local6 = com.mosesSupposes.fuse.FuseItem(this[_nIndex]).startItem(_aDefaultTargs, scope, duration, easing);
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output((getHandle() + " props tweened: ") + _local6);
}
}
}
function evtSetStart(o) {
setStartProps.apply(this, o.filter);
}
static function open(fuseOrID) {
var _local3 = _global.com.mosesSupposes.fuse.ZigoEngine;
if (_local3 == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("106");
return(null);
}
_local3.register(com.mosesSupposes.fuse.Fuse, com.mosesSupposes.fuse.FuseItem);
if (_oBuildMode == null) {
_oBuildMode = {curID:-1, prevID:-1, curGroup:null};
} else if ((_oBuildMode != null) && (_oBuildMode.curID > -1)) {
close();
}
if (fuseOrID != null) {
if (fuseOrID instanceof com.mosesSupposes.fuse.Fuse) {
_oBuildMode.curID = fuseOrID.id;
} else if (getInstance(fuseOrID) != null) {
_oBuildMode.curID = getInstance(fuseOrID).id;
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("107");
return(null);
}
} else {
_oBuildMode.curID = (new com.mosesSupposes.fuse.Fuse()).id;
}
_oBuildMode.prevID = _oBuildMode.curID;
return(getInstance(_oBuildMode.curID));
}
static function openGroup(fuseOrID) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
open(fuseOrID);
} else if (_oBuildMode.curGroup != null) {
closeGroup();
}
_oBuildMode.curGroup = new Array();
return(getInstance(_oBuildMode.curID));
}
static function closeGroup() {
if ((_oBuildMode.curGroup == null) || (!((_oBuildMode != null) && (_oBuildMode.curID > -1)))) {
return(undefined);
}
getInstance(_oBuildMode.curID).push(_oBuildMode.curGroup);
_oBuildMode.curGroup = null;
}
static function close() {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(undefined);
}
if (_oBuildMode.curGroup != null) {
closeGroup();
}
_oBuildMode.curID = -1;
}
static function closeAndStart(setStart) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(undefined);
}
var _local2 = getInstance(_oBuildMode.curID);
close();
_local2.start.apply(_local2, arguments);
}
static function startRecent(setStart) {
var _local2 = getInstance(_oBuildMode.prevID);
if (_local2 != null) {
_local2.start.apply(_local2, arguments);
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("108");
}
}
static function addCommand(commandOrScope, indexOrFunc, argument) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(undefined);
}
var _local4 = _oBuildMode.curGroup != null;
var _local2 = ((_local4 == true) ? (_oBuildMode.curGroup) : (getInstance(_oBuildMode.curID)));
if (typeof(commandOrScope) == "string") {
var _local7 = indexOrFunc != undefined;
var _local5 = com.mosesSupposes.fuse.FuseKitCommon._validateFuseCommand(String(commandOrScope), _local4, _local7, OUTPUT_LEVEL, true);
if (_local5 == true) {
_local2.push({__buildMode:true, command:commandOrScope, commandargs:indexOrFunc});
}
} else {
_local2.push({__buildMode:true, scope:commandOrScope, func:indexOrFunc, args:arguments.slice(2)});
}
}
static function addBuildItem(args) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(false);
}
var _local1 = ((_oBuildMode.curGroup != null) ? (_oBuildMode.curGroup) : (getInstance(_oBuildMode.curID)));
if ((args.length == 1) && (typeof(args[0]) == "object")) {
_local1.push(args[0]);
} else {
_local1.push({__buildMode:true, tweenargs:args});
}
return(true);
}
function normalizeIndex(indexOrLabel) {
var _local4;
if (typeof(indexOrLabel) == "string") {
_local4 = -1;
var _local3 = 0;
while (_local3 < length) {
if (this[_local3].label == String(indexOrLabel)) {
_local4 = _local3;
break;
}
_local3++;
}
if (_local4 == -1) {
return(null);
}
} else {
_local4 = Number(indexOrLabel);
}
if ((_global.isNaN(_local4) == true) || (Math.abs(_local4) >= length)) {
return(null);
}
if (_local4 < 0) {
_local4 = Math.max(0, length + _local4);
}
return(_local4);
}
static function registerInstance(s) {
if (_aInstances == null) {
_aInstances = new Array();
}
return(_aInstances.push(s) - 1);
}
static function removeInstanceAt(id, isDestroyCall) {
if (isDestroyCall != true) {
com.mosesSupposes.fuse.Fuse(_aInstances[id]).destroy();
}
delete _aInstances[id];
}
static var registryKey = "fuse";
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION;
static var OUTPUT_LEVEL = 1;
static var AUTOCLEAR = false;
static var AUTOSTOP = true;
var _nState = -1;
var _nDelay = -1;
var _nTimeCache = -1;
static var _aInstances = null;
static var _oBuildMode = null;
}
Symbol 17 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 296 MovieClip [__Packages.com.mosesSupposes.fuse.FuseItem] Frame 0
class com.mosesSupposes.fuse.FuseItem
{
static var _ZigoEngine, _aInstances;
var _nItemID, _nFuseID, _initObj, _aProfiles, _oElements, _oTemps, _sImage, _aTweens, _oTwBeingAdded;
function FuseItem (id, o, fuseID) {
_ZigoEngine = _global.com.mosesSupposes.fuse.ZigoEngine;
_nItemID = id;
_nFuseID = fuseID;
_initObj = o;
_aProfiles = [];
_oElements = {aEvents:[]};
_oTemps = {};
if (!(o instanceof Array)) {
o = [o];
}
var _local19 = _global.com.mosesSupposes.fuse.Fuse;
_oTemps.outputLevel = ((_local19 != undefined) ? (_local19.OUTPUT_LEVEL) : (_global.com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL));
if (o.length == 1) {
var _local18 = o[0];
var _local12 = ((_local18.action != undefined) ? (_local18.action) : (_local18));
if ((_local12.__buildMode != true) && (_local12.command != undefined)) {
_oElements.command = _local12.command;
_oElements.scope = _local12.scope;
_oElements.args = _local12.args;
_sImage = " Elements:[" + ("command" + ((typeof(_local12.command) == "string") ? ((":\"" + _local12.command) + "\", ") : ", "));
if (_local12.delay != undefined) {
_sImage = _sImage + "delay, ";
_oElements.delay = _local12.delay;
}
_sImage = _sImage.slice(0, -2) + "]";
if ((_local12.func != undefined) && (_oTemps.outputLevel > 0)) {
com.mosesSupposes.fuse.FuseKitCommon.error("113");
}
return;
}
}
_oTemps.sImgS = "";
_oTemps.sImgE = "";
_oTemps.sImgB = "";
_oTemps.afl = 0;
_oTemps.ael = 0;
_oTemps.twDelayFlag = false;
_oTemps.nActions = o.length;
_oTemps.fuseProps = com.mosesSupposes.fuse.FuseKitCommon._fuseprops();
_oTemps.cbProps = com.mosesSupposes.fuse.FuseKitCommon._cbprops();
_oTemps.sUP = com.mosesSupposes.fuse.FuseKitCommon._underscoreable();
_oTemps.sCT = com.mosesSupposes.fuse.FuseKitCommon._cts();
_oTemps.bTriggerFound = false;
for (var _local17 in o) {
var _local3 = o[_local17];
if ((_local3.label != undefined) && (typeof(_local3.label) == "string")) {
_oElements.label = _local3.label;
}
var _local4;
var _local8 = Boolean(typeof(_local3.action) == "object");
if (_local8 == true) {
var _local7 = ((_local3.action instanceof Array) ? (_local3.action) : ([_local3.action]));
_local4 = {delay:_local3.delay, target:_local3.target, addTarget:_local3.addTarget, label:_local3.label, trigger:_local3.trigger};
for (var _local15 in _local7) {
var _local5 = parseProfile(_local7[_local15], _local4);
if (_local5 != undefined) {
_aProfiles.unshift(_local5);
}
}
} else {
var _local7 = _local3;
var _local5 = parseProfile(_local7, _local4);
if (_local5 != undefined) {
_aProfiles.unshift(_local5);
}
}
}
_sImage = "";
var _local16 = "";
if (_oTemps.afl > 0) {
_local16 = _local16 + ((_oTemps.afl > 1) ? (_oTemps.afl + " callbacks, ") : "callback, ");
}
if ((_oElements.delay != undefined) || (_oTemps.twDelayFlag == true)) {
_local16 = _local16 + "delay, ";
}
if (_oTemps.bTriggerFound == true) {
_local16 = _local16 + "trigger, ";
}
if (_oTemps.ael > 0) {
_local16 = _local16 + ((_oTemps.ael > 1) ? (_oTemps.ael + " events, ") : "event, ");
}
if (_local16 != "") {
_sImage = _sImage + ((" Elements:[" + _local16.slice(0, -2)) + "]");
}
if (_oTemps.sImgS != "") {
_sImage = _sImage + ((" StartProps:[" + _oTemps.sImgS.slice(0, -2)) + "]");
}
if (_oTemps.sImgE != "") {
_sImage = _sImage + ((" Props:[" + _oTemps.sImgE.slice(0, -2)) + "]");
}
if (_oTemps.sImgB != "") {
_sImage = _sImage + ((" Simple Syntax Props:[" + _oTemps.sImgB.slice(0, -1)) + "]");
}
if (_sImage.slice(-2) == ", ") {
_sImage = _sImage.slice(0, -2);
}
delete _oTemps;
}
static function doTween() {
for (var _local3 in arguments) {
if (typeof(arguments[_local3]) == "object") {
if (_aInstances == undefined) {
_aInstances = new Array();
}
var _local2 = new com.mosesSupposes.fuse.FuseItem(_aInstances.length, arguments[_local3], -1);
return(_local2.startItem());
}
}
}
function get label() {
return(_oElements.label);
}
function hasTriggerFired() {
return(_bTrigger == true);
}
function getInitObj() {
return(_initObj);
}
function getActiveTargets(targetList) {
if (_aTweens.length <= 0) {
return(targetList);
}
var _local3 = false;
for (var _local5 in _aTweens) {
for (var _local4 in targetList) {
if (targetList[_local4] == _aTweens[_local5].targ) {
_local3 = true;
break;
}
}
if (_local3 == false) {
targetList.unshift(_aTweens[_local5].targ);
}
}
return(targetList);
}
function toString() {
return(String((_sID() + ":") + _sImage));
}
function evalDelay(scope) {
var _local3 = _oElements.delay;
if (_local3 instanceof Function) {
_local3 = _local3.apply(((_oElements.delayscope != undefined) ? (_oElements.delayscope) : (scope)));
}
if (typeof(_local3) == "string") {
_local3 = parseClock(String(_local3));
}
if (_global.isNaN(Number(_local3)) == true) {
return(0);
}
return(Number(_local3));
}
function startItem(targs, scope, duration, easing) {
_ZigoEngine = _global.com.mosesSupposes.fuse.ZigoEngine;
var _local11 = _global.com.mosesSupposes.fuse.Fuse;
var _local5 = ((_local11 != undefined) ? (_local11.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
if (_oElements.command != null) {
var _local12 = _oElements.scope || (scope);
var _local10 = ((_oElements.command instanceof Function) ? (String(_oElements.command.apply(_local12))) : (String(_oElements.command)));
var _local6 = ((_oElements.args instanceof Function) ? (_oElements.args.apply(_local12)) : (_oElements.args));
var _local13 = com.mosesSupposes.fuse.FuseKitCommon._validateFuseCommand(_local10, _aProfiles.length > 0, (_local6 != null) && (!((_local6 instanceof Array) && (_local6.length == 0))), _local5, false);
if (_local13 == true) {
_nPlaying = 1;
if (!(_local6 instanceof Array)) {
_local6 = ((_local6 == null) ? ([]) : ([_local6]));
}
dispatchRequest(String(_local10), _local6);
}
if ((_local13 == false) || (_local10 == "setStartProps")) {
complete();
}
return(null);
}
if (_aTweens.length > 0) {
stop();
}
_ZigoEngine.addListener(this);
_nPlaying = 2;
var _local4 = null;
if (_aProfiles.length > 0) {
if (_ZigoEngine == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("112");
} else {
_local4 = doTweens(targs, scope, duration, easing, false, false);
}
}
_nPlaying = 1;
var _local3 = _oElements.aEvents;
for (var _local9 in _local3) {
if (((_local4 == null) && (_aTweens.length > 0)) && (_local3[_local9].skipLevel == 2)) {
continue;
}
fireEvents(_local3[_local9], scope, _local5, targs);
}
if (((_local4 == null) && (_aTweens.length <= 0)) && (_nPlaying == 1)) {
if (_local5 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((_sID() + " no tweens added - item done. [getTimer()=") + getTimer()) + "]");
}
complete();
}
return(_local4);
}
function stop() {
var _local2 = _nPlaying > -1;
_nPlaying = -1;
if (_local2 == true) {
onStop();
}
_ZigoEngine.removeListener(this);
}
static function removeInstance(id) {
com.mosesSupposes.fuse.FuseItem(_aInstances[id]).destroy();
delete _aInstances[id];
}
function onStop() {
_bStartSet = false;
for (var _local3 in _aTweens) {
var _local2 = _aTweens[_local3];
_local2.targ.removeListener(this);
_ZigoEngine.removeTween(_local2.targ, _local2.props);
delete _aTweens[_local3];
}
delete _aTweens;
_bTrigger = false;
}
function evtSetStart(o) {
if ((_sImage.indexOf("StartProps:") == -1) || (o.curIndex == _nItemID)) {
return(undefined);
}
if (o.all != true) {
var _local3 = false;
for (var _local4 in o.filter) {
if ((Number(o.filter[_local4]) == _nItemID) || (String(o.filter[_local4]) == _oElements.label)) {
_local3 = true;
}
}
if (_local3 == false) {
return(undefined);
}
}
_nPlaying = 2;
doTweens(o.targs, o.scope, null, null, true, false);
_nPlaying = -1;
_bStartSet = true;
}
function pause(resume) {
if (_nPlaying == -1) {
return(undefined);
}
_nPlaying = ((resume == true) ? 1 : 0);
for (var _local12 in _aTweens) {
var _local4 = _aTweens[_local12];
var _local2 = _local4.targ;
var _local3 = _local4.props;
if (resume == true) {
var _local5 = [];
var _local6 = _aTweens.length;
for (var _local8 in _local3) {
if (_ZigoEngine.isTweenPaused(_local2, _local3[_local8]) == false) {
_local5.push(_local3[_local8]);
}
}
if (_local5.length > 0) {
onTweenEnd({__zigoID__:_local4.targZID, props:_local5, isResume:true});
}
if (_aTweens.length == _local6) {
_local2.addListener(this);
_ZigoEngine.unpauseTween(_local2, _local4.props);
}
} else {
_local2.removeListener(this);
_ZigoEngine.pauseTween(_local2, _local4.props);
}
}
if ((resume == true) && (_aTweens.length <= 0)) {
complete();
} else if (resume == true) {
_ZigoEngine.addListener(this);
} else {
_ZigoEngine.removeListener(this);
}
}
function fastForward(ignore, targs, scope) {
if (_nPlaying == 1) {
for (var _local4 in _aTweens) {
var _local3 = _aTweens[_local4];
var _local2 = _local3.targ;
_local2.removeListener(this);
_ZigoEngine.ffTween(_local2, _local3.props, true);
}
return(undefined);
}
if (_nPlaying == 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("125", _nItemID);
}
_nPlaying = 2;
doTweens(targs, scope, null, null, false, true);
stop();
}
function destroy() {
var _local3 = _nPlaying > -1;
_nPlaying = -1;
for (var _local5 in _aTweens) {
var _local2 = _aTweens[_local5];
_local2.targ.removeListener(this);
if (_local3 == true) {
_ZigoEngine.removeTween(_local2.targ, _local2.props);
}
delete _aTweens[_local5];
}
for (var _local4 in this) {
delete this[_local4];
}
}
function dispatchRequest(type, args) {
var _local4 = _global.com.mosesSupposes.fuse.Fuse.getInstance(_nFuseID);
if ((!(args instanceof Array)) && (args != null)) {
args = new Array(args);
}
Function(_local4[type]).apply(_local4, args);
}
function _sID() {
var _local3;
if (_nFuseID == -1) {
_local3 = "-One-off tween ";
} else {
_local3 = _global.com.mosesSupposes.fuse.Fuse.getInstance(_nFuseID).getHandle();
}
_local3 = _local3 + (">Item #" + String(_nItemID));
if (_oElements.label != undefined) {
_local3 = _local3 + ((" \"" + _oElements.label) + "\"");
}
return(_local3);
}
function parseProfile(obj, aap) {
var _local40;
var _local2;
var _local8;
if (obj.__buildMode == true) {
if (obj.command != undefined) {
if (obj.command == "delay") {
_oElements.delay = obj.commandargs;
} else if (obj.command == "trigger") {
if (_oTemps.bTriggerFound == false) {
_oTemps.bTriggerFound = true;
return({trigger:obj.commandargs, _doTimer:true});
}
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("124", _sID(), obj.commandargs);
}
} else {
_oElements.command = obj.command;
_oElements.args = obj.commandargs;
}
}
if (obj.func != undefined) {
_oTemps.afl++;
_oElements.aEvents.unshift({scope:obj.scope, func:obj.func, args:obj.args});
}
if (obj.tweenargs != undefined) {
_oTemps.sImgB = _oTemps.sImgB + (obj.tweenargs[1].toString() + ",");
return(obj);
}
return(null);
}
var _local4 = {delay:((aap.delay != undefined) ? (aap.delay) : (obj.delay)), ease:obj.ease, seconds:obj.seconds, event:obj.event, eventparams:obj.eventparams, skipLevel:((((typeof(obj.skipLevel) == "number") && (obj.skipLevel >= 0)) && (obj.skipLevel <= 2)) ? (obj.skipLevel) : (_ZigoEngine.SKIP_LEVEL)), roundResults:obj.roundResults, oSP:{}, oEP:{}, oAFV:{}};
var _local22 = ((aap.trigger != undefined) ? (aap.trigger) : (obj.trigger));
if (_local22 != undefined) {
if (_oTemps.bTriggerFound == false) {
_local4.trigger = _local22;
_oTemps.bTriggerFound = true;
} else if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("124", _sID(), _local22);
}
}
if (_local4.delay == undefined) {
_local4.delay = obj.startAt;
}
if (_local4.ease == undefined) {
_local4.ease = obj.easing;
}
if (_local4.seconds == undefined) {
_local4.seconds = ((obj.duration != undefined) ? (obj.duration) : (obj.time));
}
if (aap.target != undefined) {
_local4.target = ((aap.target instanceof Array) ? (aap.target) : ([aap.target]));
} else if (obj.target != undefined) {
_local4.target = ((obj.target instanceof Array) ? (obj.target) : ([obj.target]));
}
if (obj.addTarget != undefined) {
_local4.addTarget = ((obj.addTarget instanceof Array) ? (obj.addTarget) : ([obj.addTarget]));
}
if (aap.addTarget != undefined) {
if (_local4.addTarget == undefined) {
_local4.addTarget = ((aap.addTarget instanceof Array) ? (aap.addTarget) : ([aap.addTarget]));
} else {
_local4.addTarget = ((_local4.addTarget instanceof Array) ? (_local4.addTarget.concat(aap.addTarget)) : (new Array(_local4.addTarget).concat(aap.addTarget)));
}
}
var _local15 = false;
for (_local2 in obj) {
var _local11 = obj[_local2];
if (_oTemps.cbProps.indexOf(("|" + _local2) + "|") > -1) {
if (_local2 != "skipLevel") {
_local4[_local2] = _local11;
}
continue;
}
if (_oTemps.fuseProps.indexOf(("|" + _local2) + "|") > -1) {
if (((_local2 == "command") && (_oTemps.nActions > 1)) && (_oTemps.outputLevel > 0)) {
com.mosesSupposes.fuse.FuseKitCommon.error("109", String(_local11), true);
}
continue;
}
if (typeof(_local11) == "object") {
var _local10 = ((_local11 instanceof Array) ? ([]) : ({}));
for (_local8 in _local11) {
_local10[_local8] = _local11[_local8];
}
_local11 = _local10;
}
var _local3;
var _local21;
if (_local2.indexOf("start_") == 0) {
if (((_local2 == "start_controlX") || (_local2 == "start_controlY")) || (_local2.indexOf("_bezier_") > -1)) {
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("110", _sID(), _local2);
}
continue;
}
_local2 = _local2.slice(6);
_local3 = _local4.oSP;
} else {
_local3 = _local4.oEP;
}
if ((ADD_UNDERSCORES == true) && (_oTemps.sUP.indexOf(("|_" + _local2) + "|") > -1)) {
_local2 = "_" + _local2;
}
if (_oTemps.sCT.indexOf(("|" + _local2) + "|") > -1) {
var _local13 = (_local2 == "_tintPercent") && (_local3.colorProp.p == "_tint");
var _local12 = (_local2 == "_tint") && (_local3.colorProp.p == "_tintPercent");
if (((_local3.colorProp == undefined) || (_local13 == true)) || (_local12 == true)) {
if (_local13 == true) {
_local3.colorProp = {p:"_tint", v:{tint:_local3.colorProp.v, percent:_local11}};
} else if (_local12 == true) {
_local3.colorProp = {p:"_tint", v:{tint:_local11, percent:_local3.colorProp.v}};
} else {
_local3.colorProp = {p:_local2, v:_local11};
}
_local15 = true;
} else if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local2);
}
} else if (_local11 != null) {
_local3[_local2] = _local11;
_local15 = true;
}
}
if ((_local15 == false) && ((_local4.trigger != undefined) || (((_local4.delay != undefined) || (_local4.seconds != undefined)) && (((_local4.startfunc != undefined) || (_local4.updfunc != undefined)) || ((_local4.func != undefined) && (_oTemps.nActions > 1)))))) {
if (_ZigoEngine == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("116");
} else {
if (_local4.func != undefined) {
_oTemps.afl++;
}
if (_local4.event != undefined) {
_oTemps.ael++;
}
_local4._doTimer = true;
if (_local4.delay != undefined) {
_oTemps.twDelayFlag = true;
}
return(_local4);
}
}
if (_local15 == true) {
var _local17 = _local4.oEP.colorProp != undefined;
var _local7 = 0;
while (_local7 < 2) {
var _local3 = ((_local7 == 0) ? (_local4.oSP) : (_local4.oEP));
var _local6 = ((_local7 == 0) ? (_oTemps.sImgS) : (_oTemps.sImgE));
var _local9 = _local3.colorProp.p;
if (_local9 != undefined) {
_local3[_local9] = _local3.colorProp.v;
delete _local3.colorProp;
}
if (((_local3._xscale != undefined) || (_local3._scale != undefined)) && ((_local3._width != undefined) || (_local3._size != undefined))) {
var _local14 = ((_local3._xscale != undefined) ? "_xscale" : "_scale");
delete _local3[_local14];
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local14);
}
}
if (((_local3._yscale != undefined) || (_local3._scale != undefined)) && ((_local3._height != undefined) || (_local3._size != undefined))) {
var _local14 = ((_local3._yscale != undefined) ? "_yscale" : "_scale");
delete _local3[_local14];
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local14);
}
}
if ((_local3._fade != undefined) && (_local3._alpha != undefined)) {
delete _local3._alpha;
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), "_alpha");
}
}
for (_local2 in _local3) {
if (_local6.indexOf(_local2 + ", ") == -1) {
_local6 = _local6 + (_local2 + ", ");
}
if (_local3 == _local4.oSP) {
if ((_local4.oEP[_local2] == undefined) && (!((_local2 == _local9) && (_local17 == true)))) {
_local4.oAFV[_local2] = true;
_local4.oEP[_local2] = [];
}
}
}
((_local7 == 0) ? ((_oTemps.sImgS = _local6)) : ((_oTemps.sImgE = _local6)));
_local7++;
}
return(_local4);
}
if ((_local4.delay != undefined) && (_oTemps.nActions == 1)) {
_oElements.delay = _local4.delay;
_oElements.delayscope = _local4.scope;
}
if (_local4.event != undefined) {
_oTemps.ael++;
_oElements.aEvents.unshift({scope:_local4.scope, e:_local4.event, ep:_local4.eventparams, skipLevel:_local4.skipLevel});
}
var _local23 = _oElements.aEvents.length;
if (_local4.func != undefined) {
_oElements.aEvents.push({func:_local4.func, scope:_local4.scope, args:_local4.args, skipLevel:_local4.skipLevel});
}
_oTemps.afl = _oTemps.afl + (_oElements.aEvents.length - _local23);
return(undefined);
}
function doTweens(targs, defaultScope, defaultSeconds, defaultEase, setStart, isFF) {
if (_aTweens == null) {
_aTweens = [];
}
var tba = ((_oTwBeingAdded = {}));
var ZE = _ZigoEngine;
var _local35 = function (target, props, endvals, seconds, ease, delay, callback) {
if (target.__zigoID__ == null) {
ZE.initializeTargets(target);
}
tba[target.__zigoID__] = true;
var _local3 = ZE.doTween.apply(ZE, arguments);
tba[target.__zigoID__] = false;
return(((_local3 == null) ? ([]) : (_local3.split(","))));
};
var _local74 = _global.com.mosesSupposes.fuse.Fuse;
var _local19 = ((_local74 != undefined) ? (_local74.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
var _local24 = "";
var _local66 = 0;
var _local8;
var _local5;
var _local6;
var _local75 = (_bStartSet != true) && ((setStart == true) || (_sImage.indexOf("StartProps:") > -1));
var _local51 = 0;
while (_local51 < _aProfiles.length) {
if (_nPlaying < 2) {
return(null);
}
var _local4 = _aProfiles[_local51];
if (_local4.__buildMode == true) {
var _local10 = _aProfiles[_local51].tweenargs;
var _local65 = _local24;
if ((_local10[6].cycles === 0) || (_local10[6].cycles.toUpperCase() == "LOOP")) {
delete _local10[6].cycles;
if (_local19 > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("117", _sID());
}
}
var _local60 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(_local10[6]);
if (!(_local10[0] instanceof Array)) {
_local10[0] = [_local10[0]];
}
for (_local8 in _local10[0]) {
if (isFF == true) {
_local35(_local10[0][_local8], _local10[1], _local10[2], 0, null, 0, {skipLevel:0});
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("\n-" + _sID()) + " FF(simple syntax)\ttargets:[") + _local10[0][_local8]) + "]\tprops:[") + _local10[1]) + "]");
}
} else {
var _local17 = _local35(_local10[0][_local8], _local10[1], _local10[2], _local10[3], _local10[4], _local10[5], _local60);
if (_local17.length > 0) {
_aTweens.push({targ:_local10[0][_local8], props:_local17, targZID:_local10[0][_local8].__zigoID__});
_local10[0][_local8].addListener(this);
for (_local5 in _local17) {
if (_local24.indexOf(_local17[_local5] + ",") == -1) {
_local24 = _local24 + (_local17[_local5] + ",");
}
}
}
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("\n-" + _sID()) + " TWEEN(simple syntax)\ttargets:[") + _local10[0][_local8]) + "]\tprops tweened:[") + _local17.toString()) + "]");
}
}
}
if ((isFF == false) && ((_local65 == _local24) || (_local24 == ""))) {
_local66++;
}
} else {
var _local23 = defaultScope;
var _local16 = [];
var _local52 = ((_local4.target == undefined) ? (targs) : (_local4.target));
var _local26 = [];
var _local54 = false;
for (_local8 in _local52) {
var _local7 = _local52[_local8];
_local26 = _local26.concat(((_local7 instanceof Function) ? (_local7.apply(_local23)) : (_local7)));
}
for (_local8 in _local4.addTarget) {
var _local7 = _local4.addTarget[_local8];
_local26 = _local26.concat(((_local7 instanceof Function) ? (_local7.apply(_local23)) : (_local7)));
}
for (_local8 in _local26) {
var _local7 = _local26[_local8];
if (_local7 != null) {
var _local40 = false;
for (_local5 in _local16) {
if (_local16[_local5] == _local7) {
_local40 = true;
break;
}
}
if (_local40 == false) {
_local16.unshift(_local7);
}
} else {
_local54 = true;
}
}
var _local56 = ((_local4._doTimer == true) && (_local16.length == 0)) && (isFF == false);
if ((_local54 == true) || ((_local16.length == 0) && (_local4._doTimer != true))) {
_local66++;
}
if (_local75 == true) {
for (_local8 in _local16) {
if (_nPlaying < 2) {
return(null);
}
var _local36 = _local16[_local8];
var _local33 = [];
var _local27 = [];
if (setStart == true) {
for (var _local63 in _local4.oEP) {
_global.com.mosesSupposes.fuse.FuseFMP.getFilterProp(_local36, _local63, true);
}
}
for (var _local64 in _local4.oSP) {
var _local7 = _local4.oSP[_local64];
if (_local7 instanceof Function) {
_local7 = _local7.apply(_local23);
}
if ((_local7 === true) || (_local7 === false)) {
_local36[_local64] = _local7;
if (_local4.oAFV[_local64] == true) {
for (_local6 in _local4.oEP[_local64]) {
if (_local4.oEP[_local64][_local6].targ == _local36) {
_local4.oEP[_local64].splice(Number(_local6), 1);
}
}
_local4.oEP[_local64].push({targ:_local36, val:"IGNORE", _isAF:true});
}
continue;
}
if (((_local4.oAFV[_local64] == true) && (!((_local64 == "_colorReset") && (_local7 == 100)))) && (!((_local64 == "_tintPercent") && (_local7 == 0)))) {
var _local20;
if ((_local64 == "_tint") || (_local64 == "_colorTransform")) {
_local20 = _ZigoEngine.getColorTransObj();
} else if ((String(com.mosesSupposes.fuse.FuseKitCommon._resetTo100()).indexOf(("|" + _local64) + "|") > -1) || ((_local64 == "_fade") && (_local7 < 50))) {
_local20 = 100;
} else if ((String(com.mosesSupposes.fuse.FuseKitCommon._resetTo0()).indexOf(("|" + _local64) + "|") > -1) || (_local64 == "_fade")) {
_local20 = 0;
} else {
var _local29 = _global.com.mosesSupposes.fuse.FuseFMP.getFilterProp(_local36, _local64, true);
if (_local29 != null) {
_local20 = _local29;
} else {
_local20 = ((_global.isNaN(_local36[_local64]) == false) ? _local36[_local64] : 0);
}
}
for (_local6 in _local4.oEP[_local64]) {
if (_local4.oEP[_local64][_local6].targ == _local36) {
_local4.oEP[_local64].splice(Number(_local6), 1);
}
}
_local4.oEP[_local64].push({targ:_local36, val:_local20, _isAF:true});
}
if (typeof(_local7) == "object") {
var _local28 = ((_local7 instanceof Array) ? ([]) : ({}));
for (_local6 in _local7) {
_local28[_local6] = ((_local7[_local6] instanceof Function) ? Function(_local7[_local6]).apply(_local23) : _local7[_local6]);
}
_local7 = _local28;
}
_local33.push(_local64);
_local27.push(_local7);
}
if (_local27.length > 0) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output((((_sID() + " ") + _local36) + " SET STARTS: ") + [("[" + _local33) + "]", ("[" + _local27) + "]"]);
}
_local35(_local36, _local33, _local27, 0);
}
}
}
if (setStart == true) {
} else {
var _local25;
var _local50;
var _local32;
var _local12;
var _local49;
var _local21;
var _local43 = "";
if (isFF == false) {
if (_local4.scope != undefined) {
_local23 = _local4.scope;
}
_local50 = ((_local4.skipLevel instanceof Function) ? (_local4.skipLevel.apply(_local23)) : (_local4.skipLevel));
var _local71 = ((_local4.extra1 instanceof Function) ? (_local4.extra1.apply(_local23)) : (_local4.extra1));
var _local70 = ((_local4.extra2 instanceof Function) ? (_local4.extra2.apply(_local23)) : (_local4.extra2));
var _local72 = ((_local4.roundResults instanceof Function) ? (_local4.roundResults.apply(_local23)) : (_local4.roundResults));
_local32 = {skipLevel:_local50, extra1:_local71, extra2:_local70, roundResults:_local72};
_local12 = {skipLevel:_local50, extra1:_local71, extra2:_local70, roundResults:_local72};
if (_local4.cycles != undefined) {
var _local55 = ((_local4.cycles instanceof Function) ? (_local4.cycles.apply(_local23)) : (_local4.cycles));
if (((Number(_local55) == 0) || (String(_local55).toUpperCase() == "LOOP")) && (_local74 != undefined)) {
delete _local4.cycles;
if (_local19 > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("117", _sID());
}
} else {
_local32.cycles = (_local12.cycles = _local55);
}
}
if (((_local4.func != undefined) || (_local4.startfunc != undefined)) || (_local4.updfunc != undefined)) {
for (_local8 in _local4) {
if (_local8.indexOf("func") > -1) {
_local12[_local8] = _local4[_local8];
} else if (((_local8 == "startscope") || (_local8 == "updscope")) || (_local8.indexOf("args") > -1)) {
_local12[_local8] = _local4[_local8];
}
}
if (_local23 != undefined) {
if ((_local12.func != undefined) && (_local12.scope == undefined)) {
_local12.scope = _local23;
}
if ((_local12.updfunc != undefined) && (_local12.updscope == undefined)) {
_local12.updscope = _local23;
}
if ((_local12.startfunc != undefined) && (_local12.startscope == undefined)) {
_local12.startscope = _local23;
}
}
}
for (_local5 in _local12) {
_local43 = _local43 + (((_local5 + ":") + _local12[_local5]) + "|");
}
if (_local4.event != undefined) {
_local25 = {scope:_local4.scope, e:_local4.event, ep:_local4.eventparams, skipLevel:_local50};
}
_local49 = _local4.trigger === true;
_local21 = undefined;
if ((_local49 == false) && (_local4.trigger != undefined)) {
_local21 = ((_local4.trigger instanceof Function) ? (_local4.trigger.apply(_local23)) : (_local4.trigger));
if (typeof(_local21) == "string") {
_local21 = ((String(_local21).charAt(0) == "-") ? (-parseClock(String(_local21).slice(1))) : (parseClock(String(_local21))));
}
if (_global.isNaN(_local21) == true) {
_local21 = undefined;
}
}
}
var _local18;
var _local13;
var _local22;
var _local15;
var _local42 = false;
var _local53 = ((_local56 == false) ? (_local16) : ([0]));
var _local34 = -1;
for (_local8 in _local53) {
if (_nPlaying < 2) {
return(null);
}
if (isFF == false) {
if (_local4.ease != null) {
_local22 = _local4.ease;
if (_local22 instanceof Function) {
var _local44 = Function(_local22);
if (typeof(_local44(1, 1, 1, 1)) != "number") {
_local22 = _local44.apply(_local23);
}
}
}
if (_local22 == null) {
_local22 = defaultEase;
}
_local13 = ((_local4.seconds instanceof Function) ? (_local4.seconds.apply(_local23)) : (_local4.seconds));
if (_local13 != undefined) {
if (typeof(_local13) == "string") {
_local13 = parseClock(String(_local13));
}
if (_global.isNaN(_local13) == true) {
_local13 = _ZigoEngine.DURATION || 0;
}
}
if (_local13 == null) {
_local13 = defaultSeconds;
}
_local18 = ((_local4.delay instanceof Function) ? (_local4.delay.apply(_local23)) : (_local4.delay));
if (typeof(_local18) == "string") {
_local18 = parseClock(String(_local18));
}
if ((_local18 == null) || (_global.isNaN(_local18) == true)) {
_local18 = 0;
}
if (_local56 == true) {
continue;
}
}
var _local36 = _local53[_local8];
var _local9 = [];
var _local11 = [];
var _local46 = 0;
var _local14 = -2;
for (var _local64 in _local4.oEP) {
var _local7 = _local4.oEP[_local64];
if (_local7 instanceof Function) {
_local7 = _local7.apply(_local23);
}
if ((_local7 === true) || (_local7 === false)) {
if (_local15 == undefined) {
_local15 = {};
}
_local15[_local64] = _local7;
_local46++;
continue;
}
if (typeof(_local7) == "object") {
if (_local7[0]._isAF == true) {
for (_local6 in _local7) {
if (_local7[_local6].targ == _local36) {
_local7 = _local7[_local6].val;
break;
}
}
} else {
var _local28 = ((_local7 instanceof Array) ? [] : {});
for (_local6 in _local7) {
_local28[_local6] = ((_local7[_local6] instanceof Function) ? Function(_local7[_local6]).apply(_local23) : _local7[_local6]);
}
_local7 = _local28;
}
}
if (_local7 != "IGNORE") {
if (_local64 == "_bezier_") {
_local14 = _local9.length;
} else if ((_local14 == -2) && ((_local64 == "controlX") || (_local64 == "controlY"))) {
_local14 = -1;
}
_local9.push(_local64);
_local11.push(_local7);
}
}
if (_local11.length > 0) {
if (_local14 > -2) {
if (_local14 == -1) {
_local14 = _local9.length;
}
_local9[_local14] = "_bezier_";
if (typeof(_local11[_local14]) != "object") {
_local11[_local14] = {};
}
var _local37 = _local11[_local14];
for (_local5 in _local9) {
if ("|x|y|_x|_y|controlX|controlY|".indexOf(("|" + _local9[_local5]) + "|") > -1) {
if (_local9[_local5].charAt(0) == "_") {
_local9[_local5] = _local9[_local5].slice(-1);
}
if (typeof(_local37[_local9[_local5]]) == "number") {
if ((_local19 > 0) && ((_local34 == -1) || (_local34 == _local8))) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local9[_local5]);
_local34 = Number(_local8);
}
} else {
_local37[_local9[_local5]] = _local11[_local5];
}
_local9.splice(Number(_local5), 1);
_local11.splice(Number(_local5), 1);
}
}
}
if (isFF == true) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("\n-" + _sID()) + " FF\ttargets:[") + _local36) + "]\tprops:[") + _local9.toString()) + "]");
}
_local35(_local36, _local9, _local11, 0, null, 0, {skipLevel:0});
continue;
}
var _local31 = {caught:false, onTweenEnd:function (evto) {
this.caught = true;
}};
_local36.addListener(_local31);
var _local17 = _local35(_local36, _local9, _local11, _local13, _local22, _local18, _local12);
_local36.removeListener(_local31);
if (_local17.length == 0) {
if (_local31.caught == true) {
_local12 = _local32;
}
} else {
if (_local17.length > 0) {
var _local38 = {targ:_local36, props:_local17, bools:_local15, targZID:_local36.__zigoID__};
if (_local42 == false) {
_local12 = _local32;
_local38.event = _local25;
_local15 = undefined;
_local25 = _local15;
_local38.trigger = _local49;
}
_aTweens.push(_local38);
_local36.addListener(this);
_local42 = true;
for (_local5 in _local17) {
if (_local24.indexOf(_local17[_local5] + ",") == -1) {
_local24 = _local24 + (_local17[_local5] + ",");
}
}
}
if (_local19 == 3) {
var _local45 = _local9.toString();
if (_local17.length > _local9.length) {
_local45 = _local45 + (("\n\t[NO-CHANGE PROPS DISCARDED (disregard this for double props like _scale). KEPT:" + _local17.toString()) + "]");
}
var _local30 = "";
for (_local5 in _local11) {
_local30 = (((typeof(_local11[_local5]) == "string") ? (("\"" + _local11[_local5]) + "\"") : _local11[_local5]) + ", ") + _local30;
}
com.mosesSupposes.fuse.FuseKitCommon.output((("\n-" + _sID()) + " TWEEN:\n") + [("\t[getTimer():" + getTimer()) + "] ", "targ: " + _local36, "props: " + _local45, "endVals: " + _local30, "time: " + ((_local13 == undefined) ? _ZigoEngine.DURATION : _local13), "easing: " + ((_local22 == undefined) ? _ZigoEngine.EASING : _local22), "delay: " + ((_local18 == undefined) ? 0 : _local18), "callbacks: " + ((_local43 == "") ? "(none)" : _local43)].join("\n\t"));
}
}
_local31 = undefined;
}
}
if ((_global.isNaN(_local13) == true) || (_local4.seconds == null)) {
_local13 = 0;
}
var _local39 = _local18 + _local13;
if (_local21 != undefined) {
if (_local21 < 0) {
_local21 = _local21 + _local39;
}
if ((_local21 > 0) && ((_local39 == 0) || (_local21 < _local39))) {
if (_local39 == 0) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((((((_sID() + " graft a timed trigger (") + _local21) + " sec). [has callback:") + (_local12 != _local32)) + ", has event:") + (_local25 != undefined)) + ", has booleans:") + (_local15 != undefined)) + "]");
}
doTimerTween(null, _local21, 0, true, _local15, _local12, _local25);
_local42 = true;
} else {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((_sID() + " graft a timed trigger (") + _local21) + " sec).");
}
doTimerTween(null, _local21, 0, true);
}
} else if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((_sID() + " timed trigger discarded: out of range. [") + _local21) + "/") + _local39) + "]");
}
}
if ((_local42 == false) && (((_local12 != _local32) || (_local25 != undefined)) || (_local15 != undefined))) {
if ((_local50 == 0) && (_local39 > 0)) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((((((_sID() + " no props tweened - graft a delay (") + _local39) + " sec). [has callback:") + (_local12 != _local32)) + ", has event:") + (_local25 != undefined)) + ", has booleans:") + (_local15 != undefined)) + "]");
}
doTimerTween(_local16, _local13, _local18, _local49, _local15, _local12, _local25);
} else {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((((_sID() + " no props tweened, executing nontween items. [has callback:") + (_local12 != _local32)) + ", has event:") + (_local25 != undefined)) + ", has booleans:") + (_local15 != undefined)) + "]");
}
for (_local8 in _local16) {
for (_local5 in _local15) {
_local16[_local8][_local5] = _local15[_local5];
}
}
if (_local50 < 2) {
if (_local12 != undefined) {
fireEvents(_local12, _local23, _local19, _local16);
}
if (_local25 != undefined) {
fireEvents(_local25, _local23, _local19);
}
}
}
}
}
}
_local51++;
}
if ((_local66 > 0) && (_local19 > 0)) {
if ((_local66 == _aProfiles.length) && (_local24 == "")) {
com.mosesSupposes.fuse.FuseKitCommon.error("118", _sID(), setStart);
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("119", _sID(), _local66, _local75);
}
}
tba = undefined;
_oTwBeingAdded = undefined;
return(((_local24 == "") ? null : (_local24.slice(0, -1))));
}
function doTimerTween(actualTargets, duration, delay, trigger, booleans, callback, event) {
var _local2 = {__TweenedDelay:0};
_ZigoEngine.initializeTargets(_local2);
_aTweens.push({targ:_local2, props:["__TweenedDelay"], trigger:trigger, bools:booleans, event:event, actualTargs:actualTargets, targZID:_local2.__zigoID__});
var _local3 = _ZigoEngine.doTween(_local2, "__TweenedDelay", 1, duration, null, delay, callback) == null;
if (_local3 == true) {
onTweenEnd({target:_local2, props:["__TweenedDelay"]});
} else {
_local2.addListener(this);
}
}
function onTweenEnd(o, doAutoStop) {
if (_nPlaying < 1) {
return(undefined);
}
var _local12 = _global.com.mosesSupposes.fuse.Fuse;
var _local8 = ((_local12 != undefined) ? (_local12.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
var _local11 = ((!(o.__zigoID__ === undefined)) ? (o.__zigoID__) : (o.target.__zigoID__));
for (var _local19 in _aTweens) {
var _local3 = _aTweens[_local19];
if (_local3.targZID == _local11) {
for (var _local18 in o.props) {
var _local7 = _local3.props;
for (var _local16 in _local7) {
var _local5 = _local7[_local16];
if (_local5 == o.props[_local18]) {
_local7.splice(Number(_local16), 1);
if (doAutoStop == true) {
var _local6 = _local12.getInstance(_nFuseID);
var _local10 = (((_bTrigger == true) && (o.during == "add")) && (_local6[_local6.currentIndex]._oTwBeingAdded[_local11] === true)) && (_local6.state == "playing");
if (_local10 == false) {
_local3.targ.removeListener(this);
for (var _local19 in _aTweens) {
if (_aTweens[_local19].targZID == _local11) {
for (var _local18 in o.props) {
for (var _local16 in _aTweens[_local19].props) {
if (_aTweens[_local19].props[_local16] == o.props[_local18]) {
_aTweens[_local19].props.splice(Number(_local16), 1);
}
}
}
if (_aTweens[_local19].props.length == 0) {
_aTweens.splice(Number(_local19), 1);
}
}
}
if (_local8 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(_sID() + " triggering auto-stop due to interruption");
}
if ((_local6.autoClear == true) || ((!(_local6.autoClear === false)) && (_local12.AUTOCLEAR == true))) {
dispatchRequest("destroy");
} else {
dispatchRequest("stop");
}
return(undefined);
}
if (_local8 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((("note -" + _sID()) + " interrupted one of its own properties \"") + _local5) + "\". (Autostop not triggered.)");
}
}
if ((_nPlaying == 2) && (_local5 != "__TweenedDelay")) {
if (_local8 > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("120", _sID(), _local5);
}
}
if (_local7.length == 0) {
if (_local3.event != undefined) {
fireEvents(_local3.event, null, _local8);
}
if (_local5 == "__TweenedDelay") {
_ZigoEngine.deinitializeTargets(_local3.targ);
delete _local3.targ;
for (var _local14 in _local3.bools) {
for (var _local13 in _local3.actualTargs) {
_local3.actualTargs[_local13][_local14] = _local3.bools[_local14];
}
}
} else {
var _local9 = false;
for (var _local14 in _local3.bools) {
_local3.targ[_local14] = _local3.bools[_local14];
}
for (var _local15 in _aTweens) {
if ((_local15 != _local19) && (_aTweens[_local15].targ == _local3.targ)) {
_local9 = true;
}
}
if (_local9 == false) {
_local3.targ.removeListener(this);
}
}
if (_local3.trigger == true) {
if (((_bTrigger == false) && (o.isResume != true)) && (_aTweens.length > 1)) {
_bTrigger = true;
if (_local8 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(_sID() + " trigger fired!");
}
var breakChainInt;
breakChainInt = setInterval(function (fi) {
clearInterval(breakChainInt);
fi.dispatchRequest("advance", [false, false, false]);
}, 1, this);
}
}
_aTweens.splice(Number(_local19), 1);
}
}
}
}
}
}
if (((_aTweens.length == 0) && (_nPlaying == 1)) && (o.isResume != true)) {
complete(_local8);
}
}
function onTweenInterrupt(o) {
if (_nPlaying == -1) {
return(undefined);
}
var _local4 = _global.com.mosesSupposes.fuse.Fuse;
var _local6 = _local4.getInstance(_nFuseID);
var _local8 = (_local6.autoStop == true) || ((!(_local6.autoStop === false)) && (_local4.AUTOSTOP == true));
var _local3 = o.__zigoID__;
var _local9 = ((_local4 != undefined) ? (_local4.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
if ((_local8 == true) || ((!(_local8 === false)) && (_local4.AUTOSTOP == true))) {
onTweenEnd(o, true);
return(undefined);
}
if (typeof(o.target) != "string") {
onTweenEnd(o);
return(undefined);
}
for (var _local5 in _aTweens) {
if (_aTweens[_local5].targZID == _local3) {
_aTweens.splice(Number(_local5), 1);
}
}
if ((_aTweens.length == 0) && (_nPlaying == 1)) {
complete(_local9);
}
}
function complete(outputLevel) {
if (outputLevel == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(_sID() + " complete.");
}
var breakChainInt;
breakChainInt = setInterval(function (fi, trigger) {
clearInterval(breakChainInt);
var _local1 = fi._nPlaying;
if (trigger != true) {
if (_local1 < 1) {
return(undefined);
}
}
fi.stop();
if (_local1 > 0) {
fi.dispatchRequest("advance", [trigger, false, false]);
}
}, 1, this, _bTrigger);
}
function parseClock(str) {
if (str.indexOf(":") != 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("121");
return(_ZigoEngine.DURATION || 0);
}
var _local4 = 0;
var _local3 = str.split(":");
_local3.reverse();
var _local2;
if ((String(_local3[0]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[0]))) == false)) {
_local4 = _local4 + (_local2 / 100);
}
if (((String(_local3[1]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[1]))) == false)) && (_local2 < 60)) {
_local4 = _local4 + _local2;
}
if (((String(_local3[2]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[2]))) == false)) && (_local2 < 60)) {
_local4 = _local4 + (_local2 * 60);
}
if (((String(_local3[3]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[3]))) == false)) && (_local2 < 24)) {
_local4 = _local4 + (_local2 * 3600);
}
return(_local4);
}
function fireEvents(o, scope, outputLevel, targets) {
if (o.scope == undefined) {
o.scope = scope;
}
if (o.e == undefined) {
var _local3 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(o, targets, outputLevel, false);
if (_local3.start.f != null) {
_local3.start.f.apply(_local3.start.s, _local3.start.a);
}
if (_local3.upd.f != null) {
_local3.upd.f.apply(_local3.upd.s, _local3.upd.a);
}
if (_local3.end.f != null) {
_local3.end.f.apply(_local3.end.s, _local3.end.a);
}
} else {
var _local6 = ((o.e instanceof Function) ? (String(o.e.apply(scope))) : (String(o.e)));
if ((_local6 != "undefined") && (_local6.length > 0)) {
if (String(com.mosesSupposes.fuse.FuseKitCommon._fuseEvents()).indexOf(("|" + _local6) + "|") > -1) {
if (outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("122", _local6);
}
} else {
var _local7 = _global.com.mosesSupposes.fuse.Fuse.getInstance(_nFuseID);
var _local5 = ((o.ep instanceof Function) ? (o.ep.apply(scope)) : (o.ep));
if ((_local5 == null) || (typeof(_local5) != "object")) {
_local5 = {};
}
_local5.target = _local7;
_local5.type = _local6;
_local7.dispatchEvent.call(_local7, _local5);
}
} else if (outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("123", _sID());
}
}
}
static var registryKey = "fuseItem";
static var ADD_UNDERSCORES = true;
var _nPlaying = -1;
var _bStartSet = false;
var _bTrigger = false;
}
Symbol 20 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 297 MovieClip [__Packages.mx.remoting.Service] Frame 0
class mx.remoting.Service extends Object
{
var log, __conn, __serviceName, __responder;
function Service (gatewayURI, logger, serviceName, conn, resp) {
super();
log = logger;
log.logInfo("Creating Service for " + serviceName, mx.services.Log.VERBOSE);
if ((gatewayURI == "") && (conn == null)) {
gatewayURI = mx.remoting.NetServices.gatewayUrl;
}
gatewayURI = mx.remoting.NetServices.getHttpUrl(gatewayURI);
if (conn == null) {
conn = mx.remoting.NetServices.getConnection(gatewayURI);
if (conn == null) {
log.logInfo("Creating gateway connection for " + gatewayURI, mx.services.Log.VERBOSE);
conn = mx.remoting.NetServices.createGatewayConnection(gatewayURI, logger);
}
}
__conn = conn;
conn.updateConfig();
_allowRes = true;
__serviceName = serviceName;
__responder = resp;
log.logInfo("Successfully created Service", mx.services.Log.VERBOSE);
}
function get connection() {
return(__conn);
}
function __resolve(methodName) {
if (_allowRes) {
var _local2 = __makeOpFunc(methodName);
this[methodName] = _local2;
return(_local2);
}
return(null);
}
function __makeOpFunc(name) {
var op = (new mx.remoting.Operation(name, this));
var _local3 = function () {
op.invoke(arguments);
return(op.send());
};
_local3.send = function () {
return(op.createThenSend());
};
_local3.setResponder = function (resp) {
op.responder = resp;
};
_local3.getRequest = function () {
return(op.request);
};
_local3.setRequest = function (val) {
op.request = val;
};
_local3.addProperty("request", _local3.getRequest, _local3.setRequest);
_local3.operation = op;
return(_local3);
}
function get name() {
return(__serviceName);
}
function get responder() {
return(__responder);
}
static var version = "1.2.0.124";
var _allowRes = false;
}
Symbol 298 MovieClip [__Packages.mx.services.Log] Frame 0
class mx.services.Log
{
var level, name;
function Log (logLevel, name) {
level = ((logLevel == undefined) ? (BRIEF) : (logLevel));
this.name = ((name == undefined) ? "" : (name));
}
function logInfo(msg, level) {
if (level == undefined) {
level = BRIEF;
}
if (level <= this.level) {
if (level == DEBUG) {
onLog((((getDateString() + " [DEBUG] ") + name) + ": ") + msg);
} else {
onLog((((getDateString() + " [INFO] ") + name) + ": ") + msg);
}
}
}
function logDebug(msg) {
logInfo(msg, DEBUG);
}
function getDateString() {
var _local1 = new Date();
return(((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()) + ":") + _local1.getSeconds());
}
function onLog(message) {
trace(message);
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
}
Symbol 299 MovieClip [__Packages.mx.remoting.Connection] Frame 0
class mx.remoting.Connection extends NetConnection
{
var uri, __urlSuffix, __originalUrl;
function Connection () {
super();
}
function getService(serviceName, client) {
var _local2 = new mx.remoting.NetServiceProxy(this, serviceName, client);
return(_local2);
}
function setCredentials(userId, password) {
addHeader("Credentials", false, {userid:userId, password:password});
}
function clone() {
var _local2 = new mx.remoting.Connection();
_local2.connect(uri);
return(_local2);
}
function getDebugId() {
return(null);
}
function getDebugConfig() {
return(null);
}
function setDebugId(id) {
}
function updateConfig() {
}
function call() {
super.call.apply(super, arguments);
}
function close() {
super.close();
}
function connect(url) {
return(super.connect(url));
}
function addHeader(name, mustUnderstand, obj) {
super.addHeader(name, mustUnderstand, obj);
}
function trace(traceObj) {
}
function AppendToGatewayUrl(urlSuffix) {
__urlSuffix = urlSuffix;
if (__originalUrl == null) {
__originalUrl = uri;
}
var _local2 = __originalUrl + urlSuffix;
connect(_local2);
}
function ReplaceGatewayUrl(newUrl) {
connect(newUrl);
}
function RequestPersistentHeader(info) {
addHeader(info.name, info.mustUnderstand, info.data);
}
static var version = "1.2.0.124";
}
Symbol 300 MovieClip [__Packages.mx.remoting.NetServiceProxy] Frame 0
class mx.remoting.NetServiceProxy extends Object
{
var nc, serviceName, client;
function NetServiceProxy (netC, servName, cli) {
super();
if (netC != null) {
nc = netC;
serviceName = servName;
client = cli;
}
_allowRes = true;
}
function _setParentService(service) {
nc = service.nc;
client = service.client;
}
function __resolve(methodName) {
if (_allowRes) {
var _local3 = function () {
if (this.client != null) {
arguments.unshift(new mx.remoting.NetServiceProxyResponder(this, methodName));
} else if (typeof(arguments[0].onResult) != "function") {
mx.remoting.NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, and no responder was given in call to " + methodName);
arguments.unshift(new mx.remoting.NetServiceProxyResponder(this, methodName));
}
if (typeof(this.serviceName) == "function") {
this.serviceName = this.servicename;
}
arguments.unshift((this.serviceName + ".") + methodName);
return(this.nc.call.apply(this.nc, arguments));
};
return(_local3);
}
return(null);
}
static function registerNetServiceProxy() {
Object.registerClass("NetServiceProxy", mx.remoting.NetServiceProxy);
return(true);
}
static var init = registerNetServiceProxy();
var _allowRes = false;
}
Symbol 301 MovieClip [__Packages.mx.remoting.NetServiceProxyResponder] Frame 0
class mx.remoting.NetServiceProxyResponder extends Object
{
var service, methodName;
function NetServiceProxyResponder (serv, method) {
super();
service = serv;
methodName = method;
}
function onResult(result) {
var _local2 = service.client;
if ((result instanceof mx.remoting.NetServiceProxy) || (result instanceof mx.remoting.RecordSet)) {
result._setParentService(service);
}
var _local4 = methodName + "_Result";
if (typeof(_local2[_local4]) == "function") {
_local2[_local4].apply(_local2, [result]);
} else if (typeof(_local2.onResult) == "function") {
_local2.onResult(result);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 1, (_local4 + " was received from server: ") + result);
}
}
function onStatus(result) {
var _local4 = service.client;
var _local6 = methodName + "_Status";
if (typeof(_local4[_local6]) == "function") {
_local4[_local6].apply(_local4, [result]);
} else if (typeof(_local4.onStatus) == "function") {
_local4.onStatus(result);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(result);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(result);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 2, (((_local6 + " was received from server: <") + result.level) + "> ") + result.description);
}
}
}
Symbol 302 MovieClip [__Packages.mx.data.PageableData] Frame 0
interface mx.data.PageableData
{
}
Symbol 303 MovieClip [__Packages.mx.data.DataRange] Frame 0
interface mx.data.DataRange
{
}
Symbol 304 MovieClip [__Packages.mx.data.PageableList] Frame 0
interface mx.data.PageableList extends mx.data.PageableData
{
}
Symbol 305 MovieClip [__Packages.mx.remoting.RecordSet] Frame 0
class mx.remoting.RecordSet extends Object implements mx.data.PageableList
{
var _items, uniqueID, mTitles, serverInfo, serverinfo, mRecordsAvailable, mRecordSetID, serviceName, mTotalCount, mDeliveryMode, mAllNotified, mOutstandingRecordCount, dispatchEvent, mPageSize, mNumPrefetchPages, mRecordSetService, gateway_conn, logger, mDataFetcher;
function RecordSet (columnNames) {
super();
mx.events.EventDispatcher.initialize(this);
_items = new Array();
uniqueID = 0;
if (mTitles != null) {
return;
}
if (serverInfo == null) {
if (serverinfo != null) {
serverInfo = serverinfo;
}
}
if (serverInfo == null) {
mTitles = columnNames;
return;
}
if (serverInfo.version != 1) {
mx.remoting.NetServices.trace("RecordSet", "warning", 100, "Received incompatible RecordSet version from server");
return;
}
mTitles = serverInfo.columnNames;
mRecordsAvailable = 0;
setData(((serverInfo.cursor == null) ? 0 : (serverInfo.cursor - 1)), serverInfo.initialData);
if (serverInfo.initialData.length != serverInfo.totalCount) {
mRecordSetID = serverInfo.id;
if (mRecordSetID != null) {
serviceName = ((serverInfo.serviceName == null) ? "RecordSet" : (serverInfo.serviceName));
mTotalCount = serverInfo.totalCount;
mDeliveryMode = "ondemand";
mAllNotified = false;
mOutstandingRecordCount = 0;
} else {
mx.remoting.NetServices.trace("RecordSet", "warning", 102, "Missing some records, but there's no RecordSet id");
}
}
serverInfo = null;
}
function addItem(item) {
addItemAt(length, item);
}
function addItemAt(index, item) {
var _local3 = true;
if ((index < length) && (index >= 0)) {
items.splice(index, 0, item);
} else if (index == length) {
items[index] = item;
} else {
_local3 = false;
mx.remoting.NetServices.trace("Cannot add an item outside the bounds of the RecordSet");
return(undefined);
}
if (_local3) {
item.__ID__ = uniqueID++;
}
updateViews("addItems", index, index);
}
function addEventListener(event, listener) {
}
function clear() {
if (checkLocal()) {
return(undefined);
}
var _local2 = items.length;
items.splice(0);
uniqueID = 0;
updateViews("removeItems", 0, _local2);
}
function contains(itmToCheck) {
if (isObjectEmpty(itmToCheck)) {
return(false);
}
var _local5;
var _local4;
var _local2 = 0;
while (_local2 < items.length) {
_local5 = items[_local2];
_local4 = true;
for (var _local6 in itmToCheck) {
if (itmToCheck[_local6] != _local5[_local6]) {
_local4 = false;
break;
}
}
if (_local4) {
return(true);
}
_local2++;
}
return(false);
}
function getColumnNames() {
return(mTitles);
}
function get columnNames() {
return(getColumnNames());
}
function getLocalLength() {
return(items.length);
}
function getLength() {
if (mRecordSetID != null) {
return(mTotalCount);
}
return(items.length);
}
function getIterator() {
var _local2 = new mx.remoting.RecordSetIterator(this);
return(_local2);
}
function get length() {
return(getLength());
}
function getItemAt(index) {
if ((index < 0) || (index >= length)) {
return(null);
}
if (mRecordSetID == null) {
return(items[index]);
}
requestRecord(index);
var _local3 = items[index];
if (_local3 == 1) {
return("in progress");
}
return(_local3);
}
function getItemID(index) {
return(items[index].__ID__);
}
function get items() {
return(_items);
}
function initialize(info) {
}
function filter(filterFunction, context) {
if (checkLocal()) {
return(undefined);
}
var _local4 = new mx.remoting.RecordSet(mTitles);
var _local5 = length;
var _local3 = 0;
while (_local3 < _local5) {
var _local2 = getItemAt(_local3);
if (((_local2 != null) && (_local2 != 1)) && (filterFunction(_local2, context))) {
_local4.addItem(_local2);
}
_local3++;
}
return(_local4);
}
function sortItems(compareFunc, optionFlags) {
if (checkLocal()) {
return(undefined);
}
items.sort(compareFunc, optionFlags);
updateViews("sort");
}
function sortItemsBy(fieldNames, order, optionFlags) {
if (checkLocal()) {
return(undefined);
}
if (typeof(order) == "string") {
items.sortOn(fieldNames);
if (order.toUpperCase() == "DESC") {
items.reverse();
}
} else {
items.sortOn(fieldNames, optionFlags);
}
updateViews("sort");
}
function sort(compareFunc) {
if (checkLocal()) {
return(undefined);
}
items.sort(compareFunc);
updateViews("sort");
}
function isEmpty() {
return(items.length == 0);
}
function isLocal() {
return(mRecordSetID == null);
}
function isFullyPopulated() {
return(isLocal());
}
function getRemoteLength() {
if (isLocal()) {
return(mRecordsAvailable);
}
return(mTotalCount);
}
function getNumberAvailable() {
if (isLocal()) {
return(getLength());
}
return(mRecordsAvailable);
}
function replaceItemAt(index, item) {
if ((index >= 0) && (index <= length)) {
var _local3 = getItemID(index);
items[index] = item;
items[index].__ID__ = _local3;
updateViews("updateItems", index, index);
}
}
function removeAll() {
clear();
}
function removeItemAt(index) {
var _local3 = _items[index];
_items.splice(index, 1);
var _local5 = [_items[index]];
var _local4 = [getItemID(index)];
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:index, removedItems:_local5, removedIDs:_local4});
return(_local3);
}
function removeEventListener(event, listener) {
}
function requestRange(range) {
var _local2 = range.getStart();
var _local3 = range.getEnd();
return(internalRequestRange(_local2, _local3));
}
function setDeliveryMode(mode, pagesize, numPrefetchPages) {
mDeliveryMode = mode.toLowerCase();
stopFetchAll();
if ((pagesize == null) || (pagesize <= 0)) {
pagesize = 25;
}
switch (mDeliveryMode) {
case "ondemand" :
break;
case "page" :
if (numPrefetchPages == null) {
numPrefetchPages = 0;
}
mPageSize = pagesize;
mNumPrefetchPages = numPrefetchPages;
break;
case "fetchall" :
stopFetchAll();
startFetchAll(pagesize);
break;
default :
mx.remoting.NetServices.trace("RecordSet", "warning", 107, "SetDeliveryMode: unknown mode string");
}
}
function editField(index, fieldName, value) {
changeFieldValue(index, fieldName, value);
}
function getEditingData(index, fieldName) {
return(items[index][fieldName]);
}
function setField(index, fieldName, value) {
changeFieldValue(index, fieldName, value);
}
function changeFieldValue(index, fieldName, value) {
if (checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= getLength())) {
return(undefined);
}
items[index][fieldName] = value;
updateViews("updateItems", index, index);
}
function isObjectEmpty(objToCheck) {
var _local1 = true;
for (var _local3 in objToCheck) {
_local1 = false;
return(_local1);
}
return(_local1);
}
function arrayToObject(anArray) {
if (mTitles == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 105, "getItem: titles are not available");
return(null);
}
var _local4 = new Object();
var _local5 = anArray.length;
var _local3;
var _local2 = 0;
while (_local2 < _local5) {
_local3 = mTitles[_local2];
if (_local3 == null) {
_local3 = ("column" + _local2) + 1;
}
_local4[_local3] = anArray[_local2];
_local2++;
}
return(_local4);
}
function checkLocal() {
if (isLocal()) {
return(false);
}
mx.remoting.NetServices.trace("RecordSet", "warning", 108, "Operation not allowed on partial recordset");
return(true);
}
function getRecordSetService() {
if (mRecordSetService == null) {
if (gateway_conn == null) {
gateway_conn = mx.remoting.NetServices.createGatewayConnection();
} else if (_global.netDebugInstance != undefined) {
gateway_conn = gateway_conn.clone();
}
if (_global.netDebugInstance != undefined) {
gateway_conn.setupRecordSet();
gateway_conn.setDebugId("RecordSet " + mRecordSetID);
}
mRecordSetService = gateway_conn.getService(serviceName, this);
if (mRecordSetService == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 101, "Failed to create RecordSet service");
mRecordSetService = null;
}
}
return(mRecordSetService);
}
function internalRequestRange(index, lastIndex) {
var _local6 = -1;
if (index < 0) {
index = 0;
}
if (lastIndex >= getRemoteLength()) {
lastIndex = getRemoteLength() - 1;
}
var _local3;
var _local4;
while (index <= lastIndex) {
while ((index <= lastIndex) && (items[index] != null)) {
index++;
}
_local3 = index;
while ((index <= lastIndex) && (items[index] == null)) {
mOutstandingRecordCount++;
items[index] = 1;
index++;
}
_local4 = index - 1;
if (_local3 <= _local4) {
logger.logInfo((((" Fetching records from index [" + _local3) + "] to index [") + _local4) + "]");
getRecordSetService().getRecords(mRecordSetID, _local3 + 1, (_local4 - _local3) + 1);
_local6 = _local4;
updateViews("fetchRows", _local3, _local4);
}
}
return(_local6);
}
function removeItems(index, len) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < len) {
_local3.push(getItemID(index + _local2));
_local2++;
}
var _local6 = items.splice(index, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:index, lastItem:(index + len) - 1, removedItems:_local6, removedIDs:_local3});
}
function getRecords_Result(info) {
setData(info.Cursor - 1, info.Page);
mOutstandingRecordCount = mOutstandingRecordCount - info.Page.length;
updateViews("updateItems", info.Cursor - 1, ((info.Cursor - 1) + info.Page.length) - 1);
if ((mRecordsAvailable == mTotalCount) && (!mAllNotified)) {
updateViews("allRows");
mRecordSetService.release();
mAllNotified = true;
mRecordSetID = null;
mRecordSetService = null;
}
}
function release_Result() {
}
function requestOneRecord(index) {
if (items[index] == null) {
if (mDeliveryMode == "ondemand") {
logger.logInfo((" INFO: Fetching Record [" + index) + "]");
}
getRecordSetService().getRecords(mRecordSetID, index + 1, 1);
mOutstandingRecordCount++;
items[index] = 1;
updateViews("fetchRows", index, index);
}
}
function requestRecord(index) {
if (mDeliveryMode != "page") {
requestOneRecord(index);
} else {
var _local2 = int(index / mPageSize) * mPageSize;
var _local3 = (_local2 + (mPageSize * (mNumPrefetchPages + 1))) - 1;
internalRequestRange(_local2, _local3);
}
}
function _setParentService(service) {
gateway_conn = service.nc;
}
function setData(start, dataArray) {
var _local5 = dataArray.length;
var _local3;
var _local4;
var _local2 = 0;
while (_local2 < _local5) {
_local3 = _local2 + start;
_local4 = items[_local3];
if ((_local4 != null) && (_local4 != 1)) {
mx.remoting.NetServices.trace("RecordSet", "warning", 106, "Already got record # " + _local3);
} else {
mRecordsAvailable = mRecordsAvailable + 1;
}
items[_local3] = arrayToObject(dataArray[_local2]);
items[_local3].__ID__ = uniqueID++;
_local2++;
}
}
function startFetchAll(pagesize) {
if (mDataFetcher != null) {
mDataFetcher.disable();
}
mDataFetcher = new mx.remoting.RsDataFetcher(this, pagesize);
}
function stopFetchAll() {
mDataFetcher.disable();
mDataFetcher = null;
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static function registerRecordSet() {
Object.registerClass("RecordSet", mx.remoting.RecordSet);
return(true);
}
static var version = "1.2.0.124";
static var init = registerRecordSet();
}
Symbol 306 MovieClip [__Packages.mx.remoting.NetServices] Frame 0
class mx.remoting.NetServices extends Object
{
static var defaultGatewayUrl, logger, traceNetServices;
function NetServices () {
super();
}
static function setDefaultGatewayUrl(url) {
defaultGatewayUrl = url;
}
static function setGatewayUrl(url) {
gatewayUrl = url;
}
static function createGatewayConnection(url, infoLogger) {
logger = infoLogger;
if (url == undefined) {
url = gatewayUrl;
if (url == undefined) {
url = defaultGatewayUrl;
}
}
if (url == undefined) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is undefined");
logger.logInfo(("NetServices: createGatewayConnection - gateway url <" + url) + "> is undefined", mx.services.Log.DEBUG);
return(null);
}
var _local2 = new mx.remoting.Connection();
_local2.connect(url);
__sharedConnections[url] = _local2;
return(_local2);
}
static function getConnection(uri) {
return(__sharedConnections[uri]);
}
static function getHostUrl() {
if (!isHttpUrl(_root._url)) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
var _local2 = _root._url.indexOf("/", 8);
if (_local2 < 0) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
return(_root._url.substring(0, _local2));
}
static function isHttpUrl(url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
}
static function getHttpUrl(url) {
if (!isHttpUrl(url)) {
url = getHostUrl() + url;
}
return(url);
}
static function trace(who, severity, number, message) {
traceNetServices(who, severity, number, message);
}
static var version = "1.2.0.124";
static var gatewayUrl = _root.gatewayUrl;
static var __sharedConnections = new Array();
}
Symbol 307 MovieClip [__Packages.mx.utils.Iterator] Frame 0
interface mx.utils.Iterator
{
}
Symbol 308 MovieClip [__Packages.mx.remoting.RecordSetIterator] Frame 0
class mx.remoting.RecordSetIterator implements mx.utils.Iterator
{
var _recordSet, _cursor;
function RecordSetIterator (rec) {
_recordSet = rec;
_cursor = 0;
}
function hasNext() {
return(_cursor < _recordSet.getLength());
}
function next() {
return(_recordSet.getItemAt(_cursor++));
}
static var version = "1.2.0.124";
}
Symbol 309 MovieClip [__Packages.mx.remoting.RsDataFetcher] Frame 0
class mx.remoting.RsDataFetcher extends Object
{
var mRecordSet, mIncrement, mNextRecord, mEnabled, mHighestRequested;
function RsDataFetcher (pgRS, increment) {
super();
mRecordSet = pgRS;
mRecordSet.addEventListener("modelChanged", this);
mIncrement = increment;
mNextRecord = 0;
mEnabled = true;
doNext();
}
function disable() {
mEnabled = false;
}
function doNext() {
if (mEnabled) {
while (true) {
if (mNextRecord >= mRecordSet.getRemoteLength()) {
return(undefined);
}
var _local2 = new mx.remoting.RsDataRange(mNextRecord, (mNextRecord + mIncrement) - 1);
mHighestRequested = mRecordSet.requestRange(_local2);
mNextRecord = mNextRecord + mIncrement;
if (mHighestRequested > 0) {
return(undefined);
}
}
}
}
function modelChanged(eventObj) {
if (((eventObj.eventName == "updateItems") && (eventObj.firstItem <= mHighestRequested)) && (eventObj.lastItem >= mHighestRequested)) {
doNext();
}
if (eventObj.eventName == "allRows") {
disable();
}
}
}
Symbol 310 MovieClip [__Packages.mx.remoting.RsDataRange] Frame 0
class mx.remoting.RsDataRange extends Object implements mx.data.DataRange
{
var _start, _end;
function RsDataRange (s, e) {
super();
_start = s;
_end = e;
}
function getStart() {
return(_start);
}
function getEnd() {
return(_end);
}
function setEnd(e) {
_end = e;
}
function setStart(s) {
_start = s;
}
}
Symbol 311 MovieClip [__Packages.mx.rpc.Responder] Frame 0
interface mx.rpc.Responder
{
}
Symbol 312 MovieClip [__Packages.mx.rpc.ResultEvent] Frame 0
class mx.rpc.ResultEvent extends Object
{
var __result;
function ResultEvent (res) {
super();
__result = res;
}
function get result() {
return(__result);
}
}
Symbol 313 MovieClip [__Packages.mx.rpc.FaultEvent] Frame 0
class mx.rpc.FaultEvent extends Object
{
var __fault;
function FaultEvent (f) {
super();
__fault = f;
}
function get fault() {
return(__fault);
}
}
Symbol 314 MovieClip [__Packages.mx.rpc.Fault] Frame 0
class mx.rpc.Fault extends Object
{
var __faultcode, __faultstring, __detail, __type, __description;
function Fault (code, msg, detail, type) {
super();
__faultcode = code;
__faultstring = msg;
__detail = detail;
__type = type;
}
function get faultcode() {
return(__faultcode);
}
function get faultstring() {
return(__faultstring);
}
function get detail() {
return(__detail);
}
function get description() {
if (__description == null) {
if (__faultstring.indexOf(":") > -1) {
__description = __faultstring.substring(__faultstring.indexOf(":") + 1);
var _local2 = 0;
while (__description.indexOf(" ", _local2) == _local2) {
_local2++;
}
if (_local2 > 0) {
__description = __description.substring(_local2);
}
} else {
__description = __faultstring;
}
}
return(__description);
}
function get type() {
return(__type);
}
}
Symbol 315 MovieClip [__Packages.mx.remoting.Operation] Frame 0
class mx.remoting.Operation
{
var __service, __responder, __methodName, __invokationName, __request, __arguments;
function Operation (methodName, parent) {
__service = parent;
__responder = parent.responder;
__methodName = methodName;
__invokationName = (__service.__get__name() + ".") + methodName;
__request = new Object();
__arguments = new Array();
}
function createThenSend(Void) {
createArguments();
return(send());
}
function send(Void) {
__service.log.logInfo((("Invoking " + __methodName) + " on ") + __service.__get__name());
var _local3 = new mx.remoting.PendingCall(__service, __methodName);
_local3.__set__responder(__responder);
var _local2 = null;
if (__arguments == null) {
_local2 = new Array();
} else {
_local2 = __arguments.concat();
}
__invokationName = (__service.__get__name() + ".") + __methodName;
_local2.unshift(__invokationName, _local3);
__service.__get__connection().call.apply(__service.__get__connection(), _local2);
return(_local3);
}
function invoke(a) {
__arguments = a;
}
function get responder() {
return(__responder);
}
function set responder(r) {
__responder = r;
//return(responder);
}
function get request() {
return(__request);
}
function set request(r) {
__request = r;
//return(request);
}
function get name() {
return(__methodName);
}
function createArguments() {
if (__request != null) {
__arguments = new Array();
for (var _local2 in __request) {
if (_local2 != "arguments") {
__arguments.unshift(__request[_local2]);
}
}
}
}
}
Symbol 316 MovieClip [__Packages.mx.remoting.PendingCall] Frame 0
class mx.remoting.PendingCall extends Object
{
var __service, __methodName, __responder;
function PendingCall (srv, methodName) {
super();
__service = srv;
__methodName = methodName;
}
function get responder() {
return(__responder);
}
function set responder(res) {
__responder = res;
//return(responder);
}
function onResult(result) {
result.serviceName = result.serviceName;
if (result != null) {
if (result instanceof mx.remoting.NetServiceProxy) {
var _local4 = new mx.remoting.Service(null, null, result.serviceName, __service.__get__connection(), __service.__get__responder());
result = _local4;
} else if (result instanceof mx.remoting.RecordSet) {
var _local3 = new mx.remoting.NetServiceProxy(__service.__get__connection());
result._setParentService(_local3);
result.logger = __service.log;
}
}
if (__responder != null) {
__responder.onResult(new mx.rpc.ResultEvent(result));
}
if (__service.log != null) {
__service.log.logInfo((((__service.__get__name() + ".") + __methodName) + "() returned ") + mx.data.binding.ObjectDumper.toString(result));
}
}
function onStatus(status) {
if (__responder != null) {
__responder.onFault(new mx.rpc.FaultEvent(new mx.rpc.Fault(status.code, status.description, status.details, status.type)));
}
if (__service.log != null) {
__service.log.logDebug("Service invocation failed.");
__service.log.logDebug((((__service.__get__name() + ".") + __methodName) + "() returned ") + mx.data.binding.ObjectDumper.toString(status));
}
}
function get methodName() {
return(__methodName);
}
static var inited = mx.remoting.NetServiceProxy.registerNetServiceProxy();
}
Symbol 317 MovieClip [__Packages.mx.data.binding.ObjectDumper] Frame 0
class mx.data.binding.ObjectDumper
{
var inProgress;
function ObjectDumper () {
inProgress = new Array();
}
static function toString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local3 = new mx.data.binding.ObjectDumper();
if (maxLineLength == undefined) {
maxLineLength = 100;
}
if (indent == undefined) {
indent = 0;
}
return(_local3.realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent));
}
function realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local8 = 0;
while (_local8 < inProgress.length) {
if (inProgress[_local8] == obj) {
return("***");
}
_local8++;
}
inProgress.push(obj);
indent++;
var _local16 = typeof(obj);
var _local5;
if ((obj instanceof XMLNode) && (showXMLstructures != true)) {
_local5 = obj.toString();
} else if (obj instanceof Date) {
_local5 = obj.toString();
} else if (_local16 == "object") {
var _local4 = new Array();
if (obj instanceof Array) {
_local5 = "[";
var _local15 = 0;
while (_local15 < obj.length) {
_local4.push(_local15);
_local15++;
}
} else {
_local5 = "{";
for (var _local15 in obj) {
_local4.push(_local15);
}
_local4.sort();
}
var _local9 = "";
var _local3 = 0;
while (_local3 < _local4.length) {
var _local6 = obj[_local4[_local3]];
var _local7 = true;
if (typeof(_local6) == "function") {
_local7 = showFunctions == true;
}
if (typeof(_local6) == "undefined") {
_local7 = showUndefined == true;
}
if (_local7) {
_local5 = _local5 + _local9;
if (!(obj instanceof Array)) {
_local5 = _local5 + (_local4[_local3] + ": ");
}
_local5 = _local5 + realToString(_local6, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent);
_local9 = ", `";
}
_local3++;
}
if (obj instanceof Array) {
_local5 = _local5 + "]";
} else {
_local5 = _local5 + "}";
}
} else if (_local16 == "function") {
_local5 = "function";
} else if (_local16 == "string") {
_local5 = ("\"" + obj) + "\"";
} else {
_local5 = String(obj);
}
if (_local5 == "undefined") {
_local5 = "-";
}
inProgress.pop();
return(replaceAll(_local5, "`", ((_local5.length < maxLineLength) ? "" : (newline + doIndent(indent)))));
}
static function replaceAll(str, from, to) {
var _local3 = str.split(from);
var _local4 = "";
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3.length) {
_local4 = _local4 + (_local2 + _local3[_local1]);
_local2 = to;
_local1++;
}
return(_local4);
}
function doIndent(indent) {
var _local2 = "";
var _local1 = 0;
while (_local1 < indent) {
_local2 = _local2 + " ";
_local1++;
}
return(_local2);
}
}
Symbol 318 MovieClip [__Packages.com.mosesSupposes.fuse.ZigoEngine] Frame 0
class com.mosesSupposes.fuse.ZigoEngine
{
static var extensions, updateTime, tweenHolder, instance, _listeners, broadcastMessage, updateIntId;
function ZigoEngine () {
}
static function addListener(handler) {
AsBroadcaster.initialize(com.mosesSupposes.fuse.ZigoEngine);
addListener(handler);
}
static function removeListener(handler) {
}
static function isPlaying() {
return(_playing);
}
static function simpleSetup(shortcutsClass) {
if (arguments.length > 0) {
register.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
}
_global.ZigoEngine = com.mosesSupposes.fuse.ZigoEngine;
if (extensions.fuse != undefined) {
_global.Fuse = extensions.fuse;
}
if (extensions.fuseFMP != undefined) {
extensions.fuseFMP.simpleSetup();
}
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
if (extensions.shortcuts == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("001");
}
}
static function register(classReference) {
if (extensions == undefined) {
extensions = {};
}
var _local3 = "|fuse|fuseItem|fuseFMP|shortcuts|pennerEasing|customEasing|";
for (var _local4 in arguments) {
var _local2 = arguments[_local4].registryKey;
if ((extensions[_local2] == undefined) && (_local3.indexOf(("|" + _local2) + "|") > -1)) {
extensions[_local2] = arguments[_local4];
if ((_local2 == "fuseFMP") || (_local2 == "shortcuts")) {
Object(extensions[_local2]).initialize();
}
}
}
}
static function initialize(target) {
if (arguments.length > 0) {
initializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.addShortcutsTo.apply(extensions.shortcuts, arguments);
}
}
}
static function deinitialize(target) {
if ((arguments.length == 0) || (target == null)) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
deinitializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.removeShortcutsFrom.apply(extensions.shortcuts, arguments);
}
}
static function getUpdateInterval() {
return(updateTime);
}
static function setUpdateInterval(time) {
if (_playing) {
setup(true);
updateTime = time;
setup();
} else {
updateTime = time;
}
}
static function getControllerDepth() {
return(tweenHolder.getDepth());
}
static function setControllerDepth(depth) {
if ((depth == null) || (_global.isNaN(depth) == true)) {
depth = 6789;
}
if (Object(tweenHolder).proof != null) {
tweenHolder.swapDepths(depth);
} else {
tweenHolder = _root.createEmptyMovieClip("ZigoEnginePulse", depth);
}
}
static function doShortcut(targets, methodName) {
if (extensions.shortcuts == undefined) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("002");
}
return(null);
}
return(extensions.shortcuts.doShortcut.apply(extensions.shortcuts, arguments));
}
static function doTween(targets, props, endvals, seconds, ease, delay, callback) {
if (extensions.fuse.addBuildItem(arguments) == true) {
return(null);
}
if (TIME_MULTIPLIER != prevTimeMult) {
TIME_MULTIPLIER = Math.abs(TIME_MULTIPLIER);
if (_global.isNaN(TIME_MULTIPLIER) == true) {
TIME_MULTIPLIER = 1;
}
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("016", TIME_MULTIPLIER);
}
prevTimeMult = TIME_MULTIPLIER;
}
if ((instance == undefined) || ((Object(tweenHolder).proof == undefined) && (updateTime == undefined))) {
if ((MovieClip.prototype.tween != null) && (typeof(_global.$tweenManager) == "object")) {
com.mosesSupposes.fuse.FuseKitCommon.error("003");
}
instance = new com.mosesSupposes.fuse.ZManager();
_playing = false;
}
var _local4 = instance.paramsObj(targets, props, endvals, true);
var _local7 = (((_local4.tg[0] == null) || (_local4.tg.length == 0)) ? undefined : (_local4.tg));
if (((_local4.pa == undefined) || (_local7 == undefined)) || (arguments.length < 3)) {
if (((extensions.fuseItem != null) && (arguments.length == 1)) && (typeof(arguments[0]) == "object")) {
return(extensions.fuseItem.doTween(arguments[0]));
}
if (OUTPUT_LEVEL > 0) {
if (arguments.length < 3) {
com.mosesSupposes.fuse.FuseKitCommon.error("004", (((arguments.length == 1) && (arguments[0] == null)) ? "1 (null)" : (String(arguments.length))), Boolean(extensions.fuseItem == null));
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("005", _local7.toString(), _local4.pa.toString());
}
}
return(null);
}
if (_playing != true) {
setup();
}
if ((seconds == null) || (_global.isNaN(seconds) == true)) {
seconds = DURATION || 1;
} else if (seconds < 0.01) {
seconds = 0;
}
seconds = seconds * TIME_MULTIPLIER;
if (((delay < 0.01) || (delay == null)) || (_global.isNaN(delay) == true)) {
delay = 0;
}
delay = delay * TIME_MULTIPLIER;
var _local12 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(callback, _local7, OUTPUT_LEVEL, true);
var _local9;
if (typeof(ease) == "function") {
if (typeof(Function(ease).call(null, 1, 1, 1, 1)) == "number") {
_local9 = Function(ease);
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("014", ease);
}
} else if ((ease == null) || (ease == "")) {
if (EASING instanceof Function) {
_local9 = Function(EASING);
} else if (extensions.pennerEasing != undefined) {
ease = EASING;
}
}
if ((typeof(ease) == "string") && (ease != "")) {
if (extensions.pennerEasing[ease] != undefined) {
_local9 = extensions.pennerEasing[ease];
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("006", ease);
}
} else if (ease instanceof Array) {
if (extensions.customEasing != undefined) {
_local12.extra1 = ease;
if (typeof(ease[0]) == "number") {
_local9 = extensions.customEasing.precalced;
} else {
_local9 = extensions.customEasing.fromCurve;
}
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("015", ease);
}
}
if (typeof(_local9) != "function") {
_local9 = function (t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
};
}
if (_listeners.length > 0) {
broadcastMessage("onTweenAdd", _local7, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
}
var _local6 = "";
for (var _local13 in _local7) {
var _local3 = _local7[_local13];
if (_local3.__zigoID__ == null) {
initializeTargets(_local3);
} else if (instance.getStatus("locked", _local3) == true) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("007", ((_local3._name != undefined) ? (_local3._name) : (_local3.toString())), _local4.pa.toString());
}
continue;
}
var _local5 = instance.addTween(_local3, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
_local6 = ((_local5 == null) ? "|" : (_local5 + "|")) + _local6;
}
_local6 = _local6.slice(0, -1);
return((((_local6 == "") || (_local6 == "|")) ? null : (_local6)));
}
static function removeTween(targs, props) {
instance.removeTween(targs, props);
}
static function isTweening(targ, prop) {
return(Boolean(instance.getStatus("active", targ, prop)));
}
static function getTweens(targ) {
if (instance == undefined) {
return(0);
}
return(Number(instance.getStatus("count", targ)));
}
static function lockTween(targ, setLocked) {
instance.alterTweens("lock", targ, setLocked == true);
}
static function isTweenLocked(targ) {
return(Boolean(instance.getStatus("locked", targ)));
}
static function ffTween(targs, props, suppressEndEvents) {
instance.alterTweens("ff", targs, props, null, suppressEndEvents);
}
static function skipTweenTo(seconds, targs, props) {
instance.alterTweens("skipTo", targs, props, false, false, seconds);
}
static function rewTween(targs, props, pauseFlag, suppressStartEvents) {
instance.alterTweens("rewind", targs, props, pauseFlag, suppressStartEvents);
}
static function isTweenPaused(targ, prop) {
return(Boolean(instance.getStatus("paused", targ, prop)));
}
static function pauseTween(targs, props) {
instance.alterTweens("pause", targs, props);
}
static function unpauseTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function resumeTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function setColorByKey(targetObj, type, amt, rgb) {
new Color(targetObj).setTransform(getColorTransObj(type, amt, rgb));
}
static function getColorTransObj(type, amt, rgb) {
switch (type) {
case "brightness" :
var _local3 = 100 - Math.abs(amt);
var _local4 = ((amt > 0) ? (255 * (amt / 100)) : 0);
return({ra:_local3, rb:_local4, ga:_local3, gb:_local4, ba:_local3, bb:_local4});
case "brightOffset" :
return({ra:100, rb:255 * (amt / 100), ga:100, gb:255 * (amt / 100), ba:100, bb:255 * (amt / 100)});
case "contrast" :
return({ra:amt, rb:128 - (1.28 * amt), ga:amt, gb:128 - (1.28 * amt), ba:amt, bb:128 - (1.28 * amt)});
case "invertColor" :
return({ra:100 - (2 * amt), rb:amt * 2.55, ga:100 - (2 * amt), gb:amt * 2.55, ba:100 - (2 * amt), bb:amt * 2.55});
case "tint" :
if (rgb == null) {
break;
}
var _local5;
if (typeof(rgb) == "string") {
if (rgb.charAt(0) == "#") {
rgb = rgb.slice(1);
}
rgb = ((rgb.charAt(1).toLowerCase() != "x") ? ("0x" + rgb) : (rgb));
}
_local5 = Number(rgb);
return({ra:100 - amt, rb:(_local5 >> 16) * (amt / 100), ga:100 - amt, gb:((_local5 >> 8) & 255) * (amt / 100), ba:100 - amt, bb:(_local5 & 255) * (amt / 100)});
}
return({rb:0, ra:100, gb:0, ga:100, bb:0, ba:100});
}
static function getColorKeysObj(targOrTransObj) {
var _local1 = ((targOrTransObj.ra != undefined) ? (targOrTransObj) : (new Color(targOrTransObj).getTransform()));
var _local3 = {};
var _local7 = (_local1.ra == _local1.ga) && (_local1.ga == _local1.ba);
var _local9 = (_local1.rb == _local1.gb) && (_local1.gb == _local1.bb);
var _local5 = ((_local7 == true) ? (100 - _local1.ra) : 0);
if (_local5 != 0) {
var _local6 = 100 / _local5;
_local3.tint = (((_local1.rb * _local6) << 16) | ((_local1.gb * _local6) << 8)) | (_local1.bb * _local6);
_local3.tintPercent = _local5;
var _local2 = _local3.tint.toString(16);
var _local4 = 6 - _local2.length;
while ((_local4--) > 0) {
_local2 = "0" + _local2;
}
_local3.tintString = "0x" + _local2.toUpperCase();
}
if ((_local7 == true) && (_local9 == true)) {
if (_local1.ra < 0) {
_local3.invertColor = _local1.rb * 0.392156862745098;
} else if ((_local1.ra == 100) && (_local1.rb != 0)) {
_local3.brightOffset = _local1.rb * 0.392156862745098;
}
if (_local1.ra != 100) {
if ((_local1.rb == 0) || ((_local1.rb != 0) && (((255 * ((100 - _local1.ra) / 100)) - _local1.rb) <= 1))) {
_local3.brightness = ((_local1.rb != 0) ? (100 - _local1.ra) : (_local1.ra - 100));
}
if (((128 - (1.28 * _local1.ra)) - _local1.rb) <= 1) {
_local3.contrast = _local1.ra;
}
}
}
return(_local3);
}
static function initializeTargets() {
for (var _local5 in arguments) {
var _local4 = arguments[_local5];
if ((((_local4 == MovieClip.prototype) || (_local4 == Button.prototype)) || (_local4 == TextField.prototype)) || (_local4 == Object.prototype)) {
if (_local4.oldAddListener == undefined) {
if (_local4 == TextField.prototype) {
_local4.oldAddListener = _local4.addListener;
_global.ASSetPropFlags(_local4, "oldAddListener", 7, 1);
}
_local4.addListener = function (o) {
if (this.__zigoID__ == undefined) {
com.mosesSupposes.fuse.ZigoEngine.initializeTargets(this);
}
if (this instanceof TextField) {
Function(this.oldAddListener).call(this, o);
} else {
this.addListener(o);
}
};
if (_local4 == MovieClip.prototype) {
_global.ASSetPropFlags(_local4, "addListener", 7, 1);
}
}
} else if (_local4.__zigoID__ == undefined) {
_local4.__zigoID__ = zigoIDs;
_global.ASSetPropFlags(_local4, "__zigoID__", 7, 1);
zigoIDs++;
if ((_local4._listeners == null) || (_local4.addListener == null)) {
AsBroadcaster.initialize(_local4);
}
}
}
}
static function deinitializeTargets() {
for (var _local4 in arguments) {
var _local3 = arguments[_local4];
if (_local3.__zigoID__ != undefined) {
_global.ASSetPropFlags(_local3, "__zigoID__,_listeners,broadcastMessage,addListener,removeListener", 0, 2);
delete _local3.__zigoID__;
delete _local3._listeners;
delete _local3.broadcastMessage;
delete _local3.addListener;
delete _local3.removeListener;
}
if (_local3.oldAddListener != undefined) {
_global.ASSetPropFlags(_local3, "oldAddListener", 0, 2);
_local3.addListener = _local3.oldAddListener;
delete _local3.oldAddListener;
}
}
}
static function __mgrRelay(inst, method, args) {
if (inst == instance) {
Function(com.mosesSupposes.fuse.ZigoEngine[method]).apply(com.mosesSupposes.fuse.ZigoEngine, args);
}
}
static function setup(deinitFlag) {
if (deinitFlag == true) {
_playing = false;
clearInterval(updateIntId);
delete tweenHolder.onEnterFrame;
return(undefined);
}
instance.cleanUp();
clearInterval(updateIntId);
delete updateIntId;
if ((updateTime != null) && (updateTime > 0)) {
updateIntId = setInterval(instance, "update", updateTime);
} else {
if (Object(tweenHolder).proof == null) {
setControllerDepth(6789);
Object(tweenHolder).proof = 1;
}
var _inst = instance;
tweenHolder.onEnterFrame = function () {
_inst.update.call(_inst);
};
}
_playing = true;
instance.now = getTimer();
}
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION + ", ZigoEngine based on concepts by L.Zigo";
static var EASING = "easeOutQuint";
static var DURATION = 1;
static var TIME_MULTIPLIER = 1;
static var ROUND_RESULTS = false;
static var OUTPUT_LEVEL = 1;
static var AUTOSTOP = false;
static var SKIP_LEVEL = 0;
static var _playing = false;
static var zigoIDs = 0;
static var prevTimeMult = 1;
}
Symbol 319 MovieClip [__Packages.com.mosesSupposes.fuse.ZManager] Frame 0
class com.mosesSupposes.fuse.ZManager
{
var tweens, now;
function ZManager () {
tweens = {};
numTweens = 0;
}
function addTween(obj, props, endvals, seconds, ease, delay, callback) {
var _local24 = ((callback.skipLevel == undefined) ? 0 : (callback.skipLevel));
var _local44 = ((callback.cycles == undefined) ? 1 : (callback.cycles));
var _local30 = callback.extra1;
var _local29 = callback.extra2;
var _local23 = [];
var _local14 = _global.com.mosesSupposes.fuse.FuseFMP;
var _local43 = String(("|" + _local14.getAllShortcuts().join("|")) + "|");
var _local42 = com.mosesSupposes.fuse.FuseKitCommon._cts();
var _local25 = "";
var _local28 = "";
var _local22 = obj.__zigoID__;
var _local7 = tweens[String(_local22)];
if ((_local7 != undefined) && (com.mosesSupposes.fuse.ZigoEngine.AUTOSTOP == true)) {
if (obj._listeners.length > 0) {
for (var _local40 in _local7.props) {
_local23.unshift(_local40);
}
}
_local7.numProps = 0;
cleanUp(true);
}
for (var _local47 in props) {
var _local5 = props[_local47];
var _local4 = endvals[_local47];
var _local15 = 0;
if (_local5 == "_fade") {
_local5 = "_alpha";
_local15 = ((_local4 < 50) ? -1 : 1);
}
var _local16 = _local42.indexOf(("|" + _local5) + "|") > -1;
var _local18 = _local7.colorProp;
if (_local7 != undefined) {
if ((_local16 == true) && (_local18 != undefined)) {
_local23.unshift(_local18);
delete _local7.props[_local18];
delete _local7.colorProp;
_local7.numProps--;
} else if (_local7.props[_local5] != undefined) {
_local23.unshift(_local5);
delete _local7[_local5];
_local7.numProps--;
}
}
var _local3 = {c:-1, fmp:-1, complex:-1};
var _local11 = ((_local24 == 0) && ((seconds + delay) == 0)) || ((_local24 > 0) && (seconds == 0));
var _local10 = false;
var _local13 = (_local14 != undefined) && (_local43.indexOf(("|" + _local5) + "|") > -1);
var _local19 = (_local5.toLowerCase().indexOf("colors") > -1) && (_local4 instanceof Array);
var _local27 = ((_local13 == true) && (_local5.indexOf("lor") > -1)) && (_local5.charAt(2) != "l");
if (_local13 == true) {
_local3.fmp = _local14;
_local3.ps = _local14.getFilterProp(obj, _local5, true);
_local3.special = true;
}
if (((_local16 == true) || (_local19 == true)) || (_local27 && (_local11 == false))) {
_local3.complex = 1;
if (_local16 == true) {
_local3.c = new Color(obj);
_local3.ps = Color(_local3.c).getTransform();
var _local17 = ((((_local5 == "_tint") || (_local5 == "_tintPercent")) || (_local5 == "_colorReset")) ? "tint" : (_local5.slice(1)));
var _local9 = null;
var _local12 = null;
if (_local5 != "_colorTransform") {
if (_local17 == "tint") {
if (typeof(_local4) == "object") {
_local12 = _local4.tint;
_local9 = ((_global.isNaN(_local4.percent) == true) ? 100 : (_local4.percent));
} else if ((_local5 == "_tintPercent") || (_local5 == "_colorReset")) {
var _local20 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tintPercent;
if (_local5 == "_colorReset") {
_local9 = Math.min(_local20, 100 - Math.abs(Number(_local4)));
} else {
_local9 = ((typeof(_local4) == "string") ? ((_local20 || 0) + Number(_local4)) : Number(_local4));
}
_local9 = Math.max(0, Math.min(_local9, 100));
_local12 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tint || 0;
} else {
_local12 = _local4;
_local9 = 100;
}
} else {
_local9 = ((typeof(_local4) == "string") ? ((com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj)[_local17] || 0) + Number(_local4)) : (_local4));
}
_local4 = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj(_local17, _local9, _local12);
}
if (_local11 == true) {
if (_local5 == "_colorTransform") {
Color(_local3.c).setTransform(_local4);
} else {
com.mosesSupposes.fuse.ZigoEngine.setColorByKey(obj, _local17, _local9, _local12);
}
} else {
var _local21 = getChangeObj(_local3.ps, _local4, false, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local11 == true) {
_local14.setFilterProp(obj, _local5, _local4);
} else if (_local19 == true) {
_local3.c = 2;
_local3.ch = [];
for (var _local40 in _local4) {
if (_local4[_local40] != null) {
if (_local3.ps == null) {
_local3.ps = [];
}
_local3.ps[_local40] = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, ((_local3.ps[_local40] == null) ? obj[_local5][_local40] : _local3.ps[_local40]));
var _local21 = getChangeObj(_local3.ps[_local40], com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4[_local40]), true, false);
_local3.ch[_local40] = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
}
} else {
_local3.c = 1;
_local3.ps = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local3.ps);
var _local21 = getChangeObj(_local3.ps, com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4), true, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local5 == "_bezier_") {
removeTween(obj, "_x,_y", true);
if (_local11 == true) {
if ((_local4.x != null) && (_global.isNaN(Number(_local4.x)) == false)) {
obj._x = ((typeof(_local4.x) == "string") ? (obj._x + Number(_local4.x)) : (_local4.x));
}
if ((_local4.y != null) && (_global.isNaN(Number(_local4.y)) == false)) {
obj._y = ((typeof(_local4.y) == "string") ? (obj._y + Number(_local4.y)) : (_local4.y));
}
} else {
_local3.special = true;
_local3.ps = 0;
_local3.ch = 1;
_local3.bz = {sx:obj._x, sy:obj._y};
if ((_local4.x == null) || (_global.isNaN(Number(_local4.x)))) {
_local4.x = _local3.bz.sx;
}
if ((_local4.y == null) || (_global.isNaN(Number(_local4.y)))) {
_local4.y = _local3.bz.sy;
}
_local3.bz.chx = ((typeof(_local4.x) == "string") ? (Number(_local4.x)) : (_local4.x - _local3.bz.sx));
if (_global.isNaN(_local3.bz.chx) == true) {
_local3.bx.chx = 0;
}
_local3.bz.chy = ((typeof(_local4.y) == "string") ? (Number(_local4.y)) : (_local4.y - _local3.bz.sy));
if (_global.isNaN(_local3.bz.chy) == true) {
_local3.bx.chy = 0;
}
if ((_local4.controlX == null) || (_global.isNaN(Number(_local4.controlX)))) {
_local3.bz.ctrlx = _local3.bz.sx + (_local3.bz.chx / 2);
} else {
_local3.bz.ctrlx = ((typeof(_local4.controlX) == "string") ? (_local3.bz.sx + Number(_local4.controlX)) : (_local4.controlX));
}
if ((_local4.controlY == null) || (_global.isNaN(Number(_local4.controlY)))) {
_local3.bz.ctrly = _local3.bz.sy + (_local3.bz.chy / 2);
} else {
_local3.bz.ctrly = ((typeof(_local4.controlY) == "string") ? (_local3.bz.sy + Number(_local4.controlY)) : (_local4.controlY));
}
_local3.bz.ctrlx = _local3.bz.ctrlx - _local3.bz.sx;
_local3.bz.ctrly = _local3.bz.ctrly - _local3.bz.sy;
_local10 = (_local3.bz.chx + _local3.bz.chy) != 0;
}
} else {
if (typeof(_local4) == "object") {
_local3.complex = ((_local4 instanceof Array) ? 0 : 1);
}
if ((_local5 == "_x") || (_local5 == "_y")) {
removeTween(obj, "_bezier_", true);
}
if ((_local5 == "_frame") && (typeof(obj) == "movieclip")) {
_local3.ps = obj._currentframe;
_local3.special = true;
} else if (_local13 == false) {
if (_local3.complex > -1) {
_local3.ps = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local40 in _local4) {
_local3.ps[_local40] = obj[_local5][_local40];
}
} else {
_local3.ps = obj[_local5];
}
}
if (_local11 == true) {
if (_local13 == true) {
_local14.setFilterProp(obj, _local5, ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4)));
} else if (_local3.complex > -1) {
for (var _local40 in _local4) {
if ((_local4[_local40] != null) && (_global.isNaN(Number(_local4[_local40])) == false)) {
obj[_local5][_local40] = ((typeof(_local4[_local40]) == "string") ? (_local3.ps[_local40] + Number(_local4[_local40])) : _local4[_local40]);
if (_global.isNaN(obj[_local5][_local40]) == true) {
obj[_local5][_local40] = 0;
}
}
}
} else {
obj[_local5] = ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4));
if (_local15 == 1) {
obj._visible = true;
} else if (_local15 == -1) {
obj._visible = false;
}
}
} else if (_local3.complex > -1) {
var _local21 = getChangeObj(_local3.ps, _local4, _local13, _local3.complex == 0);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
} else {
if ((_local4 == null) || (_global.isNaN(Number(_local4)))) {
_local4 = _local3.ps;
}
_local3.ch = ((typeof(_local4) == "string") ? (Number(_local4)) : (Number(_local4) - _local3.ps));
if (_global.isNaN(_local3.ch) == true) {
_local3.ch = 0;
}
_local10 = _local3.ch != 0;
}
}
if (((_local24 == 0) && ((_local10 == true) || (_local11 == false))) || ((_local10 == true) && (_local11 == false))) {
if ((_local3.complex > -1) && (!(_local3.c === 2))) {
_local3.ps = [_local3.ps];
_local3.ch = [_local3.ch];
}
_local3.ts = now + (delay * 1000);
_local3.pt = -1;
_local3.d = seconds * 1000;
_local3.ef = ease;
_local3.sf = false;
_local3.cycles = _local44;
if (_local30 != undefined) {
_local3.e1 = _local30;
}
if (_local29 != undefined) {
_local3.e2 = _local29;
}
_local3.v = _local15;
if (callback.start != undefined) {
_local3.scb = callback.start;
}
if (callback.upd != undefined) {
_local3.ucb = callback.upd;
}
if (callback.end != undefined) {
_local3.ecb = callback.end;
}
if (callback.roundResults != undefined) {
_local3.rr = callback.roundResults;
}
if (tweens[String(_local22)] == undefined) {
_local7 = (tweens[String(_local22)] = {numProps:0, locked:false, targ:obj, targID:String(("\"" + ((obj._name != undefined) ? (obj._name) : (obj.toString()))) + "\""), targZID:_local22, props:{}});
numTweens++;
}
if (_local16 == true) {
_local7.colorProp = _local5;
}
_local7.props[_local5] = _local3;
_local7.numProps++;
_local25 = (_local5 + ",") + _local25;
_local28 = (((typeof(_local4) == "string") ? (("\"" + _local4) + "\"") : (_local4)) + ",") + _local28;
}
_local3 = undefined;
}
if ((_local7 == undefined) || (_local7.numProps <= 0)) {
cleanUp();
}
if ((_local23.length > 0) && (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)) {
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:obj, props:_local23, __zigoID__:_local22, during:"add"});
}
if (_local25 == "") {
if (_local24 == 2) {
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("011", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString());
}
} else {
var _local48 = obj._listeners.length > 0;
if (_local48 == true) {
obj.broadcastMessage("onTweenStart", {target:obj, props:props});
}
if (callback.start != undefined) {
callback.start.f.apply(callback.start.s, callback.start.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenUpdate", {target:obj, props:props});
}
if (callback.upd != undefined) {
callback.upd.f.apply(callback.upd.s, callback.upd.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenEnd", {target:obj, props:props});
}
if (callback.end != undefined) {
callback.end.f.apply(callback.end.s, callback.end.a);
}
}
cleanUp();
}
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
if (_local25 == "") {
com.mosesSupposes.fuse.FuseKitCommon.error("012", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString(), endvals.toString());
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("013", ((obj._name != undefined) ? (obj._name) : (obj.toString())), _local25.slice(0, -1), _local28.slice(0, -1));
}
}
return(((_local25 == "") ? null : (_local25.slice(0, -1))));
}
function removeTween(targs, props, noInit) {
var _local4 = {};
var _local12 = paramsObj(targs, props);
if (_local12.none == true) {
return(undefined);
}
var _local16 = _local12.all;
var _local17 = _local12.allprops;
var _local9 = ((_local16 == true) ? (tweens) : (Object(_local12.tg)));
var _local8 = false;
for (var _local20 in _local9) {
var _local3 = ((_local16 == true) ? (_local20) : (String(_local9[_local20].__zigoID__)));
var _local2 = tweens[_local3];
var _local6 = ((_local17 == true) ? (_local2.props) : (_local12.props));
for (var _local14 in _local6) {
var _local5 = (_local14 == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) && (_local2.colorProp != undefined);
if ((_local2.props[_local14] != undefined) || (_local5 == true)) {
if (_local4[_local3] == null) {
_local4[_local3] = [];
}
_local4[_local3].unshift(_local14);
if ((_local14 == _local2.colorProp) || (_local5 == true)) {
delete _local2.props[_local2.colorProp];
delete _local2.colorProp;
} else {
delete _local2.props[_local14];
}
_local2.numProps--;
if (_local2.numProps <= 0) {
_local8 = true;
break;
}
}
}
}
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
for (var _local19 in _local4) {
var _local7 = tweens[_local19].targ;
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local7.addProperty) == "function") ? (_local7) : (("[MISSING(\"" + tweens[_local19].targID) + "\")]")), props:_local4[_local19], __zigoID__:tweens[_local19].targZID, during:((noInit == true) ? "add" : "remove")});
}
}
if (_local8 == true) {
cleanUp(noInit);
}
}
function alterTweens(type, targs, props, pauseFlag, noEvents, skipTo) {
if (type == "lock") {
tweens[String(targs.__zigoID__)].locked = props;
return(undefined);
}
var _local11 = paramsObj(targs, props);
if (_local11.none == true) {
return(undefined);
}
var _local14 = _local11.all;
var _local15 = _local11.allprops;
var _local9 = ((_local14 == true) ? (tweens) : (Object(_local11.tg)));
var _local8 = 0;
for (var _local16 in _local9) {
var _local7 = ((_local14 == true) ? (_local16) : (String(_local9[_local16].__zigoID__)));
var _local5 = tweens[_local7];
var _local4 = ((_local15 == true) ? (_local5.props) : (_local11.props));
if (_local4.ALLCOLOR == true) {
_local4[_local5.colorProp] = true;
delete _local4.ALLCOLOR;
}
for (var _local10 in _local4) {
_local8++;
var _local2 = _local5.props[_local10];
if (type == "rewind") {
if (pauseFlag == true) {
_local2.pt = now;
}
_local2.ts = now;
if (noEvents != true) {
_local2.sf = false;
if (_local2.scb != undefined) {
_local2.scb.fired = false;
}
}
} else if (type == "ff") {
if (noEvents == true) {
_local2.suppressEnd = true;
}
_local2.o = true;
_local2.pt = -1;
_local2.ts = now - _local2.d;
} else if (type == "skipTo") {
_local2.ts = Math.min(now, (_local2.ts + (now - _local2.ts)) - (skipTo * 1000));
} else if (type == "pause") {
if (_local2.pt == -1) {
_local2.pt = now;
}
} else if (type == "unpause") {
if (_local2.pt != -1) {
_local2.ts = now - (_local2.pt - _local2.ts);
_local2.pt = -1;
}
}
}
}
if ((type == "ff") && (_local8 > 0)) {
update();
} else if ((type == "rewind") && (_local8 > 0)) {
update(true);
}
}
function getStatus(type, targ, param) {
if (targ == null) {
return(null);
}
var _local8 = String(targ).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
var _local4 = tweens[String(targ.__zigoID__)];
switch (type) {
case "paused" :
var _local2 = _local4.props;
if (param != null) {
if (_local2[String(param)] == undefined) {
return(false);
}
return(Boolean(_local2[String(param)].pt != -1));
}
for (var _local6 in _local2) {
if (_local2[_local6].pt != -1) {
return(true);
}
}
return(false);
case "active" :
if (param == null) {
return(Boolean(_local4 != undefined));
}
if (String(param).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
return(Boolean(_local4.colorProp != undefined));
}
return(Boolean(_local4.props[String(param)] != undefined));
case "count" :
if (!_local8) {
return(_local4.numProps);
}
var _local3 = 0;
for (var _local6 in tweens) {
_local3 = _local3 + tweens[_local6].numProps;
}
return(_local3);
case "locked" :
return(_local4.locked);
}
}
function update(force) {
var _local22 = {};
var _local24 = {};
var _local23 = {};
var _local15 = {};
var _local13 = {};
var _local14 = {};
var _local26 = false;
var _local20 = com.mosesSupposes.fuse.ZigoEngine.ROUND_RESULTS;
for (var _local35 in tweens) {
var _local12 = tweens[_local35];
var _local5 = _local12.targ;
var _local34 = _local12.props;
var _local21 = _local5._listeners.length > 0;
if (_local5.__zigoID__ == undefined) {
_local26 = true;
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
var _local25 = [];
for (var _local30 in _local34) {
_local25.unshift(_local30);
}
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local5.addProperty) == "function") ? (_local5) : (("[MISSING:" + _local12.targID) + "]")), props:_local25, __zigoID__:_local12.targZID, during:"update"});
}
continue;
}
for (var _local30 in _local34) {
var _local3 = _local34[_local30];
if (((_local3.ts > now) || (_local3.pt != -1)) && (force != true)) {
continue;
}
var _local9 = now >= (_local3.ts + _local3.d);
if (_local3.complex == -1) {
var _local6;
if (_local9 == true) {
_local6 = _local3.ps + _local3.ch;
if ((_local3.cycles > 1) || (_local3.cycles == 0)) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local3.ps = _local6;
_local3.ch = -_local3.ch;
_local3.ts = now;
_local9 = false;
}
} else {
_local6 = _local3.ef(now - _local3.ts, _local3.ps, _local3.ch, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local6) == false) {
if ((_local30 != "_bezier_") && ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false))))) {
_local6 = Math.round(Number(_local6));
}
if (_local3.special != true) {
_local5[_local30] = _local6;
} else if (_local3.fmp != -1) {
_local3.fmp.setFilterProp(_local5, _local30, _local6);
} else if (_local30 == "_bezier_") {
var _local10 = _local3.bz;
var _local18 = _local10.sx + (_local6 * (((2 * (1 - _local6)) * _local10.ctrlx) + (_local6 * _local10.chx)));
var _local17 = _local10.sy + (_local6 * (((2 * (1 - _local6)) * _local10.ctrly) + (_local6 * _local10.chy)));
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local18 = Math.round(Number(_local18));
_local17 = Math.round(Number(_local17));
}
_local5._x = _local18;
_local5._y = _local17;
} else if (_local30 == "_frame") {
MovieClip(_local5).gotoAndStop(Math.ceil(_local6));
}
}
} else {
var _local16 = (_local9 == true) && ((_local3.cycles > 1) || (_local3.cycles == 0));
var _local7 = [];
for (var _local27 in _local3.ch) {
var _local4 = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local28 in _local3.ch[_local27]) {
var _local8 = _local3.ch[_local27][_local28];
var _local11 = _local3.ps[_local27][_local28];
if (_local9 == true) {
_local4[_local28] = _local11 + _local8;
if (_local16 == true) {
_local3.ch[_local27][_local28] = -_local8;
}
} else {
_local4[_local28] = _local3.ef(now - _local3.ts, _local11, _local8, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local4[_local28]) == false) {
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local4[_local28] = Math.round(_local4[_local28]);
}
}
if ((_local3.fmp == -1) && (_local3.c == -1)) {
_local5[_local30][_local28] = _local4[_local28];
}
}
_local7.push(_local4);
if ((_local3.fmp == -1) && (_local3.c == 2)) {
_local5[_local30][_local27] = Number(((_local4.rb << 16) | (_local4.gb << 8)) | _local4.bb);
}
}
if (_local3.fmp != -1) {
if (_local3.c == 1) {
_local3.fmp.setFilterProp(_local5, _local30, ((_local7[0].rb << 16) | (_local7[0].gb << 8)) | _local7[0].bb);
} else if (_local3.c == 2) {
var _local19 = [];
for (var _local28 in _local7) {
_local19.unshift(((_local7[_local28].rb << 16) | (_local7[_local28].gb << 8)) | _local7[_local28].bb);
}
_local3.fmp.setFilterProp(_local5, _local30, _local19);
}
} else if (_local3.c != -1) {
_local3.c.setTransform(_local7[0]);
}
if (_local16 == true) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local9 = false;
_local3.ts = now;
_local3.ps = _local7;
}
}
if (_local3.sf == false) {
if (_local3.v != 0) {
_local5._visible = true;
}
if (_local21 == true) {
if (_local15[_local35] == undefined) {
_local15[_local35] = [_local5, []];
}
_local15[_local35][1].unshift(_local30);
}
_local3.sf = true;
}
if (_local3.scb.fired == false) {
_local22[String(_local3.scb.id)] = _local3.scb;
_local3.scb.fired = true;
}
if (_local21 == true) {
if (_local13[_local35] == undefined) {
_local13[_local35] = [_local5, []];
}
_local13[_local35][1].unshift(_local30);
}
if (_local3.ucb != undefined) {
_local24[String(_local3.ucb.id)] = _local3.ucb;
}
if (_local9 == true) {
if (_local3.v === -1) {
_local5._visible = false;
}
if (_local3.suppressEnd != true) {
if (_local21 == true) {
if (_local14[_local35] == undefined) {
_local14[_local35] = [_local5, []];
}
_local14[_local35][1].unshift(_local30);
}
if (_local3.ecb != undefined) {
_local23[String(_local3.ecb.id)] = _local3.ecb;
}
}
delete _local34[_local30];
if (_local30 == _local12.colorProp) {
delete _local12.colorProp;
}
_local12.numProps--;
if (_local12.numProps <= 0) {
_local26 = true;
}
}
delete _local3.suppressEnd;
}
}
for (var _local35 in _local15) {
_local15[_local35][0].broadcastMessage("onTweenStart", {target:_local15[_local35][0], props:_local15[_local35][1]});
}
for (var _local35 in _local22) {
_local22[_local35].f.apply(_local22[_local35].s, _local22[_local35].a);
}
for (var _local35 in _local13) {
_local13[_local35][0].broadcastMessage("onTweenUpdate", {target:_local13[_local35][0], props:_local13[_local35][1]});
}
for (var _local35 in _local24) {
_local24[_local35].f.apply(_local24[_local35].s, _local24[_local35].a);
}
for (var _local35 in _local14) {
_local14[_local35][0].broadcastMessage("onTweenEnd", {target:_local14[_local35][0], props:_local14[_local35][1]});
}
for (var _local35 in _local23) {
_local23[_local35].f.apply(_local23[_local35].s, _local23[_local35].a);
}
if (_local26) {
cleanUp();
}
now = getTimer();
}
function cleanUp(noInit) {
for (var _local4 in tweens) {
var _local2 = tweens[_local4].targ;
if ((tweens[_local4].numProps <= 0) || (_local2.__zigoID__ == undefined)) {
if ((((_local2 != undefined) && (_local2.tween == undefined)) && (noInit != true)) && (_local2._listeners.length <= 0)) {
com.mosesSupposes.fuse.ZigoEngine.deinitializeTargets(_local2);
}
delete tweens[_local4];
numTweens--;
}
}
if (numTweens <= 0) {
numTweens = 0;
delete tweens;
tweens = {};
if (noInit != true) {
com.mosesSupposes.fuse.ZigoEngine.__mgrRelay(this, "setup", [true]);
}
}
}
function paramsObj(targs, props, endvals, retainFade) {
var _local6 = {};
_local6.all = String(targs).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
_local6.none = Boolean(targs == null);
if (_local6.all == true) {
_local6.tg = [null];
} else {
_local6.tg = ((targs instanceof Array) ? (targs) : ([targs]));
for (var _local11 in _local6.tg) {
var _local7 = _local6.tg[_local11];
if ((_local7 == null) || (!((typeof(_local7) == "object") || (typeof(_local7) == "movieclip")))) {
_local6.tg.splice(Number(_local11), 1);
}
}
}
_local6.allprops = props == null;
var _local1;
var _local4;
var _local3 = {};
if (_local6.allprops == false) {
if ((typeof(props) == "string") && ((String(props).indexOf(" ") > -1) || (String(props).indexOf(",") > -1))) {
props = String(props.split(" ").join("")).split(",");
}
_local1 = ((props instanceof Array) ? (props.slice()) : ([props]));
if (endvals != undefined) {
if ((typeof(endvals) == "string") && ((String(endvals).indexOf(" ") > -1) || (String(endvals).indexOf(",") > -1))) {
endvals = String(endvals.split(" ").join("")).split(",");
}
_local4 = ((endvals instanceof Array) ? (endvals.slice()) : ([endvals]));
while (_local4.length < _local1.length) {
_local4.push(_local4[_local4.length - 1]);
}
_local4.splice(_local1.length, _local4.length - _local1.length);
}
for (var _local11 in _local1) {
var _local2 = Number(_local11);
if ((_local1[_local11] != "_scale") && (_local1[_local11] != "_size")) {
if (_local3[_local1[_local11]] == undefined) {
if ((_local1[_local11] == "_fade") && (retainFade != true)) {
_local1[_local11] = "_alpha";
}
if (String(_local1[_local11]).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
_local1[_local11] = com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR;
}
_local3[_local1[_local11]] = true;
} else {
_local1.splice(_local2, 1);
_local4.splice(_local2, 1);
}
} else {
var _local8 = String(_local1.splice(_local2, 1)[0]);
var _local5 = _local4.splice(_local2, 1)[0];
if (_local8 == "_scale") {
if (_local3._xscale == undefined) {
_local1.splice(_local2, 0, "_xscale");
_local4.splice(_local2, 0, _local5);
_local3._xscale = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_yscale");
_local4.splice(_local2, 0, _local5);
_local3._yscale = true;
}
}
if (_local8 == "_size") {
if (_local3._width == undefined) {
_local1.splice(_local2, 0, "_width");
_local4.splice(_local2, 0, _local5);
_local3._width = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_height");
_local4.splice(_local2, 0, _local5);
_local3._height = true;
}
}
}
}
for (var _local11 in _local1) {
if (((_local1[_local11] == "_xscale") && (_local3._width == true)) || ((_local1[_local11] == "_yscale") && (_local3._height == true))) {
_local1.splice(Number(_local11), 1);
_local4.splice(Number(_local11), 1);
delete _local3[_local1[_local11]];
}
}
}
_local6.pa = _local1;
_local6.va = _local4;
_local6.props = _local3;
return(_local6);
}
function getChangeObj(ps, ep, isFMP, useArray) {
var _local3 = {map:((useArray == true) ? ([]) : ({})), changed:false};
for (var _local7 in ep) {
if ((((((isFMP == true) && (_local7.charAt(1) == "b")) || (ep[_local7] != ps[_local7])) || (useArray == true)) && (ep[_local7] != null)) && (_global.isNaN(Number(ep[_local7])) == false)) {
_local3.map[_local7] = ((typeof(ep[_local7]) == "string") ? (Number(ep[_local7])) : (ep[_local7] - ps[_local7]));
if (_global.isNaN(_local3.map[_local7]) == true) {
_local3.map[_local7] = 0;
} else if (_local3.map[_local7] != 0) {
_local3.changed = true;
}
}
}
return(_local3);
}
var numTweens = 0;
}
Symbol 320 MovieClip [__Packages.com.mosesSupposes.fuse.FuseFMP] Frame 0
class com.mosesSupposes.fuse.FuseFMP
{
static var _classes, _shortcuts, _getter, _setter;
function FuseFMP () {
}
static function simpleSetup() {
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
_global.FuseFMP = com.mosesSupposes.fuse.FuseFMP;
for (var _local2 in _classes) {
_global[_local2] = _classes[_local2];
}
}
static function initialize(target) {
if (_classes == undefined) {
_shortcuts = {getFilterName:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterName(f));
}, getFilterIndex:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterIndex(this, f));
}, getFilter:function (f, createNew) {
return(com.mosesSupposes.fuse.FuseFMP.getFilter(this, f, createNew));
}, writeFilter:function (f, pObj) {
return(com.mosesSupposes.fuse.FuseFMP.writeFilter(this, f, pObj));
}, removeFilter:function (f) {
return(com.mosesSupposes.fuse.FuseFMP.removeFilter(this, f));
}, getFilterProp:function (prop, createNew) {
return(com.mosesSupposes.fuse.FuseFMP.getFilterProp(this, prop, createNew));
}, setFilterProp:function (prop, v) {
com.mosesSupposes.fuse.FuseFMP.setFilterProp(this, prop, v);
}, setFilterProps:function (fOrPObj, pObj) {
com.mosesSupposes.fuse.FuseFMP.setFilterProps(this, fOrPObj, pObj);
}, traceAllFilters:function () {
com.mosesSupposes.fuse.FuseFMP.traceAllFilters();
}};
_classes = {BevelFilter:flash.filters.BevelFilter, BlurFilter:flash.filters.BlurFilter, ColorMatrixFilter:flash.filters.ColorMatrixFilter, ConvolutionFilter:flash.filters.ConvolutionFilter, DisplacementMapFilter:flash.filters.DisplacementMapFilter, DropShadowFilter:flash.filters.DropShadowFilter, GlowFilter:flash.filters.GlowFilter, GradientBevelFilter:flash.filters.GradientBevelFilter, GradientGlowFilter:flash.filters.GradientGlowFilter};
_getter = {__resolve:function (name) {
var _local4 = function () {
var _local3 = this;
if (_local3.filters != undefined) {
var _local2 = name.split("_");
if (_local2[1] == "blur") {
_local2[1] = "blurX";
}
return(com.mosesSupposes.fuse.FuseFMP.getFilter(this, _local2[0] + "Filter", false)[_local2[1]]);
}
};
return(_local4);
}};
_setter = {__resolve:function (name) {
var _local3 = function (val) {
var _local2 = this;
if (_local2.filters != undefined) {
com.mosesSupposes.fuse.FuseFMP.setFilterProp(this, name, val);
}
};
return(_local3);
}};
}
if (arguments[0] == null) {
return(undefined);
}
var _local6 = [MovieClip, Button, TextField];
for (var _local13 in arguments) {
var _local7 = false;
for (var _local10 in _local6) {
if ((arguments[_local13] instanceof _local6[_local10]) || (arguments[_local13] == Function(_local6[_local10]).prototype)) {
_local7 = true;
break;
}
}
if (!_local7) {
com.mosesSupposes.fuse.FuseKitCommon.error("201", _local13);
continue;
}
for (var _local11 in _classes) {
var _local5 = new _classes[_local11]();
for (var _local8 in _local5) {
if (typeof(_local5[_local8]) == "function") {
continue;
}
var _local4 = (_local11.substr(0, -6) + "_") + _local8;
arguments[_local13].addProperty(_local4, _getter[_local4], _setter[_local4]);
_global.ASSetPropFlags(arguments[_local13], _local4, 3, 1);
if (_local8 == "blurX") {
_local4 = _local4.slice(0, -1);
arguments[_local13].addProperty(_local4, _getter[_local4], _setter[_local4]);
_global.ASSetPropFlags(arguments[_local13], _local4, 3, 1);
}
}
}
for (var _local9 in _shortcuts) {
arguments[_local13][_local9] = _shortcuts[_local9];
_global.ASSetPropFlags(arguments[_local13], _local9, 7, 1);
}
}
}
static function deinitialize() {
if (_classes == undefined) {
return(undefined);
}
if (arguments.length == 0) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
for (var _local8 in arguments) {
for (var _local7 in _classes) {
var _local4 = new _classes[_local7]();
for (var _local5 in _local4) {
if (typeof(_local4[_local5]) == "function") {
continue;
}
var _local3 = (_local7.substr(0, -6) + "_") + _local5;
_global.ASSetPropFlags(arguments[_local8], _local3, 0, 2);
arguments[_local8].addProperty(_local3, null, null);
delete arguments[_local8][_local3];
}
}
for (var _local6 in _shortcuts) {
_global.ASSetPropFlags(arguments[_local8], _local6, 0, 2);
delete arguments[_local8][_local6];
}
}
}
static function getFilterName(instance) {
if (_classes == undefined) {
initialize(null);
}
for (var _local1 in _classes) {
if (instance.__proto__ == Function(_classes[_local1]).prototype) {
return(_local1);
}
}
return(null);
}
static function getFilterIndex(target, filter) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
if (filter === null) {
return(-1);
}
var _local2 = target.filters;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].__proto__ == filter.__proto__) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function getFilter(target, filter, createNew) {
var _local1 = getFilterIndex(target, filter);
if (_local1 == -1) {
if (createNew != true) {
return(null);
}
_local1 = writeFilter(target, filter);
if (_local1 == -1) {
return(null);
}
}
return(target.filters[_local1]);
}
static function writeFilter(target, filter, propsObj) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
if (filter === null) {
return(-1);
}
var _local4 = target.filters;
var _local2 = getFilterIndex(target, filter);
if (_local2 == -1) {
_local4.push(filter);
} else {
_local4[_local2] = filter;
}
target.filters = _local4;
if (typeof(propsObj) == "object") {
setFilterProps(target, filter, propsObj);
}
_local2 = getFilterIndex(target, filter);
return(_local2);
}
static function removeFilter(target, filter) {
if (_classes == undefined) {
initialize(null);
}
filter = getInstance(filter);
var _local2 = target.filters;
var _local1 = getFilterIndex(target, filter);
if (_local1 == -1) {
return(false);
}
_local2.splice(_local1, 1);
target.filters = _local2;
return(true);
}
static function getFilterProp(target, propname, createNew) {
var _local1 = propname.split("_");
if (_local1[1] == "blur") {
_local1[1] = "blurX";
}
return(getFilter(target, _local1[0] + "Filter", createNew)[_local1[1]]);
}
static function setFilterProp(target, propname, value) {
if (_classes == undefined) {
initialize(null);
}
var _local8 = propname.split("_");
var _local5 = _local8[0] + "Filter";
if (_classes[_local5] == undefined) {
return(undefined);
}
var _local2 = new _classes[_local5]();
if ((BLUR_ZERO == true) && (_local5 == "BlurFilter")) {
_local2.blurX = (_local2.blurY = 0);
}
var _local6 = _local8[1];
var _local1 = target.filters.length || 0;
while (_local1-- , _local1 > -1) {
if (target.filters[_local1].__proto__ == _local2.__proto__) {
_local2 = target.filters[_local1];
break;
}
}
if (_local2 == null) {
com.mosesSupposes.fuse.FuseKitCommon.error("202", _local5, target);
}
if (_local6 == "blur") {
_local2.blurX = value;
_local2.blurY = value;
} else {
if ((typeof(value) == "string") && (_local6.toLowerCase().indexOf("color") > -1)) {
if (value.charAt(0) == "#") {
value = value.slice(1);
}
value = ((value.charAt(1).toLowerCase() != "x") ? (Number("0x" + value)) : (Number(value)));
}
_local2[_local6] = value;
}
var _local7 = target.filters;
if (_local1 == -1) {
_local7.push(_local2);
} else {
_local7[_local1] = _local2;
}
target.filters = _local7;
}
static function setFilterProps(target, filterOrPropsObj, propsObj) {
if (arguments.length < 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("203", arguments.length);
return(undefined);
}
if (_classes == undefined) {
initialize(null);
}
var _local10 = new Object();
var _local11 = arguments.length == 2;
if (_local11 == false) {
var _local14 = getFilterName(getInstance(filterOrPropsObj));
if (_classes[_local14] == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("204", filterOrPropsObj);
return(undefined);
}
_local10[_local14] = 1;
} else {
propsObj = filterOrPropsObj;
for (var _local12 in propsObj) {
var _local14 = _local12.split("_")[0] + "Filter";
if ((_classes[_local14] != undefined) && (_local10[_local14] == undefined)) {
_local10[_local14] = 1;
}
}
}
if (!(target instanceof Array)) {
target = [target];
}
for (var _local15 in target) {
var _local5 = target[_local15];
for (var _local14 in _local10) {
var _local3 = new _classes[_local14]();
if ((BLUR_ZERO == true) && (_local14 == "BlurFilter")) {
_local3.blurX = (_local3.blurY = 0);
}
var _local4 = _local5.filters.length || 0;
while (_local4-- , _local4 > -1) {
if (_local5.filters[_local4].__proto__ == _local3.__proto__) {
_local3 = _local5.filters[_local4];
break;
}
}
if (_local3 == null) {
com.mosesSupposes.fuse.FuseKitCommon.error("202", _local14, _local5);
continue;
}
var _local7 = String(_local14).slice(0, -6) + "_";
for (var _local12 in propsObj) {
var _local6 = _local12.indexOf(_local7) == 0;
if ((_local11 == true) && (_local6 == false)) {
continue;
}
var _local2 = propsObj[_local12];
if (_local6 == true) {
var _local12 = _local12.slice(_local7.length);
}
if (_local12 == "blur") {
_local3.blurX = _local2;
_local3.blurY = _local2;
} else {
if ((typeof(_local2) == "string") && (_local12.toLowerCase().indexOf("color") > -1)) {
if (_local2.charAt(0) == "#") {
_local2 = _local2.slice(1);
}
_local2 = ((_local2.charAt(1).toLowerCase() != "x") ? (Number("0x" + _local2)) : (Number(_local2)));
}
_local3[_local12] = _local2;
}
}
var _local8 = _local5.filters;
if (_local4 == -1) {
_local8.push(_local3);
} else {
_local8[_local4] = _local3;
}
_local5.filters = _local8;
}
}
}
static function getAllShortcuts() {
if (_classes == undefined) {
initialize(null);
}
var _local2 = [];
for (var _local4 in _classes) {
var _local1 = new _classes[_local4]();
for (var _local3 in _local1) {
if (typeof(_local1[_local3]) == "function") {
continue;
}
_local2.push((_local4.substr(0, -6) + "_") + _local3);
if (_local3 == "blurX") {
_local2.push(_local4.substr(0, -6) + "_blur");
}
}
}
return(_local2);
}
static function traceAllFilters() {
if (_classes == undefined) {
initialize(null);
}
var _local1 = "------ FuseFMP filter properties ------\n";
for (var _local4 in _classes) {
_local1 = _local1 + _local4;
var _local2 = new _classes[_local4]();
for (var _local3 in _local2) {
if (typeof(_local2[_local3]) == "function") {
continue;
}
_local1 = _local1 + ((("\t- " + _local4.substr(0, -6)) + "_") + _local3);
if (_local3 == "blurX") {
_local1 = _local1 + (("\t- " + _local4.substr(0, -6)) + "_blur");
}
}
_local1 = _local1 + newline;
}
com.mosesSupposes.fuse.FuseKitCommon.output(_local1);
}
static function getInstance(filter) {
if (filter instanceof flash.filters.BitmapFilter) {
return(flash.filters.BitmapFilter(filter));
}
if (typeof(filter) == "function") {
for (var _local4 in _classes) {
if (filter == _classes[_local4]) {
var _local1 = new _classes[_local4]();
if ((BLUR_ZERO == true) && (_local4 == "BlurFilter")) {
_local1.blurX = (_local1.blurY = 0);
}
return(_local1);
}
}
}
if (typeof(filter) == "string") {
var _local3 = String(filter);
if (_local3.substr(-6) != "Filter") {
_local3 = _local3 + "Filter";
}
for (var _local4 in _classes) {
if (_local4 == _local3) {
var _local1 = new _classes[_local4]();
if ((BLUR_ZERO == true) && (_local4 == "BlurFilter")) {
_local1.blurX = (_local1.blurY = 0);
}
return(_local1);
}
}
}
return(null);
}
static var registryKey = "fuseFMP";
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION;
static var BLUR_ZERO = true;
}
Symbol 321 MovieClip [__Packages.com.mosesSupposes.fuse.PennerEasing] Frame 0
class com.mosesSupposes.fuse.PennerEasing
{
function PennerEasing () {
}
static function linear(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeInExpo(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOutExpo(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutInExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 1)) + b);
}
return(((c / 2) * (Math.pow(2, 10 * (t - 2)) + 1)) + b);
}
static function easeInElastic(t, b, c, d, a, p) {
var _local5;
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;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
static function easeOutElastic(t, b, c, d, a, p) {
var _local5;
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;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, a, p) {
var _local5;
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;
_local5 = p / 4;
} else {
_local5 = (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) - _local5) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutInElastic(t, b, c, d, a, p) {
var _local5;
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;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + (c / 2)) + b);
}
return(((c / 2) + (0.5 * ((a * Math.pow(2, 10 * (t - 2))) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)))) + b);
}
static function easeInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static function easeOutInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) - s)) + 1)) + b);
}
static function easeOutBounce(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeInBounce(t, b, c, d) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeInOutBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutInBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeOutBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeInBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeInCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutInCubic(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((t * t) * t) + 1)) + b);
}
static function easeInQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutInQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((((t * t) * t) * t) - 1)) + b);
}
t--;
return(((c / 2) * ((((t * t) * t) * t) + 1)) + b);
}
static function easeInQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(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 function easeOutInQuint(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutInSine(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.sin((Math.PI * t) / 2)) + b);
}
t--;
return((((-c) / 2) * (Math.cos((Math.PI * t) / 2) - 2)) + b);
}
static function easeInCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutInCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return(((c / 2) * Math.sqrt(1 - (t * t))) + b);
}
t--;
return(((c / 2) * (2 - Math.sqrt(1 - (t * t)))) + b);
}
static var registryKey = "pennerEasing";
}
Symbol 322 MovieClip [__Packages.com.mosesSupposes.fusefx.FuseFX] Frame 0
class com.mosesSupposes.fusefx.FuseFX
{
static var registryKeys, items;
function FuseFX () {
}
static function register(classReference) {
var _local9 = com.mosesSupposes.fuse.FuseKitCommon.VERSION.slice(com.mosesSupposes.fuse.FuseKitCommon.VERSION.indexOf("2"));
_local9 = _local9.slice(0, _local9.indexOf(" "));
var _local7 = _local9.split(".");
var _local4 = 0;
while (_local4 < requiredVersion.length) {
if ((_global.isNaN(Number(_local7[_local4])) == true) || ((_global.isNaN(Number(_local7[_local4])) == false) && (Number(_local7[_local4]) < requiredVersion[_local4]))) {
com.mosesSupposes.fuse.FuseKitCommon.output(((("\n** FuseFX ERROR: Fuse Kit Version " + requiredVersion.join(".")) + " or higher is required. (Version in this SWF is ") + _local9) + ") **\n");
return(undefined);
}
_local4++;
}
if (registryKeys == undefined) {
com.mosesSupposes.fuse.ZigoEngine.addListener(com.mosesSupposes.fusefx.FuseFX);
registryKeys = {};
}
for (var _local10 in arguments) {
var _local6 = Function(arguments[_local10]);
var _local8 = com.mosesSupposes.fusefx.IFuseFX(new _local6[undefined]());
var _local5 = _local8.defineProperties();
for (var _local10 in _local5) {
var _local3 = com.mosesSupposes.fusefx.FXProperty(_local5[_local10]);
if (registryKeys[_local3.key] != undefined) {
if (com.mosesSupposes.fusefx.FXProperty(registryKeys[_local3.key]).fxclass != _local6) {
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.output(("** Warning: Overlapping extension key: " + _local3.key) + " **");
}
}
}
registryKeys[_local3.key] = _local3;
}
}
}
static function getKeyList() {
var _local1 = [];
for (var _local2 in registryKeys) {
_local1.push(_local2);
}
_local1.sort();
return(_local1);
}
static function onTweenAdd(targets, props, endvals) {
for (var _local8 in props) {
var _local1 = String(props[_local8]);
if (_local1 == "__tweenedDelay") {
continue;
}
for (var _local6 in registryKeys) {
if ((_local6 == _local1) || (com.mosesSupposes.fusefx.FXProperty(registryKeys[_local6]).conflictLookup[_local1] == true)) {
for (var _local5 in targets) {
if (_local6 != _local1) {
var _local2 = String(targets[_local5].__zigoID__);
if (items[_local2][_local6] != undefined) {
removeItem(targets[_local5], _local2, _local6, true);
}
} else {
addItem(targets[_local5], _local1, endvals[_local8]);
}
}
}
}
}
}
static function onTweenInterrupt(o) {
if (items[String(o.__zigoID__)] != null) {
onTweenEnd(o);
}
}
static function onTweenEnd(o) {
var _local2 = ((o.target.__zigoID__ != null) ? (String(o.target.__zigoID__)) : (String(o.__zigoID__)));
var _local1 = o.props;
for (var _local4 in _local1) {
if (items[_local2][_local1[_local4]] != null) {
removeItem(o.target, _local2, _local1[_local4]);
}
}
}
static function addItem(target, prop, endval) {
var _local5 = com.mosesSupposes.fusefx.FXProperty(registryKeys[prop]);
var _local4 = com.mosesSupposes.fusefx.IFuseFX(new _local5.fxclass());
com.mosesSupposes.fuse.ZigoEngine.removeTween(target, prop);
if (!(_local4.addTween(target, prop, endval) === true)) {
return(undefined);
}
if (target.__zigoID__ == null) {
com.mosesSupposes.fuse.ZigoEngine.initializeTargets(target);
}
var _local2 = String(target.__zigoID__);
if (items[_local2][prop] != null) {
removeItem(target, _local2, prop, true);
}
if (numItems <= 0) {
items = new Object();
numItems = 0;
}
numItems++;
if (items[_local2] == null) {
items[_local2] = {numProps:0};
target.addListener(com.mosesSupposes.fusefx.FuseFX);
}
items[_local2][prop] = _local4;
items[_local2].numProps++;
target.addListener(_local4);
_local5.removeConflicts(target);
}
static function removeItem(target, zID, prop, isAdd) {
var _local3 = com.mosesSupposes.fusefx.IFuseFX(items[zID][prop]);
if (target != null) {
target.removeListener(_local3);
_local3.onTweenUpdate({target:target, props:[prop]});
if (isAdd == true) {
_global.com.mosesSupposes.fuse.ZigoEngine.instance.removeTween(target, prop, true);
}
}
_local3.destroy(target);
delete items[zID][prop];
if ((--items[zID].numProps) <= 0) {
if (target != null) {
target.removeListener(com.mosesSupposes.fusefx.FuseFX);
}
delete items[zID];
if ((--numItems) <= 0) {
delete items;
numItems = 0;
}
}
}
static var VERSION = 0.2;
static var requiredVersion = [2, 1, 3];
static var numItems = 0;
}
Symbol 323 MovieClip [__Packages.com.mosesSupposes.fusefx.IFuseFX] Frame 0
interface com.mosesSupposes.fusefx.IFuseFX
{
}
Symbol 324 MovieClip [__Packages.com.mosesSupposes.fusefx.FXProperty] Frame 0
class com.mosesSupposes.fusefx.FXProperty
{
var fxclass, key, conflicts, conflictLookup;
function FXProperty (FXClass, key, conflicts) {
var _local6 = new FXClass[undefined]();
if (!(_local6 instanceof com.mosesSupposes.fusefx.IFuseFX)) {
com.mosesSupposes.fuse.FuseKitCommon.output(("** FXProperty developer error ('" + key) + "'): First argument should be the actual IFuseFX class like TextFX, not an instance of the class. **");
}
if ((key == null) || (key.length == 0)) {
com.mosesSupposes.fuse.FuseKitCommon.output("** FXProperty developer error: null key passed. **");
}
fxclass = FXClass;
this.key = key;
this.conflicts = conflicts;
conflictLookup = {};
if ((conflicts != null) && (conflicts.length > 0)) {
var _local2 = conflicts.split(",");
for (var _local3 in _local2) {
if (_local2[_local3] != null) {
conflictLookup[_local2[_local3]] = true;
}
}
}
}
function removeConflicts(target) {
if (conflicts.length > 0) {
com.mosesSupposes.fuse.ZigoEngine.removeTween(target, conflicts);
}
}
}
Symbol 325 MovieClip [__Packages.com.mosesSupposes.util.MixerFX] Frame 0
class com.mosesSupposes.util.MixerFX implements com.mosesSupposes.fusefx.IFuseFX
{
var prop;
function MixerFX () {
}
function defineProperties() {
if ((com.mosesSupposes.fusefx.FuseFX.VERSION == undefined) || (com.mosesSupposes.fusefx.FuseFX.VERSION < requiredVersion)) {
com.mosesSupposes.fuse.FuseKitCommon.output(("* MixerFX did not register! FuseFX version " + requiredVersion) + " is required. *");
return(null);
}
var _local2 = [];
_local2.push(new com.mosesSupposes.fusefx.FXProperty(com.mosesSupposes.util.MixerFX, VOLUME, null));
_local2.push(new com.mosesSupposes.fusefx.FXProperty(com.mosesSupposes.util.MixerFX, PAN, null));
return(_local2);
}
function addTween(target, prop, endval) {
if (!(target instanceof Sound)) {
com.mosesSupposes.fuse.FuseKitCommon.output("* MixerFX tween failed: tween target should be a Sound instance. *");
return(false);
}
this.prop = prop;
if (prop == VOLUME) {
target[prop] = Sound(target).getVolume();
} else {
target[prop] = Sound(target).getPan();
}
_global.ASSetPropFlags(target, prop, 3, 1);
return(true);
}
function onTweenUpdate(o) {
var _local2 = Sound(o.target);
if (prop == VOLUME) {
_local2.setVolume(_local2[prop]);
} else {
_local2.setPan(_local2[prop]);
}
}
function destroy(target) {
_global.ASSetPropFlags(target, prop, 0, 2);
delete target[prop];
}
static var VOLUME = "volumeFX";
static var PAN = "panFX";
var requiredVersion = 0.2;
}
Symbol 326 MovieClip [__Packages.com.mosesSupposes.util.TextFX] Frame 0
class com.mosesSupposes.util.TextFX implements com.mosesSupposes.fusefx.IFuseFX
{
var _prop, realTFmtPropName;
function TextFX () {
}
function defineProperties() {
if ((com.mosesSupposes.fusefx.FuseFX.VERSION == undefined) || (com.mosesSupposes.fusefx.FuseFX.VERSION < requiredVersion)) {
com.mosesSupposes.fuse.FuseKitCommon.output(("* TextFX did not register! FuseFX version " + requiredVersion) + " is required. *");
return(null);
}
var _local2 = [];
_local2.push(new com.mosesSupposes.fusefx.FXProperty(com.mosesSupposes.util.TextFX, TEXT_COLOR, null));
_local2.push(new com.mosesSupposes.fusefx.FXProperty(com.mosesSupposes.util.TextFX, TEXT_SIZE, null));
_local2.push(new com.mosesSupposes.fusefx.FXProperty(com.mosesSupposes.util.TextFX, LEADING, null));
_local2.push(new com.mosesSupposes.fusefx.FXProperty(com.mosesSupposes.util.TextFX, KERNING, null));
_local2.push(new com.mosesSupposes.fusefx.FXProperty(com.mosesSupposes.util.TextFX, BLOCKINDENT, null));
_local2.push(new com.mosesSupposes.fusefx.FXProperty(com.mosesSupposes.util.TextFX, INDENT, null));
_local2.push(new com.mosesSupposes.fusefx.FXProperty(com.mosesSupposes.util.TextFX, LEFTMARGIN, null));
_local2.push(new com.mosesSupposes.fusefx.FXProperty(com.mosesSupposes.util.TextFX, RIGHTMARGIN, null));
return(_local2);
}
function addTween(target, prop, endval) {
if (!(target instanceof TextField)) {
com.mosesSupposes.fuse.FuseKitCommon.output("* TextFX tween failed: tween target should be a TextField instance. *");
return(false);
}
_prop = prop;
var _local4 = target.getTextFormat();
realTFmtPropName = getTextFmtProp();
if (_prop == TEXT_COLOR) {
if (!(endval instanceof Array)) {
com.mosesSupposes.fuse.FuseKitCommon.output("* TextFX.TEXT_COLOR tween failed: You must pass the color value inside an Array so the engine will tween it as a hex value. See documentation for help. *");
return(false);
}
target[_prop] = [_local4[realTFmtPropName]];
} else {
target[_prop] = _local4[realTFmtPropName];
}
_global.ASSetPropFlags(target, _prop, 3, 1);
return(true);
}
function onTweenUpdate(o) {
var _local2 = TextField(o.target);
var _local3 = _local2.getTextFormat();
if (_prop == TEXT_COLOR) {
_local3[realTFmtPropName] = _local2[_prop][0];
} else {
_local3[realTFmtPropName] = _local2[_prop];
}
_local2.setTextFormat(_local3);
}
function destroy(target) {
_global.ASSetPropFlags(target, _prop, 0, 2);
delete target[_prop];
}
function getTextFmtProp() {
if (_prop == TEXT_COLOR) {
return("color");
}
if (_prop == TEXT_SIZE) {
return("size");
}
if (_prop == LEADING) {
return("leading");
}
if (_prop == KERNING) {
return("letterSpacing");
}
if (_prop == BLOCKINDENT) {
return("blockIndent");
}
if (_prop == INDENT) {
return("indent");
}
if (_prop == LEFTMARGIN) {
return("leftMargin");
}
if (_prop == RIGHTMARGIN) {
return("rightMargin");
}
}
static var TEXT_COLOR = "textColorsArrayFX";
static var TEXT_SIZE = "textSizeFX";
static var LEADING = "textLeadingFX";
static var KERNING = "textKerningFX";
static var BLOCKINDENT = "textBlockIndentFX";
static var INDENT = "textIndentFX";
static var LEFTMARGIN = "textLMarginFX";
static var RIGHTMARGIN = "textRMarginFX";
var requiredVersion = 0.2;
}
Symbol 327 MovieClip [__Packages.com.jc.util.SortXML] Frame 0
class com.jc.util.SortXML
{
function SortXML () {
}
static function sortBy(fieldName, xNode) {
var _local1 = xNode.firstChild;
var _local2 = 0;
var _local3 = new Array();
while (_local1 != null) {
var _local4 = com.xfactorstudio.xml.xpath.XPath.selectSingleNode(_local1, "./" + fieldName).firstChild.nodeValue;
_local3.push({sortVal:_local4, myData:_local1});
_local1 = _local1.nextSibling;
_local2++;
}
_local3.sortOn("sortVal", Array.NUMERIC);
var _local6 = new Array();
_local2 = 0;
while (_local2 < _local3.length) {
_local6.push(_local3[_local2].myData);
_local2++;
}
return(_local6);
}
}
Symbol 328 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPath] Frame 0
class com.xfactorstudio.xml.xpath.XPath
{
function XPath () {
}
static function selectNodes(context, path) {
var _local1 = new com.xfactorstudio.xml.xpath.types.Query(path);
return(_local1.execute([context]));
}
static function selectSingleNode(context, path) {
return(selectNodes(context, path)[0]);
}
static function selectNodesAsString(context, path) {
var _local2 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local2[_local1])[0];
_local1++;
}
return(_local2);
}
static function selectNodesAsNumber(context, path) {
var _local2 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local2[_local1])[0]);
_local1++;
}
return(_local2);
}
static function selectNodesAsBoolean(context, path) {
var _local3 = selectNodes(context, path);
var _local1 = 0;
while (_local1 < _local3.length) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(_local3[_local1])[0];
_local3[_local1] = (((_local2.toUpperCase() == "TRUE") || (Number(_local2) == 1)) ? true : false);
_local1++;
}
return(_local3);
}
static function getNamedNodes(axis, name) {
var _local2 = new Array();
switch (name) {
case "*" :
var _local3 = 0;
while (_local3 < axis.length) {
if (axis[_local3].nodeType == 1) {
_local2.push(axis[_local3]);
}
_local3++;
}
break;
case "text()" :
_local3 = 0;
while (_local3 < axis.length) {
if (axis[_local3].nodeType == 3) {
_local2.push(axis[_local3]);
}
_local3++;
}
break;
case "node()" :
_local3 = 0;
while (_local3 < axis.length) {
_local2.push(axis[_local3]);
_local3++;
}
break;
default :
if (name.indexOf(":*") != -1) {
var _local5 = name.split(":*")[0];
_local3 = 0;
while (_local3 < axis.length) {
if (prefix(axis[_local3]) == _local5) {
_local2.push(axis[_local3]);
}
_local3++;
}
} else if (name.indexOf("*:") != -1) {
var _local6 = name.split("*:")[1];
_local3 = 0;
while (_local3 < axis.length) {
if (localName(axis[_local3]) == _local6) {
_local2.push(axis[_local3]);
}
_local3++;
}
} else {
_local3 = 0;
for(;;){
if (_local3 >= axis.length) {
break;
}
if (axis[_local3].nodeName == name) {
_local2.push(axis[_local3]);
}
_local3++;
};
}
}
return(_local2);
}
static function getDocumentElement(context) {
while (context.parentNode != null) {
context = context.parentNode;
}
if (context.firstChild.nodeName == null) {
return(context.firstChild.nextSibling);
}
return(context.firstChild);
}
static function getChildIndex(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
}
if (_local2[_local1] === kid) {
return(_local3);
}
_local1++;
}
return(0);
}
static function prefix(node) {
return(((node.nodeName.indexOf(":") != -1) ? (node.nodeName.split(":")[0]) : null));
}
static function localName(node) {
return(((node.nodeName.indexOf(":") != -1) ? (node.nodeName.split(":")[1]) : (node.nodeName)));
}
static function getXPath(n, attributeName) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.ancestorOrSelf(n);
var _local3 = "";
var _local1 = 1;
while (_local1 < _local2.length) {
switch (_local2[_local1].nodeType) {
case 1 :
_local3 = _local3 + ("/" + _local2[_local1].nodeName);
break;
case 3 :
_local3 = _local3 + "/text()";
}
_local1++;
}
if (attributeName != null) {
_local3 = _local3 + ("/@" + attributeName);
}
return(_local3);
}
static function getAbsoluteXPath(n, attributeName) {
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.ancestorOrSelf(n);
var _local3 = "";
var _local1 = 1;
while (_local1 < _local2.length) {
switch (_local2[_local1].nodeType) {
case 1 :
_local3 = _local3 + (((("/" + _local2[_local1].nodeName) + "[") + com.xfactorstudio.xml.xpath.types.Predicate.getIndexOfType(_local2[_local1])) + "]");
break;
case 3 :
_local3 = _local3 + "/text()";
}
_local1++;
}
if (attributeName != null) {
_local3 = _local3 + ("/@" + attributeName);
}
return(_local3);
}
}
Symbol 329 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.QueryPart] Frame 0
class com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes, parentNode, nodeValue;
function QueryPart () {
childNodes = new Array();
}
function appendChild(child) {
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
return(childNodes[childNodes.length - 1]);
}
function clone(obj) {
var _local2 = 0;
while (_local2 < childNodes.length) {
if (childNodes[_local2].nodeValue != null) {
obj.parentNode = parentNode;
obj.nodeValue = nodeValue;
obj.nodeName = nodeName;
obj.childNodes.push(childNodes[_local2].clone());
} else {
obj.childNodes.push(childNodes[_local2]);
}
_local2++;
}
}
function toString(tabs) {
if (tabs == null) {
tabs = "\t";
}
var _local3 = new Array();
_local3.push(newline);
_local3.push(tabs);
_local3.push("<");
_local3.push(nodeName);
_local3.push(">");
if (nodeValue != null) {
_local3.push(nodeValue);
}
var _local2 = 0;
while (_local2 < childNodes.length) {
if (childNodes[_local2] instanceof Array) {
_local3.push((((newline + tabs) + "\t<nodeset>") + childNodes[_local2]) + "</nodset>");
} else {
_local3.push(childNodes[_local2].toString(tabs + "\t"));
}
_local2++;
}
if (childNodes.length > 0) {
_local3.push(newline);
_local3.push(tabs);
}
_local3.push("</");
_local3.push(nodeName);
_local3.push(">");
return(_local3.join(""));
}
function execute(context) {
}
var nodeName = "querypart";
}
Symbol 330 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Query] Frame 0
class com.xfactorstudio.xml.xpath.types.Query extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var currentChild, nodeName, pathString, childNodes;
function Query (query) {
super();
com.xfactorstudio.xml.xpath.XPathFunctions.registerDefaultFunctions();
currentChild = this;
nodeName = "query";
pathString = query;
var _local3 = new com.xfactorstudio.xml.xpath.XPathLexer();
_local3.handler = this;
var _local4 = getTimer();
var _local5;
_local3.parse(pathString);
}
function onFunctionStart(name) {
onNotPath();
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Func(name));
}
function onComma() {
}
function onGroupStart() {
onNotPath();
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Group());
}
function onGroupEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Group)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onFunctionEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Func)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onIdentifier(name) {
if (name == ".") {
onAxis(com.xfactorstudio.xml.xpath.Axes.SELF);
onAxis(com.xfactorstudio.xml.xpath.Axes.CHILD);
} else {
onPathPart();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Identifier(name));
}
}
function onAxis(axis) {
onPathPart();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Axis(axis));
}
function onPredicateStart() {
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Predicate());
}
function onPredicateEnd() {
while (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Predicate)) {
currentChild = currentChild.parentNode;
}
currentChild = currentChild.parentNode;
}
function onOperator(type) {
onNotPath();
currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Operator(type));
}
function onLitteral(litteral) {
onNotPath();
currentChild.appendChild(litteral);
}
function onNumber(num) {
onNotPath();
currentChild.appendChild(num);
}
function onPathPart() {
if (!(currentChild instanceof com.xfactorstudio.xml.xpath.types.Path)) {
currentChild = currentChild.appendChild(new com.xfactorstudio.xml.xpath.types.Path());
}
}
function onNotPath() {
if (currentChild instanceof com.xfactorstudio.xml.xpath.types.Path) {
currentChild = currentChild.parentNode;
}
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Query();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local8 = new com.xfactorstudio.xml.xpath.types.Predicate();
var _local3 = 0;
while (_local3 < childNodes.length) {
_local8.appendChild(childNodes[_local3]);
_local3++;
}
var _local7 = new Array();
var _local2 = 0;
while (_local2 < context.length) {
var _local5 = _local8.clone();
var _local4 = com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local5, context[_local2]);
if (_local4 instanceof Array) {
_local7 = _local7.concat(com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local5, context[_local2], context));
} else {
_local7.push(_local4);
}
_local2++;
}
return(_local7);
}
}
Symbol 331 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathFunctions] Frame 0
class com.xfactorstudio.xml.xpath.XPathFunctions
{
function XPathFunctions () {
}
static function registerFunction(id, func) {
if (Tokens[id] == null) {
Functions.push(func);
Tokens[id] = Functions.length - 1;
} else {
throw new Error(("XPath Error: The function identifier (" + Tokens[id]) + ") is already in use");
}
}
static function registerDefaultFunctions() {
if (!defaultFunctionsInited) {
registerFunction("last", last);
registerFunction("position", position);
registerFunction("count", count);
registerFunction("id", id);
registerFunction("name", name);
registerFunction("string", string);
registerFunction("concat", concat);
registerFunction("starts-with", startsWith);
registerFunction("contains", contains);
registerFunction("substring-before", substringBefore);
registerFunction("substring-after", substringAfter);
registerFunction("substring", substring);
registerFunction("string-length", stringLength);
registerFunction("normalize-space", normalizeSpace);
registerFunction("translate", translate);
registerFunction("boolean", boolean);
registerFunction("not", Not);
registerFunction("true", True);
registerFunction("false", False);
registerFunction("lang", lang);
registerFunction("number", number);
registerFunction("sum", sum);
registerFunction("floor", floor);
registerFunction("ceiling", ceiling);
registerFunction("round", round);
registerFunction("local-name", localName);
registerFunction("namespaceURI", namespaceURI);
defaultFunctionsInited = true;
}
}
static function getFunction(i) {
return(Functions[i]);
}
static function last(args, context, nodeSet) {
return(Number(nodeSet.length));
}
static function position(args, context, nodeSet) {
return(com.xfactorstudio.xml.xpath.XPath.getChildIndex(context));
}
static function count(args, context, nodeSet) {
return(args[0].length);
}
static function id(args, context, nodeSet) {
}
static function name(args, context, nodeSet) {
var _local1 = ((args.length == 0) ? (context) : (args[0][0]));
return(_local1.nodeName);
}
static function localName(args, context, nodeSet) {
var _local2 = ((args.length == 0) ? (context) : (args[0][0]));
var _local1 = _local2.nodeName.split(":");
return(((_local1.length > 1) ? (_local1[1]) : (_local1[0])));
}
static function namespaceURI(args, context, nodeSet) {
var _local4 = ((args.length == 0) ? (context) : (args[0][0]));
var _local3 = _local4.nodeName.split(":")[0];
var _local2 = com.xfactorstudio.xml.xpath.XPathAxes.namespace(_local4);
var _local1 = 0;
while (_local1 < _local2.length) {
if (localName([[_local2[_local1]]]) == _local3) {
return(_local2[_local1].nodeValue);
}
_local1++;
}
}
static function toString(args) {
if (args instanceof Array) {
args = com.xfactorstudio.xml.xpath.XPathAxes.stringValue(args[0]).join("");
}
return(String(args));
}
static function string(args, context, nodeSet) {
return(toString(args[0]));
}
static function concat(args, context, nodeSet) {
var _local1 = 0;
while (_local1 < args.length) {
args[_local1] = toString(args[_local1]);
_local1++;
}
return(args.join(""));
}
static function startsWith(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(((args[0].substr(0, args[1].length) == args[1]) ? true : false));
}
static function contains(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(((args[0].indexOf(args[1]) != -1) ? true : false));
}
static function substringBefore(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(0, args[0].indexOf(args[1])));
}
static function substringAfter(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(args[0].indexOf(args[1]) + args[1].length, args[0].length));
}
static function substring(args, context, nodeSet) {
args[0] = toString(args[0]);
args[1] = toString(args[1]);
return(args[0].substr(args[1] - 1, Math.min(args[2], args[0].length)));
}
static function stringLength(args, context, nodeSet) {
args = toString(args[0]);
return(((args != null) ? (args.length) : (com.xfactorstudio.xml.xpath.XPathAxes.stringValue(context).length)));
}
static function normalizeSpace(args, context, nodeSet) {
args = toString(args[0]);
var _local1;
var _local3;
_local1 = 0;
while (_local1 < args.length) {
if (args.charCodeAt(_local1) < 33) {
_local3 = _local1;
while (args.charCodeAt(_local3) < 33) {
_local3++;
}
if (_local3 > (_local1 + 1)) {
args = args.split(args.substr(_local1, _local3 - _local1)).join(" ");
}
}
_local1++;
}
_local1 = 0;
while (args.charCodeAt(_local1) < 33) {
_local1++;
}
args = args.substr(_local1, args.length);
_local1 = args.length - 1;
while (args.charCodeAt(_local1) < 33) {
_local1--;
}
args = args.substr(0, _local1 + 1);
return(args);
}
static function translate(args, context, nodeSet) {
var _local3 = toString(args[0]);
var _local4 = toString(args[1]);
var _local2 = toString(args[2]);
return(_local3.split(_local4).join(_local2));
}
static function toNumber(args) {
if (args instanceof Array) {
args = toString(args);
}
switch (typeof(args)) {
case "string" :
return(Number(args));
case "boolean" :
return((args ? 1 : 0));
}
return(Number(args.toString()));
}
static function number(args, context, nodeSet) {
return(toNumber(args[0]));
}
static function sum(args, context, nodeSet) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < args[0].length) {
_local3 = _local3 + Number(com.xfactorstudio.xml.xpath.XPathAxes.stringValue(args[0][_local1])[0]);
_local1++;
}
return(_local3);
}
static function floor(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.floor(Number(args[0])));
}
static function ceiling(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.ceil(Number(args[0])));
}
static function round(args, context, nodeSet) {
args[0] = toNumber(args[0]);
return(Math.round(Number(args[0])));
}
static function toBoolean(args) {
return(boolean([args]));
}
static function boolean(args, context, nodeSet) {
args = args[0];
if (args instanceof Array) {
return(((args.length > 0) ? true : false));
}
switch (typeof(args)) {
case "number" :
return(((args != 0) ? true : false));
case "string" :
return(((args.length > 0) ? true : false));
}
return(args);
}
static function Not(args, context, nodeSet) {
args = args[0];
if ((args == "false") || (args == false)) {
return(true);
}
return(false);
}
static function True(args, context, nodeSet) {
return(true);
}
static function False(args, context, nodeSet) {
return(false);
}
static function lang(args, context, nodeSet) {
return(((com.xfactorstudio.xml.xpath.XPath.getNamedNodes(com.xfactorstudio.xml.xpath.XPathAxes.attribute(context), "*:lang")[0].toString() == args[0].toString()) ? true : false));
}
static var Tokens = new Object();
static var Names = [];
static var Functions = [];
static var defaultFunctionsInited = false;
}
Symbol 332 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathAxes] Frame 0
class com.xfactorstudio.xml.xpath.XPathAxes
{
function XPathAxes () {
}
static function ancestor(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.parentNode , _local1 != null) {
_local2.push(_local1);
}
_local2.reverse();
return(_local2);
}
static function namespace(contextNode) {
trace("namspace");
var _local4;
var _local3;
var _local5;
var _local12 = contextNode.parentNode;
if (_local12 != null) {
_local3 = namespace(_local12);
} else {
_local3 = new Array();
var _local13 = {parentNode:contextNode, nodeName:"xmlns:xml", nodeType:5, nodeValue:"http://www.w3.org/XML/1998/namespace", toString:function () {
return(this.nodeValue);
}};
_local3.push(_local13);
}
for (var _local11 in contextNode.attributes) {
if (_local11.substr(0, 5) == "xmlns") {
_local4 = {parentNode:contextNode, nodeName:_local11, nodeType:5, nodeValue:contextNode.attributes[_local11], toString:function () {
return(this.nodeValue);
}};
_local5 = -1;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].nodeName == _local4.nodeName) {
_local5 = _local2;
break;
}
_local2++;
}
if (_local5 != -1) {
if (_local4.nodeValue == "") {
_local3.splice(_local5, 1);
} else {
_local3[_local5] = _local4;
}
} else if (_local4.nodeValue != "") {
_local3.push(_local4);
}
}
}
return(_local3);
}
static function ancestorOrSelf(contextNode) {
var _local1 = ancestor(contextNode);
_local1.push(contextNode);
return(_local1);
}
static function attribute(contextNode) {
var _local7 = new Array();
for (var _local8 in contextNode.attributes) {
_local7.push({parentNode:contextNode, nodeName:_local8, nodeType:5, nodeValue:contextNode.attributes[_local8], toString:function () {
return(this.nodeValue);
}});
}
return(_local7);
}
static function child(contextNode) {
return(contextNode.childNodes);
}
static function stringValue(contextNode) {
var _local5 = contextNode.childNodes;
var _local4 = new Array();
var _local3;
switch (contextNode.nodeType) {
case 1 :
_local3 = new Array();
var _local1 = 0;
while (_local1 < contextNode.childNodes.length) {
switch (contextNode.childNodes[_local1].nodeType) {
case 3 :
if (!com.xfactorstudio.xml.xpath.XPathUtils.checkEmpty(contextNode.childNodes[_local1])) {
_local3.push(contextNode.childNodes[_local1].nodeValue);
}
break;
case 1 :
_local3.push(stringValue(contextNode.childNodes[_local1]));
}
_local1++;
}
_local4.push(_local3.join(""));
break;
case 3 :
case 5 :
_local4.push(contextNode.nodeValue);
}
return(_local4);
}
static function descendant(contextNode) {
var _local4 = contextNode;
var _local5 = new Array();
var _local2 = 0;
while (_local2 < _local4.childNodes.length) {
if (_local4.childNodes[_local2].nodeType == 1) {
_local5.push(_local4.childNodes[_local2]);
var _local3 = descendant(_local4.childNodes[_local2]);
var _local1 = 0;
while (_local1 < _local3.length) {
_local5.push(_local3[_local1]);
_local1++;
}
}
_local2++;
}
return(_local5);
}
static function descendantOrSelf(contextNode) {
var _local1 = descendant(contextNode);
_local1.splice(0, 0, contextNode);
return(_local1);
}
static function following(contextNode) {
var _local6 = new Array();
var _local9 = followingSibling(contextNode);
var _local8 = ancestor(contextNode);
var _local7 = 0;
while (_local7 < _local9.length) {
var _local4 = descendantOrSelf(_local9[_local7]);
var _local3 = 0;
while (_local3 < _local4.length) {
_local6.push(_local4[_local3]);
_local3++;
}
_local7++;
}
_local7 = 0;
while (_local7 < _local8.length) {
var _local5 = followingSibling(_local8[_local7]);
var _local3 = 0;
while (_local3 < _local5.length) {
var _local2 = descendantOrSelf(_local5[_local3]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local6.push(_local2[_local1]);
_local1++;
}
_local3++;
}
_local7++;
}
return(_local6);
}
static function followingSibling(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.nextSibling , _local1 != null) {
_local2.push(_local1);
}
return(_local2);
}
static function parent(contextNode) {
return(new Array(contextNode.parentNode));
}
static function preceding(contextNode) {
var _local6 = new Array();
var _local9 = precedingSibling(contextNode);
var _local8 = ancestor(contextNode);
var _local7 = 0;
while (_local7 < _local8.length) {
var _local4 = precedingSibling(_local8[_local7]);
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = descendantOrSelf(_local4[_local3]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local6.push(_local2[_local1]);
_local1++;
}
_local3++;
}
_local7++;
}
_local7 = 0;
while (_local7 < _local9.length) {
var _local5 = descendantOrSelf(_local9[_local7]);
var _local3 = 0;
while (_local3 < _local5.length) {
_local6.push(_local5[_local3]);
_local3++;
}
_local7++;
}
return(_local6);
}
static function precedingSibling(contextNode) {
var _local2 = new Array();
var _local1 = contextNode;
while (_local1 = _local1.previousSibling , _local1 != null) {
_local2.push(_local1);
}
_local2.reverse();
return(_local2);
}
static function self(contextNode) {
return([contextNode]);
}
static function root(contextNode) {
while (contextNode.parentNode != null) {
contextNode = contextNode.parentNode;
}
return([contextNode.firstChild]);
}
}
Symbol 333 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathUtils] Frame 0
class com.xfactorstudio.xml.xpath.XPathUtils
{
function XPathUtils () {
}
static function cloneArray(obj) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < obj.length) {
_local3.push(obj[_local1]);
_local1++;
}
return(_local3);
}
static function checkEmpty(contextNode) {
var _local2 = contextNode.nodeValue;
var _local4 = _local2.length;
var _local3 = true;
var _local1 = 1;
while (_local1 < _local4) {
if (_local2.substr(_local1 - 1, 1).charCodeAt() > 32) {
_local3 = false;
break;
}
_local1 = _local1 + 2;
}
return(_local3);
}
}
Symbol 334 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathLexer] Frame 0
class com.xfactorstudio.xml.xpath.XPathLexer
{
var functionNames, axisNames, operatorNames, path, tokenizer, lastToken, handler, lastOpenPeran;
function XPathLexer (path) {
functionNames = com.xfactorstudio.xml.xpath.XPathFunctions.Tokens;
axisNames = new com.xfactorstudio.xml.xpath.XPathAxisNames();
operatorNames = new com.xfactorstudio.xml.xpath.XPathPredicateOperator();
}
function parse(path) {
this.path = path;
tokenizer = new com.xfactorstudio.xml.xpath.Tokenizer(this.path);
var _local2;
while (tokenizer.hasMoreChars()) {
_local2 = tokenizer.nextToken();
switch (_local2.type) {
case com.xfactorstudio.xml.xpath.TokenTypes.SLASH :
onSlash(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER :
onIdentifier(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
onAt();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
onOperator(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.INTEGER :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE :
onNumber(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOT :
onDot();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOT_DOT :
onDoubleDot();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
break;
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH :
onDoubleSlash(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.EOF :
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
onLeftBracket(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
onLeftParen();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.LITERAL :
onLitteral(_local2);
break;
case com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_BRACKET :
onRightBracket();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_PAREN :
onRightParen();
break;
case com.xfactorstudio.xml.xpath.TokenTypes.STAR :
if (tokenizer.LA(1) == ":") {
_local2.type = com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER;
_local2.text = _local2.text + tokenizer.nextToken().text;
_local2.text = _local2.text + tokenizer.nextToken().text;
onIdentifier(_local2);
} else {
onStar();
break;
}
case com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR :
case com.xfactorstudio.xml.xpath.TokenTypes.COMMA :
case com.xfactorstudio.xml.xpath.TokenTypes.SKIP :
}
lastToken = _local2;
}
}
function onSlash(t) {
switch (lastTokenType) {
case IDENTIFIER :
case PREDICATEEND :
case AXIS :
lastTokenType = OPERATOR;
break;
default :
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.ROOT);
lastTokenType = AXIS;
}
}
function onStar() {
switch (lastToken.type) {
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
handler.onOperator("*");
break;
default :
handler.onIdentifier("*");
}
}
function onAt() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE);
lastTokenType = AXIS;
}
function onDot() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.SELF);
lastTokenType = AXIS;
}
function onDoubleDot() {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.PARENT);
lastTokenType = AXIS;
}
function onDoubleSlash(t) {
handler.onAxis(com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF);
lastTokenType = AXIS;
}
function onNumber(t) {
handler.onNumber(Number(t.text));
lastTokenType = NUMBER;
}
function onIdentifier(t) {
var _local2 = t.text;
if (tokenizer.LA(1) == "(") {
switch (t.text) {
case "node" :
case "text" :
handler.onIdentifier(t.text + "()");
lastTokenType = IDENTIFIER;
tokenizer.nextToken();
tokenizer.nextToken();
return(undefined);
}
handler.onFunctionStart(functionNames[t.text]);
lastTokenType = FUNCTIONSTART;
lastOpenPeran = FUNCTIONSTART;
tokenizer.nextToken();
return(undefined);
}
if (tokenizer.LA(1) == ":") {
if (tokenizer.LA(2) == ":") {
_local2 = _local2 + tokenizer.nextToken().text;
handler.onAxis(axisNames[_local2]);
lastTokenType = AXIS;
return(undefined);
}
_local2 = _local2 + tokenizer.nextToken().text;
_local2 = _local2 + tokenizer.nextToken().text;
}
switch (lastTokenType) {
case AXIS :
case PREDICATESTART :
case GROUPSTART :
case FUNCTIONSTART :
case OPERATOR :
case -1 :
handler.onIdentifier(_local2);
lastTokenType = IDENTIFIER;
break;
}
}
function onRightParen() {
switch (lastOpenPeran) {
case GROUPSTART :
handler.onGroupEnd();
lastTokenType = GROUPEND;
break;
case FUNCTIONSTART :
handler.onFunctionEnd();
lastTokenType = FUNCTIONEND;
}
}
function onLeftParen() {
handler.onGroupStart();
lastTokenType = GROUPSTART;
lastOpenPeran = GROUPSTART;
}
function onLitteral(t) {
handler.onLitteral(t.text);
lastTokenType = LITTERAL;
}
function onLeftBracket(t) {
handler.onPredicateStart();
lastTokenType = PREDICATESTART;
}
function onRightBracket(t) {
handler.onPredicateEnd();
lastTokenType = PREDICATEEND;
}
function onOperator(t) {
handler.onOperator(operatorNames[t.text]);
lastTokenType = OPERATOR;
}
var lastTokenType = -1;
var inFunction = 0;
var inGroup = 0;
var inPredicate = 0;
static var AXIS = 0;
static var PREDICATESTART = 1;
static var PREDICATEEND = 2;
static var IDENTIFIER = 3;
static var FUNCTIONSTART = 4;
static var FUNCTIONEND = 5;
static var OPERATOR = 6;
static var COMMA = 7;
static var GROUPSTART = 8;
static var GROUPEND = 9;
static var NUMBER = 10;
static var LITTERAL = 11;
}
Symbol 335 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathAxisNames] Frame 0
class com.xfactorstudio.xml.xpath.XPathAxisNames
{
var ancestor::, ancestor-or-self::, attribute::, @, child::, descendant::, descendant-or-self::, //, following::, following-sibling::, parent::, .., preceding::, preceding-sibling::, self::, namespace::;
function XPathAxisNames () {
ancestor:: = com.xfactorstudio.xml.xpath.Axes.ANCESTOR;
ancestor-or-self:: = com.xfactorstudio.xml.xpath.Axes.ANCESTOR_OR_SELF;
attribute:: = com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE;
@ = com.xfactorstudio.xml.xpath.Axes.ATTRIBUTE;
child:: = com.xfactorstudio.xml.xpath.Axes.CHILD;
descendant:: = com.xfactorstudio.xml.xpath.Axes.DECENDANT;
descendant-or-self:: = com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF;
// = com.xfactorstudio.xml.xpath.Axes.DECENDANT_OR_SELF;
following:: = com.xfactorstudio.xml.xpath.Axes.FOLLOWING;
following-sibling:: = com.xfactorstudio.xml.xpath.Axes.FOLLOWING_SIBLING;
parent:: = com.xfactorstudio.xml.xpath.Axes.PARENT;
.. = com.xfactorstudio.xml.xpath.Axes.PARENT;
preceding:: = com.xfactorstudio.xml.xpath.Axes.PRECEDING;
preceding-sibling:: = com.xfactorstudio.xml.xpath.Axes.PRECEDING_SIBLING;
self:: = com.xfactorstudio.xml.xpath.Axes.SELF;
this["."] = com.xfactorstudio.xml.xpath.Axes.SELF;
namespace:: = com.xfactorstudio.xml.xpath.Axes.NAMESPACE;
}
}
Symbol 336 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Axes] Frame 0
class com.xfactorstudio.xml.xpath.Axes
{
function Axes () {
}
static function getName(index) {
switch (index) {
case 0 :
return("root");
case 1 :
return("ancestor");
case 2 :
return("ancestorOrSelf");
case 3 :
return("attribute");
case 4 :
return("child");
case 5 :
return("descendant");
case 6 :
return("descendantOrSelf");
case 7 :
return("following");
case 8 :
return("followingSibling");
case 9 :
return("parent");
case 10 :
return("preceding");
case 11 :
return("precedingSibling");
case 12 :
return("self");
case 13 :
return("namespace");
}
}
static var ROOT = 0;
static var ANCESTOR = 1;
static var ANCESTOR_OR_SELF = 2;
static var ATTRIBUTE = 3;
static var CHILD = 4;
static var DECENDANT = 5;
static var DECENDANT_OR_SELF = 6;
static var FOLLOWING = 7;
static var FOLLOWING_SIBLING = 8;
static var PARENT = 9;
static var PRECEDING = 10;
static var PRECEDING_SIBLING = 11;
static var SELF = 12;
static var NAMESPACE = 13;
}
Symbol 337 MovieClip [__Packages.com.xfactorstudio.xml.xpath.XPathPredicateOperator] Frame 0
class com.xfactorstudio.xml.xpath.XPathPredicateOperator
{
var +, -, =, !, >, <, !=, >=, <=, *, mod, div, and, or, |;
function XPathPredicateOperator () {
+ = 200;
- = 201;
= = 202;
! = 203;
> = 204;
< = 205;
!= = 206;
>= = 207;
<= = 208;
* = 209;
mod = 210;
div = 211;
and = 212;
or = 213;
| = 214;
}
}
Symbol 338 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Tokenizer] Frame 0
class com.xfactorstudio.xml.xpath.Tokenizer
{
var xpath, currentPosition, endPosition;
function Tokenizer (xpath) {
setXPath(xpath);
}
function setXPath(xpath) {
this.xpath = xpath;
currentPosition = 0;
endPosition = xpath.length;
}
function nextToken() {
var _local2 = null;
do {
_local2 = null;
switch (LA(1)) {
case "$" :
_local2 = dollar();
break;
case "\"" :
case "'" :
_local2 = literal();
break;
case "/" :
_local2 = slashes();
break;
case "," :
_local2 = comma();
break;
case "(" :
_local2 = leftParen();
break;
case ")" :
_local2 = rightParen();
break;
case "[" :
_local2 = leftBracket();
break;
case "]" :
_local2 = rightBracket();
break;
case "+" :
_local2 = plus();
break;
case "-" :
_local2 = minus();
break;
case "<" :
case ">" :
_local2 = relationalOperator();
break;
case "=" :
_local2 = equals();
break;
case "!" :
if (LA(2) == "=") {
_local2 = notEquals();
} else {
_local2 = Not();
}
break;
case "|" :
_local2 = pipe();
break;
case "@" :
_local2 = at();
break;
case ":" :
if (LA(2) == ":") {
_local2 = doubleColon();
} else {
_local2 = colon();
}
break;
case "*" :
_local2 = star();
break;
case "." :
switch (LA(2)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
_local2 = numberTok();
break;
default :
_local2 = dots();
}
break;
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
_local2 = numberTok();
break;
case " " :
case "\t" :
case newline :
case "\r" :
_local2 = whitespace();
break;
default :
if (!isIdentifierStartChar(LA(1))) {
break;
}
_local2 = identifierOrOperatorName();
}
if (_local2 == null) {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.EOF, text:xpath.substring(currentPosition, endPosition)};
}
} while (_local2.type == com.xfactorstudio.xml.xpath.TokenTypes.SKIP);
previousToken = _local2;
return(_local2);
}
function identifierOrOperatorName() {
var _local2 = null;
if (previousToken != null) {
switch (previousToken.type) {
case com.xfactorstudio.xml.xpath.TokenTypes.AT :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN :
case com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET :
case com.xfactorstudio.xml.xpath.TokenTypes.AND :
case com.xfactorstudio.xml.xpath.TokenTypes.OR :
case com.xfactorstudio.xml.xpath.TokenTypes.MOD :
case com.xfactorstudio.xml.xpath.TokenTypes.DIV :
case com.xfactorstudio.xml.xpath.TokenTypes.COLON :
case com.xfactorstudio.xml.xpath.TokenTypes.SLASH :
case com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH :
case com.xfactorstudio.xml.xpath.TokenTypes.PIPE :
case com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR :
case com.xfactorstudio.xml.xpath.TokenTypes.PLUS :
case com.xfactorstudio.xml.xpath.TokenTypes.MINUS :
case com.xfactorstudio.xml.xpath.TokenTypes.STAR :
case com.xfactorstudio.xml.xpath.TokenTypes.COMMA :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN :
case com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.EQUALS :
case com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS :
_local2 = identifier();
break;
default :
_local2 = operatorName();
}
} else {
_local2 = identifier();
}
return(_local2);
}
function identifier() {
var _local2 = null;
var _local3 = currentPosition;
while (hasMoreChars()) {
if (isIdentifierChar(LA(1))) {
consume();
} else {
break;
}
}
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.IDENTIFIER, text:xpath.substring(_local3, currentPosition)};
return(_local2);
}
function operatorName() {
var _local2 = null;
switch (LA(1)) {
case "a" :
_local2 = And();
break;
case "o" :
_local2 = Or();
break;
case "m" :
_local2 = mod();
break;
case "d" :
_local2 = div();
}
return(_local2);
}
function mod() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.MOD, text:"mod"};
consume();
consume();
consume();
return(_local2);
}
function div() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DIV, text:xpath.substring(currentPosition, currentPosition + 3)};
consume();
consume();
consume();
return(_local2);
}
function And() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.AND, text:"and"};
consume();
consume();
consume();
return(_local2);
}
function Or() {
var _local2 = null;
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.OR, text:"or"};
consume();
consume();
return(_local2);
}
function numberTok() {
var _local5 = currentPosition;
var _local2 = true;
var _local3 = true;
while (_local3) {
switch (LA(1)) {
case "." :
if (_local2) {
_local2 = false;
consume();
} else {
break;
}
break;
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
consume();
break;
default :
_local3 = false;
}
}
var _local4 = null;
if (_local2) {
_local4 = {type:com.xfactorstudio.xml.xpath.TokenTypes.INTEGER, text:xpath.substring(_local5, currentPosition)};
} else {
_local4 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE, text:xpath.substring(_local5, currentPosition)};
}
return(_local4);
}
function whitespace() {
consume();
while (hasMoreChars()) {
switch (LA(1)) {
case " " :
case "\t" :
case newline :
case "\r" :
consume();
continue;//outer level
}
return({type:com.xfactorstudio.xml.xpath.TokenTypes.SKIP, text:xpath.substring(0, 0)});
}
}
function comma() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.COMMA, text:","};
consume();
return(_local2);
}
function equals() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.EQUALS, text:"="};
consume();
return(_local2);
}
function minus() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.MINUS, text:"-"};
consume();
return(_local2);
}
function plus() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.PLUS, text:"+"};
consume();
return(_local2);
}
function dollar() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOLLAR, text:"$"};
consume();
return(_local2);
}
function pipe() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.PIPE, text:"|"};
consume();
return(_local2);
}
function at() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.AT, text:"@"};
consume();
return(_local2);
}
function colon() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.COLON, text:":"};
consume();
return(_local2);
}
function doubleColon() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_COLON, text:"::"};
consume();
consume();
return(_local2);
}
function Not() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.NOT, text:"!"};
consume();
return(_local2);
}
function notEquals() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.NOT_EQUALS, text:"!="};
consume();
consume();
return(_local2);
}
function relationalOperator() {
var _local2 = null;
switch (LA(1)) {
case "<" :
if (LA(2) == "=") {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN_EQUALS, text:"<="};
consume();
} else {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LESS_THAN, text:"<"};
}
consume();
break;
case ">" :
if (LA(2) == "=") {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN_EQUALS, text:">="};
consume();
} else {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.GREATER_THAN, text:">"};
}
consume();
}
return(_local2);
}
function star() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.STAR, text:"*"};
consume();
return(_local2);
}
function literal() {
var _local2 = null;
var _local5 = LA(1);
consume();
var _local6 = currentPosition;
while ((_local2 == null) && (hasMoreChars())) {
if (LA(1) == _local5) {
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LITERAL, text:xpath.substring(_local6, currentPosition)};
}
consume();
}
return(_local2);
}
function dots() {
var _local2 = null;
switch (LA(2)) {
case "." :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOT_DOT, text:".."};
consume();
consume();
break;
default :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOT, text:"."};
consume();
}
return(_local2);
}
function leftBracket() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LEFT_BRACKET, text:"["};
consume();
return(_local2);
}
function rightBracket() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_BRACKET, text:"]"};
consume();
return(_local2);
}
function leftParen() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.LEFT_PAREN, text:"("};
consume();
return(_local2);
}
function rightParen() {
var _local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.RIGHT_PAREN, text:")"};
consume();
return(_local2);
}
function slashes() {
var _local2 = null;
switch (LA(2)) {
case "/" :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.DOUBLE_SLASH, text:"//"};
consume();
consume();
break;
default :
_local2 = {type:com.xfactorstudio.xml.xpath.TokenTypes.SLASH, text:"/"};
consume();
}
return(_local2);
}
function LA(i) {
return(xpath.charAt(currentPosition + (i - 1)));
}
function consume() {
currentPosition++;
}
function hasMoreChars() {
return(currentPosition < endPosition);
}
function isIdentifierChar(c) {
return(isUnicodeIdentifierPart(c));
}
function isIdentifierStartChar(c) {
return("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".indexOf(c) != -1);
}
static function isUnicodeIdentifierPart(c) {
return("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".indexOf(c) != -1);
}
static function isNumber(c) {
return(!isNaN(c));
}
var previousToken = null;
}
Symbol 339 MovieClip [__Packages.com.xfactorstudio.xml.xpath.TokenTypes] Frame 0
class com.xfactorstudio.xml.xpath.TokenTypes
{
function TokenTypes () {
}
static function getName(i) {
switch (i) {
case AND :
return("AND");
case AT :
return("AT");
case COLON :
return("COLON");
case COMMA :
return("COMMA");
case DIV :
return("DIV");
case DOLLAR :
return("DOLLAR");
case DOT :
return("DOT");
case DOT_DOT :
return("DOT_DOT");
case DOUBLE :
return("DOUBLE");
case DOUBLE_COLON :
return("DOUBLE_COLON");
case DOUBLE_SLASH :
return("DOUBLE_SLASH");
case EOF :
return("EOF");
case EQUALS :
return("EQUALS");
case GREATER_THAN :
return("GREATER_THAN");
case GREATER_THAN_EQUALS :
return("GREATER_THAN_EQUALS");
case IDENTIFIER :
return("IDENTIFIER");
case INTEGER :
return("INTEGER");
case LEFT_BRACKET :
return("LEFT_BRACKET");
case LEFT_PAREN :
return("LEFT_PAREN");
case LESS_THAN :
return("LESS_THAN");
case LESS_THAN_EQUALS :
return("LESS_THAN_EQUALS");
case LITERAL :
return("LITERAL");
case MINUS :
return("MINUS");
case MOD :
return("MOD");
case NOT :
return("NOT");
case NOT_EQUALS :
return("NOT_EQUALS");
case OR :
return("OR");
case PIPE :
return("PIPE");
case PLUS :
return("PLUS");
case RIGHT_BRACKET :
return("RIGHT_BRACKET");
case RIGHT_PAREN :
return("RIGHT_PAREN");
case SKIP :
return("SKIP");
case SLASH :
return("SLASH");
case STAR :
return("STAR");
}
}
static var LEFT_PAREN = 1;
static var RIGHT_PAREN = 2;
static var LEFT_BRACKET = 3;
static var RIGHT_BRACKET = 4;
static var PLUS = 5;
static var MINUS = 6;
static var LESS_THAN = 7;
static var LESS_THAN_EQUALS = 8;
static var GREATER_THAN = 9;
static var GREATER_THAN_EQUALS = 10;
static var SLASH = 11;
static var DOUBLE_SLASH = 12;
static var DOT = 13;
static var DOT_DOT = 14;
static var IDENTIFIER = 15;
static var AT = 16;
static var PIPE = 17;
static var COLON = 18;
static var DOUBLE_COLON = 19;
static var STAR = 20;
static var EQUALS = 21;
static var NOT_EQUALS = 22;
static var NOT = 23;
static var DIV = 24;
static var MOD = 25;
static var DOLLAR = 26;
static var LITERAL = 27;
static var AND = 28;
static var OR = 29;
static var INTEGER = 30;
static var DOUBLE = 31;
static var COMMA = 32;
static var SKIP = -2;
static var EOF = -1;
}
Symbol 340 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Token] Frame 0
class com.xfactorstudio.xml.xpath.Token
{
var tokenType, parseText, tokenBegin, tokenEnd;
function Token (tokenType, parseText, tokenBegin, tokenEnd) {
setTokenType(tokenType);
setParseText(parseText);
setTokenBegin(tokenBegin);
setTokenEnd(tokenEnd);
}
function setTokenType(tokenType) {
this.tokenType = tokenType;
}
function getTokenType() {
return(tokenType);
}
function setParseText(parseText) {
this.parseText = parseText;
}
function getTokenText() {
return(parseText.substring(getTokenBegin(), getTokenEnd()));
}
function setTokenBegin(tokenBegin) {
this.tokenBegin = tokenBegin;
}
function getTokenBegin() {
return(tokenBegin);
}
function setTokenEnd(tokenEnd) {
this.tokenEnd = tokenEnd;
}
function getTokenEnd() {
return(tokenEnd);
}
function toString() {
return(((("[ (" + com.xfactorstudio.xml.xpath.TokenTypes.getName(tokenType)) + ") (") + getTokenText()) + ")");
}
}
Symbol 341 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Func] Frame 0
class com.xfactorstudio.xml.xpath.types.Func extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue, parentNode, childNodes;
function Func (name) {
super();
nodeValue = name;
}
function register() {
parentNode.hasFunctions = true;
}
function clone() {
var _local3 = new com.xfactorstudio.xml.xpath.types.Func(nodeValue);
super.clone(_local3);
return(_local3);
}
function execute(context, axis) {
var _local2 = 0;
while (_local2 < childNodes.length) {
switch (typeof(childNodes[_local2])) {
case "string" :
case "boolean" :
case "number" :
break;
default :
childNodes[_local2] = childNodes[_local2].execute(context);
}
_local2++;
}
return(com.xfactorstudio.xml.xpath.XPathFunctions.getFunction(nodeValue).call(this, childNodes, context[0], axis));
}
var nodeName = "function";
}
Symbol 342 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Group] Frame 0
class com.xfactorstudio.xml.xpath.types.Group extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes;
function Group () {
super();
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Group();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local7;
var _local5 = new com.xfactorstudio.xml.xpath.types.Predicate();
var _local2 = 0;
while (_local2 < childNodes.length) {
_local5.appendChild(childNodes[_local2]);
_local2++;
}
var _local8 = new Array();
var _local3 = 0;
while (_local3 < context.length) {
var _local4 = _local5.clone();
_local7 = com.xfactorstudio.xml.xpath.types.Predicate.staticEvaluate(_local4, context[_local3]);
_local3++;
}
return(_local7);
}
var nodeName = "group";
}
Symbol 343 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Predicate] Frame 0
class com.xfactorstudio.xml.xpath.types.Predicate extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var childNodes;
function Predicate () {
super();
}
function appendChild(child) {
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
child.register();
return(childNodes[childNodes.length - 1]);
}
function execute(context) {
var _local6 = new Array();
var _local3 = 0;
while (_local3 < context.length) {
var _local5 = clone();
var _local2 = evaluate(_local5, context[_local3], context);
if (typeof(_local2) == "number") {
_local2 = _local2 == getChildIndex(context[_local3]);
} else {
_local2 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(_local2);
}
if (_local2) {
_local6.push(context[_local3]);
}
_local3++;
}
return(_local6);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Predicate();
super.clone(_local2);
return(_local2);
}
static function staticEvaluate(test, contextNode, axis) {
solveGroups(test, contextNode);
solveFunctions(test, contextNode, axis);
solvePaths(test, contextNode);
solveUnions(test, contextNode);
solveMultiplicativeExpressions(test, contextNode);
solveAdditiveExpressions(test, contextNode);
solveRelationalExpressions(test, contextNode);
solveEqualityExpressions(test, contextNode);
solveLogicalAndExpressions(test, contextNode);
solveLogicalOrExpressions(test, contextNode);
return(test.childNodes[0]);
}
function evaluate(test, contextNode, axis) {
if (hasGroups) {
solveGroups(test, contextNode);
}
if (hasFunctions) {
solveFunctions(test, contextNode, axis);
}
if (hasPaths) {
solvePaths(test, contextNode);
}
if (hasUnions) {
solveUnions(test, contextNode);
}
if (hasMultiplicativeExpressions) {
solveMultiplicativeExpressions(test, contextNode);
}
if (hasAdditiveExpressions) {
solveAdditiveExpressions(test, contextNode);
}
if (hasRelationalExpressions) {
solveRelationalExpressions(test, contextNode);
}
if (hasEqualityExpressions) {
solveEqualityExpressions(test, contextNode);
}
if (hasLogicalAndExpressions) {
solveLogicalAndExpressions(test, contextNode);
}
if (hasLogicalOrExpressions) {
solveLogicalOrExpressions(test, contextNode);
}
return(test.childNodes[0]);
}
static function solveEqualityExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Operator) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.EQUALS :
test.childNodes.splice(_local1 - 1, 3, isEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.NOT_EQUALS :
test.childNodes.splice(_local1 - 1, 3, isNotEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
}
_local1++;
}
}
static function solveMultiplicativeExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.MULTIPLY :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) * Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.MOD :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) % Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.DIV :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) / Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveAdditiveExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.PLUS :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) + Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.MINUS :
test.childNodes.splice(_local1 - 1, 3, Number(test.childNodes[_local1 - 1]) - Number(test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveLogicalAndExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1].nodeValue == com.xfactorstudio.xml.xpath.Operators.AND) {
var _local3 = ((isTrue(test.childNodes[_local1 - 1]) && (isTrue(test.childNodes[_local1 + 1]))) ? true : false);
test.childNodes.splice(_local1 - 1, 3, _local3);
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveLogicalOrExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1].nodeValue == com.xfactorstudio.xml.xpath.Operators.OR) {
var _local3 = ((isTrue(test.childNodes[_local1 - 1]) || (isTrue(test.childNodes[_local1 + 1]))) ? true : false);
test.childNodes.splice(_local1 - 1, 3, _local3);
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solveRelationalExpressions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
switch (test.childNodes[_local1].nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN :
test.childNodes.splice(_local1 - 1, 3, isGreaterThan(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN :
test.childNodes.splice(_local1 - 1, 3, isLessThan(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN_OR_EQUAL_TO :
test.childNodes.splice(_local1 - 1, 3, isGreaterThanOrEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
break;
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN_OR_EQUAL_TO :
test.childNodes.splice(_local1 - 1, 3, isLessThanOrEqualTo(test.childNodes[_local1 - 1], test.childNodes[_local1 + 1]));
_local1 = _local1 - 2;
}
_local1++;
}
}
static function solvePaths(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Path) {
test.childNodes[_local1] = test.childNodes[_local1].execute([contextNode]);
}
_local1++;
}
}
static function solveUnions(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Operator) {
if (test.childNodes[_local1].nodeValue == com.xfactorstudio.xml.xpath.Operators.UNION) {
test.childNodes[_local1 - 1] = test.childNodes[_local1 - 1].concat(test.childNodes[_local1 + 1]);
test.childNodes[_local1 - 1].sort(sortByIndexFunction);
test.childNodes.splice(_local1 - 1, 3, test.childNodes[_local1 - 1]);
_local1 = _local1 - 2;
}
}
_local1++;
}
}
static function solveGroups(test, contextNode) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Group) {
var _local3 = test.childNodes[_local1].execute([contextNode]);
test.childNodes.splice(_local1, 1, _local3);
}
_local1++;
}
}
static function solveFunctions(test, contextNode, axis) {
var _local1 = 0;
while (_local1 < test.childNodes.length) {
if (test.childNodes[_local1] instanceof com.xfactorstudio.xml.xpath.types.Func) {
var _local3 = test.childNodes[_local1].execute([contextNode], axis);
test.childNodes.splice(_local1, 1, _local3);
}
_local1++;
}
}
static function sortByIndexFunction(a, b) {
var _local3 = getDocumentOrder(a);
var _local2 = getDocumentOrder(b);
var _local1 = 0;
while (_local1 < _local3.length) {
if (_local2[_local1] == null) {
return(1);
}
if (_local3[_local1] > _local2[_local1]) {
return(1);
}
if (_local3[_local1] < _local2[_local1]) {
return(-1);
}
_local1++;
}
if (_local2.length > _local3.length) {
return(-1);
}
return(0);
}
static function isEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 == _local1.val2);
}
static function isNotEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 != _local1.val2);
}
static function isGreaterThan(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 > _local1.val2);
}
static function isLessThan(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 < _local1.val2);
}
static function isGreaterThanOrEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 >= _local1.val2);
}
static function isLessThanOrEqualTo(val1, val2) {
var _local1 = convertForComparison(val1, val2);
return(_local1.val1 <= _local1.val2);
}
static function getChildIndex(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
}
if (_local2[_local1] === kid) {
return(_local3);
}
_local1++;
}
return(0);
}
static function getDocumentOrder(kid) {
var _local2 = [];
while (kid.parentNode != null) {
_local2.push(getIndex(kid));
kid = kid.parentNode;
}
return(_local2.reverse());
}
static function getIndex(kid) {
var _local3 = kid.parentNode.childNodes;
var _local2 = 0;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2++;
if (_local3[_local1] === kid) {
return(_local2);
}
_local1++;
}
return(0);
}
static function getIndexOfType(kid) {
var _local2 = kid.parentNode.childNodes;
var _local3 = 0;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == kid.nodeName) {
_local3++;
if (_local2[_local1] === kid) {
return(_local3);
}
}
_local1++;
}
return(0);
}
static function convertForComparison(val1, val2) {
var _local2;
var _local1;
_local2 = typeof(val1);
_local1 = typeof(val2);
if ((_local2 == "boolean") || (_local1 == "boolean")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(val2);
return({val1:val1, val2:val2});
}
if ((_local2 == "number") || (_local1 == "number")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toNumber(val2);
return({val1:val1, val2:val2});
}
if ((_local2 == "string") || (_local1 == "string")) {
val1 = com.xfactorstudio.xml.xpath.XPathFunctions.toString(val1);
val2 = com.xfactorstudio.xml.xpath.XPathFunctions.toString(val2);
return({val1:val1, val2:val2});
}
return({val1:val1, val2:val2});
}
static function isTrue(test) {
return(com.xfactorstudio.xml.xpath.XPathFunctions.toBoolean(test));
}
var nodeName = "predicate";
var hasGroups = false;
var hasPaths = false;
var hasFunctions = false;
var hasUnions = false;
var hasAdditiveExpressions = false;
var hasMultiplicativeExpressions = false;
var hasRelationalExpressions = false;
var hasEqualityExpressions = false;
var hasLogicalAndExpressions = false;
var hasLogicalOrExpressions = false;
}
Symbol 344 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Operator] Frame 0
class com.xfactorstudio.xml.xpath.types.Operator extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue, parentNode;
function Operator (type) {
super();
nodeValue = type;
}
function register() {
switch (nodeValue) {
case com.xfactorstudio.xml.xpath.Operators.EQUALS :
case com.xfactorstudio.xml.xpath.Operators.NOT_EQUALS :
parentNode.hasEqualityExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.MULTIPLY :
case com.xfactorstudio.xml.xpath.Operators.MOD :
case com.xfactorstudio.xml.xpath.Operators.DIV :
parentNode.hasMultiplicativeExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.PLUS :
case com.xfactorstudio.xml.xpath.Operators.MINUS :
parentNode.hasAdditiveExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.AND :
parentNode.hasLogicalAndExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.OR :
parentNode.hasLogicalOrExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN :
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN :
case com.xfactorstudio.xml.xpath.Operators.GREATER_THAN_OR_EQUAL_TO :
case com.xfactorstudio.xml.xpath.Operators.LESS_THAN_OR_EQUAL_TO :
parentNode.hasRelationalExpressions = true;
break;
case com.xfactorstudio.xml.xpath.Operators.UNION :
parentNode.hasUnions = true;
}
}
function clone() {
return(this);
}
var nodeName = "operator";
}
Symbol 345 MovieClip [__Packages.com.xfactorstudio.xml.xpath.Operators] Frame 0
class com.xfactorstudio.xml.xpath.Operators
{
function Operators () {
}
static var PLUS = 200;
static var MINUS = 201;
static var EQUALS = 202;
static var NOT = 203;
static var GREATER_THAN = 204;
static var LESS_THAN = 205;
static var NOT_EQUALS = 206;
static var GREATER_THAN_OR_EQUAL_TO = 207;
static var LESS_THAN_OR_EQUAL_TO = 208;
static var MULTIPLY = 209;
static var MOD = 210;
static var DIV = 211;
static var AND = 212;
static var OR = 213;
static var UNION = 214;
}
Symbol 346 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Path] Frame 0
class com.xfactorstudio.xml.xpath.types.Path extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var parentNode, childNodes;
function Path () {
super();
}
function register() {
parentNode.hasPaths = true;
}
function appendChild(child) {
if ((childNodes.length == 0) && (child.nodeValue == com.xfactorstudio.xml.xpath.Axes.SELF)) {
childNodes.push(new com.xfactorstudio.xml.xpath.types.Axis(com.xfactorstudio.xml.xpath.Axes.CHILD));
childNodes[childNodes.length - 1].parentNode = this;
}
if (((!(childNodes[childNodes.length - 1] instanceof com.xfactorstudio.xml.xpath.types.Axis)) && (!(child instanceof com.xfactorstudio.xml.xpath.types.Axis))) && (!(child instanceof com.xfactorstudio.xml.xpath.types.Predicate))) {
childNodes.push(new com.xfactorstudio.xml.xpath.types.Axis(com.xfactorstudio.xml.xpath.Axes.CHILD));
childNodes[childNodes.length - 1].parentNode = this;
}
childNodes.push(child);
childNodes[childNodes.length - 1].parentNode = this;
return(childNodes[childNodes.length - 1]);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Path();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local2 = 0;
while (_local2 < childNodes.length) {
context = childNodes[_local2].execute(context);
_local2++;
}
return(context);
}
var nodeName = "path";
}
Symbol 347 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Axis] Frame 0
class com.xfactorstudio.xml.xpath.types.Axis extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue;
function Axis (axis) {
super();
nodeValue = axis;
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Axis();
super.clone(_local2);
return(_local2);
}
function execute(context) {
var _local3 = new Array();
var _local2 = 0;
while (_local2 < context.length) {
_local3 = _local3.concat(com.xfactorstudio.xml.xpath.XPathAxes[com.xfactorstudio.xml.xpath.Axes.getName(Number(nodeValue))].call(this, context[_local2]));
_local2++;
}
return(_local3);
}
var nodeName = "axis";
}
Symbol 348 MovieClip [__Packages.com.xfactorstudio.xml.xpath.types.Identifier] Frame 0
class com.xfactorstudio.xml.xpath.types.Identifier extends com.xfactorstudio.xml.xpath.types.QueryPart
{
var nodeValue;
function Identifier (name) {
super();
nodeValue = name;
}
function execute(context) {
var _local2 = com.xfactorstudio.xml.xpath.XPath.getNamedNodes(context, nodeValue);
return(_local2);
}
function clone() {
var _local2 = new com.xfactorstudio.xml.xpath.types.Identifier();
super.clone(_local2);
return(_local2);
}
var nodeName = "identifier";
}
Symbol 349 MovieClip [__Packages.com.robertprenner.Ease] Frame 0
class com.robertprenner.Ease
{
function Ease () {
}
static function linearTween(t, b, c, d) {
return(((c * t) / d) + b);
}
static function inQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function outQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function inOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function inCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function outCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function inOutCubic(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function inQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function outQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function inOutQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function inQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function outQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function inOutQuint(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 function inSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function outSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function inOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function inExpo(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function outExpo(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function inOutExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function inCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function outCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function inOutCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
}
Symbol 350 MovieClip [__Packages.mx.rpc.RelayResponder] Frame 0
class mx.rpc.RelayResponder extends Object implements mx.rpc.Responder
{
var __obj, __onFault, __onResult;
function RelayResponder (resp, resultFunc, faultFunc) {
super();
__obj = resp;
__onFault = faultFunc;
__onResult = resultFunc;
}
function onFault(fault) {
__obj[__onFault](fault);
}
function onResult(result) {
__obj[__onResult](result);
}
}
Symbol 351 MovieClip [__Packages.com.jc.date.DateFormat] Frame 0
class com.jc.date.DateFormat
{
function DateFormat () {
}
static function createDate(date) {
var _local5 = new Array();
var _local7 = 0;
var _local6 = 0;
var _local3 = new String();
var _local1 = 0;
while (_local1 < delimeters.length) {
var _local2 = delimeters[_local1];
if (date.indexOf(_local2) != -1) {
_local3 = _local2;
}
_local1++;
}
_local5 = date.split(_local3);
return(new Date(_local5[2], _local5[0] - 1, _local5[1]));
}
static function getZuDate(d) {
if (d == undefined) {
return(undefined);
}
var _local2 = getMonthAsString(d.getMonth());
var _local3 = getDayAsString(d.getDay());
return((((d.getDate() + ". ") + _local2) + " ") + d.getFullYear());
}
static function getTaoDate(d) {
var _local3 = getMonthAsString(d.getMonth());
var _local1 = getDayAsString(d.getDay());
return((((d.getDate() + ". ") + _local3) + " ") + _local1);
}
static function getMonthAsString(month) {
return(monthNames_array[month]);
}
static function getDayAsString(day) {
var _local1 = dayOfWeek_array[day];
return(_local1);
}
static var dayOfWeek_array = new Array("SUNDAY", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY");
static var monthNames_array = new Array("JANUARY", "FEBRUARY", "MARCH", "APRIL", "MAY", "JUNE", "JULY", "AUGUST", "SEPTEMBER", "OCTOBER", "NOVEMBER", "DECEMBER");
static var delimeters = ["-", "/"];
}
Symbol 6 MovieClip [__Packages.mx.video.FLVPlayback] Frame 0
class mx.video.FLVPlayback extends MovieClip
{
var _autoPlay, _autoRewind, _autoSize, _bufferTime, _contentPath, _cuePoints, _idleTimeout, _isLive, _aspectRatio, _seekToPrevOffset, _playheadUpdateInterval, _progressInterval, _totalTime, _transform, _volume, _skinAutoHide, _bufferingBarHides, _origHeight, _prevHeight, __height, _height, _origWidth, _prevWidth, __width, _width, _scaleX, _scaleY, _xscale, _yscale, _preSeekTime, _firstStreamReady, _firstStreamShown, _activeVP, _visibleVP, _topVP, _vp, _vpState, _cpMgr, boundingBox_mc, preview_mc, dispatchEvent, _uiMgr, _bufferingBar, _backButton, __get__cuePoints, _forwardButton, _muteButton, _pauseButton, _playButton, _playPauseButton, _seekBar, _seekBarInterval, _seekBarScrubTolerance, _skin, _stopButton, _visible, _volumeBar, _volumeBarInterval, _volumeBarScrubTolerance, _x, _y, attachMovie, createEmptyMovieClip;
function FLVPlayback () {
super();
mx.events.EventDispatcher.initialize(this);
if (_autoPlay == undefined) {
_autoPlay = true;
}
if (_autoRewind == undefined) {
_autoRewind = true;
}
if (_autoSize == undefined) {
_autoSize = false;
}
if (_bufferTime == undefined) {
_bufferTime = 0.1;
}
if (_contentPath == undefined) {
_contentPath = "";
}
if (_cuePoints == undefined) {
_cuePoints = null;
}
if (_idleTimeout == undefined) {
_idleTimeout = mx.video.VideoPlayer.DEFAULT_IDLE_TIMEOUT_INTERVAL;
}
if (_isLive == undefined) {
_isLive = false;
}
if (_aspectRatio == undefined) {
_aspectRatio = true;
}
if (_seekToPrevOffset == undefined) {
_seekToPrevOffset = SEEK_TO_PREV_OFFSET_DEFAULT;
}
if (_playheadUpdateInterval == undefined) {
_playheadUpdateInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_PROGRESS_INTERVAL;
}
if (_progressInterval == undefined) {
_progressInterval = mx.video.VideoPlayer.DEFAULT_UPDATE_TIME_INTERVAL;
}
if (_totalTime == undefined) {
_totalTime = 0;
}
if (_transform == undefined) {
_transform = null;
}
if (_volume == undefined) {
_volume = 100;
}
if (_skinAutoHide == undefined) {
_skinAutoHide = false;
}
if (_bufferingBarHides == undefined) {
_bufferingBarHides = false;
}
_origHeight = (_prevHeight = (__height = _height));
_origWidth = (_prevWidth = (__width = _width));
_scaleX = 100;
_scaleY = 100;
_xscale = 100;
_yscale = 100;
_preSeekTime = -1;
_firstStreamReady = false;
_firstStreamShown = false;
createUIManager();
_activeVP = 0;
_visibleVP = 0;
_topVP = 0;
_vp = new Array();
_vpState = new Array();
_cpMgr = new Array();
createVideoPlayer(0);
_vp[0].visible = false;
_vp[0].volume = 0;
boundingBox_mc._visible = false;
boundingBox_mc.unloadMovie();
delete boundingBox_mc;
if (_global.isLivePreview) {
createLivePreviewMovieClip();
setSize(__width, __height);
}
_cpMgr[0].processCuePointsProperty(_cuePoints);
delete _cuePoints;
_cuePoints = null;
}
function setSize(w, h) {
if (_global.isLivePreview) {
if (preview_mc == undefined) {
createLivePreviewMovieClip();
}
preview_mc.box_mc._width = w;
preview_mc.box_mc._height = h;
if ((preview_mc.box_mc._width < preview_mc.icon_mc._width) || (preview_mc.box_mc._height < preview_mc.icon_mc._height)) {
preview_mc.icon_mc._visible = false;
} else {
preview_mc.icon_mc._visible = true;
preview_mc.icon_mc._x = (preview_mc.box_mc._width - preview_mc.icon_mc._width) / 2;
preview_mc.icon_mc._y = (preview_mc.box_mc._height - preview_mc.icon_mc._height) / 2;
}
}
if ((w == width) && (h == height)) {
return(undefined);
}
_prevWidth = (__width = w);
_prevHeight = (__height = h);
var _local3 = 0;
while (_local3 < _vp.length) {
if (_vp[_local3] != undefined) {
_vp[_local3].setSize(w, h);
}
_local3++;
}
dispatchEvent({type:"resize", x:x, y:y, width:w, height:h});
}
function setScale(xs, ys) {
if ((xs == scaleX) && (ys == scaleY)) {
return(undefined);
}
_scaleX = xs;
_scaleY = ys;
var _local2 = 0;
while (_local2 < _vp.length) {
if (_vp[_local2] != undefined) {
_vp[_local2].setSize((_origWidth * xs) / 100, (_origHeight * ys) / 100);
}
_local2++;
}
dispatchEvent({type:"resize", x:x, y:y, width:width, height:height});
}
function handleEvent(e) {
var _local3 = e.state;
if (((e.state != undefined) && (e.target._name == _visibleVP)) && (scrubbing)) {
_local3 = SEEKING;
}
if (e.type == "metadataReceived") {
_cpMgr[e.target._name].processFLVCuePoints(e.info.cuePoints);
dispatchEvent({type:e.type, info:e.info, vp:e.target._name});
} else if (e.type == "cuePoint") {
if (_cpMgr[e.target._name].isFLVCuePointEnabled(e.info)) {
dispatchEvent({type:e.type, info:e.info, vp:e.target._name});
}
} else if (e.type == "rewind") {
dispatchEvent({type:e.type, auto:true, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
_cpMgr[e.target._name].resetASCuePointIndex(e.playheadTime);
} else if (e.type == "resize") {
dispatchEvent({type:e.type, x:x, y:y, width:width, height:height, auto:true, vp:e.target._name});
_prevWidth = __width;
_prevHeight = __height;
} else if (e.type == "playheadUpdate") {
dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
if ((_preSeekTime >= 0) && (e.target.state != SEEKING)) {
var _local5 = _preSeekTime;
_preSeekTime = -1;
_cpMgr[e.target._name].resetASCuePointIndex(e.playheadTime);
dispatchEvent({type:"seek", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
if (_local5 < e.playheadTime) {
dispatchEvent({type:"fastForward", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
} else if (_local5 > e.playheadTime) {
dispatchEvent({type:"rewind", auto:false, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
}
}
_cpMgr[e.target._name].dispatchASCuePoints();
} else if (e.type == "stateChange") {
var _local4 = e.target._name;
if ((_local4 == _visibleVP) && (scrubbing)) {
return(undefined);
}
if (e.state == mx.video.VideoPlayer.RESIZING) {
return(undefined);
}
if (((_vpState[_local4].prevState == LOADING) && (_vpState[_local4].autoPlay)) && (e.state == STOPPED)) {
return(undefined);
}
_vpState[_local4].prevState = e.state;
dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
if (_vp[e.target._name].state != _local3) {
return(undefined);
}
switch (_local3) {
case BUFFERING :
dispatchEvent({type:"buffering", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
break;
case PAUSED :
dispatchEvent({type:"paused", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
break;
case PLAYING :
dispatchEvent({type:"playing", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
break;
case STOPPED :
dispatchEvent({type:"stopped", state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
}
} else if (e.type == "progress") {
dispatchEvent({type:e.type, bytesLoaded:e.bytesLoaded, bytesTotal:e.bytesTotal, vp:e.target._name});
} else if (e.type == "ready") {
var _local4 = e.target._name;
if (!_firstStreamReady) {
if (_local4 == _visibleVP) {
_firstStreamReady = true;
if (_uiMgr.__get__skinReady() && (!_firstStreamShown)) {
_uiMgr.__set__visible(true);
showFirstStream();
}
}
} else if ((_firstStreamShown && (_local3 == STOPPED)) && _vpState[_local4].autoPlay) {
_vp[_local4].play();
}
dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
} else if ((e.type == "close") || (e.type == "complete")) {
dispatchEvent({type:e.type, state:_local3, playheadTime:e.playheadTime, vp:e.target._name});
}
}
function load(contentPath, totalTime, isLive) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
if (((contentPath == undefined) || (contentPath == null)) || (contentPath == "")) {
return(undefined);
}
autoPlay = (false);
if (totalTime != undefined) {
this.totalTime = (totalTime);
}
if (isLive != undefined) {
this.isLive = (isLive);
}
this.contentPath = (contentPath);
}
function play(contentPath, totalTime, isLive) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
if (contentPath == undefined) {
_vp[_activeVP].play();
} else {
autoPlay = (true);
if (totalTime != undefined) {
this.totalTime = (totalTime);
}
if (isLive != undefined) {
this.isLive = (isLive);
}
this.contentPath = (contentPath);
}
}
function pause() {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
_vp[_activeVP].pause();
}
function stop() {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
_vp[_activeVP].stop();
}
function seek(time) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
_preSeekTime = playheadTime;
_vp[_activeVP].seek(time);
}
function seekSeconds(time) {
seek(time);
}
function seekPercent(percent) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
if (((((percent < 0) || (percent > 100)) || (_vp[_activeVP].totalTime == undefined)) || (_vp[_activeVP].totalTime == null)) || (_vp[_activeVP].totalTime <= 0)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK);
}
seek((_vp[_activeVP].totalTime * percent) / 100);
}
function get playheadPercentage() {
if (((_vp[_activeVP].totalTime == undefined) || (_vp[_activeVP].totalTime == null)) || (_vp[_activeVP].totalTime <= 0)) {
return(undefined);
}
return((_vp[_activeVP].playheadTime / _vp[_activeVP].totalTime) * 100);
}
function set playheadPercentage(percent) {
seekPercent(percent);
//return(playheadPercentage);
}
function seekToNavCuePoint(timeNameOrCuePoint) {
var _local3;
switch (typeof(timeNameOrCuePoint)) {
case "string" :
_local3 = {name:timeNameOrCuePoint};
break;
case "number" :
_local3 = {time:timeNameOrCuePoint};
break;
case "object" :
_local3 = timeNameOrCuePoint;
}
if (((_local3.name == null) || (_local3.name == undefined)) || (typeof(_local3.name) != "string")) {
seekToNextNavCuePoint(_local3.time);
return(undefined);
}
if (isNaN(_local3.time)) {
_local3.time = 0;
}
var _local2 = findNearestCuePoint(timeNameOrCuePoint, NAVIGATION);
while ((_local2 != null) && ((_local2.time < _local3.time) || (!isFLVCuePointEnabled(_local2)))) {
_local2 = findNextCuePointWithName(_local2);
}
if (_local2 == null) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK);
}
seek(_local2.time);
}
function seekToNextNavCuePoint(time) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
if (isNaN(time) || (time < 0)) {
time = _vp[_activeVP].playheadTime + 0.001;
}
var _local3;
_local3 = findNearestCuePoint(time, NAVIGATION);
if (_local3 == null) {
seek(_vp[_activeVP].totalTime);
return(undefined);
}
var _local2 = _local3.index;
if (_local3.time < time) {
_local2++;
}
while ((_local2 < _local3.array.length) && (!isFLVCuePointEnabled(_local3.array[_local2]))) {
_local2++;
}
if (_local2 >= _local3.array.length) {
var _local5 = _vp[_activeVP].totalTime;
if (_local3.array[_local3.array.length - 1].time > _local5) {
_local5 = _local3.array[_local3.array.length - 1];
}
seek(_local5);
} else {
seek(_local3.array[_local2].time);
}
}
function seekToPrevNavCuePoint(time) {
if (_vp[_activeVP] == undefined) {
return(undefined);
}
if (isNaN(time) || (time < 0)) {
time = _vp[_activeVP].playheadTime;
}
var _local3 = findNearestCuePoint(time, NAVIGATION);
if (_local3 == null) {
seek(0);
return(undefined);
}
var _local2 = _local3.index;
while ((_local2 >= 0) && ((!isFLVCuePointEnabled(_local3.array[_local2])) || (_local3.array[_local2].time >= (time - _seekToPrevOffset)))) {
_local2--;
}
if (_local2 < 0) {
seek(0);
} else {
seek(_local3.array[_local2].time);
}
}
function addASCuePoint(timeOrCuePoint, name, parameters) {
return(_cpMgr[_activeVP].addASCuePoint(timeOrCuePoint, name, parameters));
}
function removeASCuePoint(timeNameOrCuePoint) {
return(_cpMgr[_activeVP].removeASCuePoint(timeNameOrCuePoint));
}
function findCuePoint(timeNameOrCuePoint, type) {
switch (type) {
case "event" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].eventCuePoints, false, timeNameOrCuePoint));
case "navigation" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].navCuePoints, false, timeNameOrCuePoint));
case "flv" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].flvCuePoints, false, timeNameOrCuePoint));
case "actionscript" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].asCuePoints, false, timeNameOrCuePoint));
case "all" :
}
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].allCuePoints, false, timeNameOrCuePoint));
}
function findNearestCuePoint(timeNameOrCuePoint, type) {
switch (type) {
case "event" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].eventCuePoints, true, timeNameOrCuePoint));
case "navigation" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].navCuePoints, true, timeNameOrCuePoint));
case "flv" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].flvCuePoints, true, timeNameOrCuePoint));
case "actionscript" :
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].asCuePoints, true, timeNameOrCuePoint));
case "all" :
}
return(_cpMgr[_activeVP].getCuePoint(_cpMgr[_activeVP].allCuePoints, true, timeNameOrCuePoint));
}
function findNextCuePointWithName(cuePoint) {
return(_cpMgr[_activeVP].getNextCuePointWithName(cuePoint));
}
function setFLVCuePointEnabled(enabled, timeNameOrCuePoint) {
return(_cpMgr[_activeVP].setFLVCuePointEnabled(enabled, timeNameOrCuePoint));
}
function isFLVCuePointEnabled(timeNameOrCuePoint) {
return(_cpMgr[_activeVP].isFLVCuePointEnabled(timeNameOrCuePoint));
}
function getNextHighestDepth() {
var _local2 = super.getNextHighestDepth();
return(((_local2 < 1000) ? 1000 : (_local2)));
}
function bringVideoPlayerToFront(index) {
if ((index == _topVP) || (_vp[index] == undefined)) {
return(undefined);
}
_vp[_topVP].swapDepths(_vp[index].getDepth());
_topVP = index;
}
function getVideoPlayer(index) {
return(_vp[index]);
}
function closeVideoPlayer(index) {
if (_vp[index] == undefined) {
return(undefined);
}
if (index == 0) {
throw new mx.video.VideoError(mx.video.VideoError.DELETE_DEFAULT_PLAYER);
}
if (_visibleVP == index) {
visibleVideoPlayerIndex = (0);
}
if (_activeVP == index) {
activeVideoPlayerIndex = (0);
}
_vp[index].close();
_vp[index].unloadMovie();
delete _vp[index];
_vp[index] = undefined;
}
function get activeVideoPlayerIndex() {
return(_activeVP);
}
function set activeVideoPlayerIndex(i) {
if (_activeVP == i) {
return;
}
if (_vp[_activeVP].onEnterFrame != undefined) {
doContentPathConnect();
}
_activeVP = i;
if (_vp[_activeVP] == undefined) {
createVideoPlayer(_activeVP);
_vp[_activeVP].visible = false;
_vp[_activeVP].volume = 0;
}
//return(activeVideoPlayerIndex);
}
function get autoPlay() {
if (_vpState[_activeVP] == undefined) {
return(_autoPlay);
}
return(_vpState[_activeVP].autoPlay);
}
function set autoPlay(flag) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_autoPlay = flag;
}
_vpState[_activeVP].autoPlay = flag;
//return(autoPlay);
}
function get autoRewind() {
if (_vp[_activeVP] == undefined) {
return(_autoRewind);
}
return(_vp[_activeVP].autoRewind);
}
function set autoRewind(flag) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_autoRewind = flag;
}
_vp[_activeVP].autoRewind = flag;
//return(autoRewind);
}
function get autoSize() {
if (_vp[_activeVP] == undefined) {
return(_autoSize);
}
return(_vp[_activeVP].autoSize);
}
function set autoSize(flag) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_autoSize = flag;
}
_vp[_activeVP].autoSize = flag;
//return(autoSize);
}
function get bitrate() {
return(ncMgr.getBitrate());
}
function set bitrate(b) {
ncMgr.setBitrate(b);
//return(bitrate);
}
function get buffering() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_vp[_activeVP].state == BUFFERING);
}
function get bufferingBar() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_bufferingBar = _uiMgr.getControl(mx.video.UIManager.BUFFERING_BAR);
}
return(_bufferingBar);
}
function set bufferingBar(s) {
_bufferingBar = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.setControl(mx.video.UIManager.BUFFERING_BAR, s);
}
//return(bufferingBar);
}
function get bufferingBarHidesAndDisablesOthers() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_bufferingBarHides = _uiMgr.bufferingBarHidesAndDisablesOthers;
}
return(_bufferingBarHides);
}
function set bufferingBarHidesAndDisablesOthers(b) {
_bufferingBarHides = b;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.__set__bufferingBarHidesAndDisablesOthers(b);
}
//return(bufferingBarHidesAndDisablesOthers);
}
function get backButton() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_backButton = _uiMgr.getControl(mx.video.UIManager.BACK_BUTTON);
}
return(_backButton);
}
function set backButton(s) {
_backButton = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.setControl(mx.video.UIManager.BACK_BUTTON, s);
}
//return(backButton);
}
function get bufferTime() {
if (_vp[_activeVP] == undefined) {
return(_bufferTime);
}
return(_vp[_activeVP].bufferTime);
}
function set bufferTime(aTime) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_bufferTime = aTime;
}
_vp[_activeVP].bufferTime = aTime;
//return(bufferTime);
}
function get bytesLoaded() {
return(_vp[_activeVP].bytesLoaded);
}
function get bytesTotal() {
return(_vp[_activeVP].bytesTotal);
}
function get contentPath() {
if ((_vp[_activeVP] == undefined) || (_vp[_activeVP].onEnterFrame != undefined)) {
return(_contentPath);
}
return(_vp[_activeVP].url);
}
function set contentPath(url) {
if (_global.isLivePreview) {
return;
}
if (_vp[_activeVP] == undefined) {
if (url == _contentPath) {
return;
}
_contentPath = url;
} else {
if (_vp[_activeVP].url == url) {
return;
}
_vpState[_activeVP].minProgressPercent = undefined;
if (_vp[_activeVP].onEnterFrame != undefined) {
delete _vp[_activeVP].onEnterFrame;
_vp[_activeVP].onEnterFrame = undefined;
}
_cpMgr[_activeVP].reset();
if (_vpState[_activeVP].autoPlay && (_firstStreamShown)) {
_vp[_activeVP].play(url, _vpState[_activeVP].isLive, _vpState[_activeVP].totalTime);
} else {
_vp[_activeVP].load(url, _vpState[_activeVP].isLive, _vpState[_activeVP].totalTime);
}
_vpState[_activeVP].isLiveSet = false;
_vpState[_activeVP].totalTimeSet = false;
}
//return(contentPath);
}
function set cuePoints(cp) {
if (_cuePoints != undefined) {
return;
}
_cuePoints = cp;
//return(__get__cuePoints());
}
function get forwardButton() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_forwardButton = _uiMgr.getControl(mx.video.UIManager.FORWARD_BUTTON);
}
return(_forwardButton);
}
function set forwardButton(s) {
_forwardButton = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.setControl(mx.video.UIManager.FORWARD_BUTTON, s);
}
//return(forwardButton);
}
function get height() {
if (_global.isLivePreview) {
return(__height);
}
if (_vp[_visibleVP] != undefined) {
__height = _vp[_visibleVP].height;
}
return(__height);
}
function set height(h) {
setSize(width, h);
//return(height);
}
function get idleTimeout() {
if (_vp[_activeVP] == undefined) {
return(_idleTimeout);
}
return(_vp[_activeVP].idleTimeout);
}
function set idleTimeout(aTime) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_idleTimeout = aTime;
}
_vp[_activeVP].idleTimeout = aTime;
//return(idleTimeout);
}
function get isRTMP() {
if (_global.isLivePreview) {
return(true);
}
if (_vp[_activeVP] == undefined) {
return(undefined);
}
return(_vp[_activeVP].isRTMP);
}
function get isLive() {
if (_vp[_activeVP] == undefined) {
return(_isLive);
}
if (_vpState[_activeVP].isLiveSet) {
return(_vpState[_activeVP].isLive);
}
return(_vp[_activeVP].isLive);
}
function set isLive(flag) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_isLive = flag;
}
_vpState[_activeVP].isLive = flag;
_vpState[_activeVP].isLiveSet = true;
//return(isLive);
}
function get maintainAspectRatio() {
if (_vp[_activeVP] == undefined) {
return(_aspectRatio);
}
return(_vp[_activeVP].maintainAspectRatio);
}
function set maintainAspectRatio(flag) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_aspectRatio = flag;
}
_vp[_activeVP].maintainAspectRatio = flag;
//return(maintainAspectRatio);
}
function get metadata() {
if (_vp[_activeVP] == undefined) {
return(null);
}
return(_vp[_activeVP].metadata);
}
function get metadataLoaded() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_cpMgr[_activeVP].metadataLoaded);
}
function get muteButton() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_muteButton = _uiMgr.getControl(mx.video.UIManager.MUTE_BUTTON);
}
return(_muteButton);
}
function set muteButton(s) {
_muteButton = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.setControl(mx.video.UIManager.MUTE_BUTTON, s);
}
//return(muteButton);
}
function get ncMgr() {
if (_vp[_activeVP] == undefined) {
return(null);
}
return(_vp[_activeVP].ncMgr);
}
function get pauseButton() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_pauseButton = _uiMgr.getControl(mx.video.UIManager.PAUSE_BUTTON);
}
return(_pauseButton);
}
function set pauseButton(s) {
_pauseButton = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.setControl(mx.video.UIManager.PAUSE_BUTTON, s);
}
//return(pauseButton);
}
function get paused() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_vp[_activeVP].state == PAUSED);
}
function get playButton() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_playButton = _uiMgr.getControl(mx.video.UIManager.PLAY_BUTTON);
}
return(_playButton);
}
function set playButton(s) {
_playButton = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.setControl(mx.video.UIManager.PLAY_BUTTON, s);
}
//return(playButton);
}
function get playheadTime() {
if (_vp[_activeVP] == undefined) {
return(0);
}
return(_vp[_activeVP].playheadTime);
}
function set playheadTime(position) {
seek(position);
//return(playheadTime);
}
function get playheadUpdateInterval() {
if (_vp[_activeVP] == undefined) {
return(_playheadUpdateInterval);
}
return(_vp[_activeVP].playheadUpdateInterval);
}
function set playheadUpdateInterval(aTime) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_playheadUpdateInterval = aTime;
}
_cpMgr[_activeVP].playheadUpdateInterval = aTime;
_vp[_activeVP].playheadUpdateInterval = aTime;
//return(playheadUpdateInterval);
}
function get playing() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_vp[_activeVP].state == PLAYING);
}
function get playPauseButton() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_playPauseButton = _uiMgr.getControl(mx.video.UIManager.PLAY_PAUSE_BUTTON);
}
return(_playPauseButton);
}
function set playPauseButton(s) {
_playPauseButton = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.setControl(mx.video.UIManager.PLAY_PAUSE_BUTTON, s);
}
//return(playPauseButton);
}
function get preferredHeight() {
if (_vp[_activeVP] == undefined) {
return(0);
}
return(_vp[_activeVP].videoHeight);
}
function get preferredWidth() {
if (_vp[_activeVP] == undefined) {
return(0);
}
return(_vp[_activeVP].videoWidth);
}
function get progressInterval() {
if (_vp[_activeVP] == undefined) {
return(_progressInterval);
}
return(_vp[_activeVP].progressInterval);
}
function set progressInterval(aTime) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_progressInterval = aTime;
}
_vp[_activeVP].progressInterval = aTime;
//return(progressInterval);
}
function get scaleX() {
if (_vp[_visibleVP] != undefined) {
_scaleX = (_vp[_visibleVP].width / _origWidth) * 100;
}
return(_scaleX);
}
function set scaleX(xs) {
setScale(xs, scaleY);
//return(scaleX);
}
function get scaleY() {
if (_vp[_visibleVP] != undefined) {
_scaleY = (_vp[_visibleVP].height / _origHeight) * 100;
}
return(_scaleY);
}
function set scaleY(ys) {
setScale(scaleX, ys);
//return(scaleY);
}
function get scrubbing() {
var _local2 = seekBar;
if ((_local2 == undefined) || (_local2.isDragging == undefined)) {
return(false);
}
return(_local2.isDragging);
}
function get seekBar() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_seekBar = _uiMgr.getControl(mx.video.UIManager.SEEK_BAR);
}
return(_seekBar);
}
function set seekBar(s) {
_seekBar = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.setControl(mx.video.UIManager.SEEK_BAR, s);
}
//return(seekBar);
}
function get seekBarInterval() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_seekBarInterval = _uiMgr.seekBarInterval;
}
return(_seekBarInterval);
}
function set seekBarInterval(s) {
_seekBarInterval = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.__set__seekBarInterval(_seekBarInterval);
}
//return(seekBarInterval);
}
function get seekBarScrubTolerance() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_seekBarScrubTolerance = _uiMgr.seekBarScrubTolerance;
}
return(_seekBarScrubTolerance);
}
function set seekBarScrubTolerance(s) {
_seekBarScrubTolerance = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.__set__seekBarScrubTolerance(_seekBarScrubTolerance);
}
//return(seekBarScrubTolerance);
}
function get seekToPrevOffset() {
return(_seekToPrevOffset);
}
function set seekToPrevOffset(s) {
_seekToPrevOffset = s;
//return(seekToPrevOffset);
}
function get skin() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_skin = _uiMgr.skin;
}
return(_skin);
}
function set skin(s) {
_skin = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.__set__skin(s);
}
//return(skin);
}
function get skinAutoHide() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_skinAutoHide = _uiMgr.skinAutoHide;
}
return(_skinAutoHide);
}
function set skinAutoHide(b) {
if (_global.isLivePreview) {
return;
}
_skinAutoHide = b;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.__set__skinAutoHide(b);
}
//return(skinAutoHide);
}
function get transform() {
return(_transform);
}
function set transform(s) {
_transform = s;
if (_vp[_activeVP] != undefined) {
_vp[_activeVP].transform = _transform;
}
//return(transform);
}
function get state() {
if (_global.isLivePreview) {
return(STOPPED);
}
if (_vp[_activeVP] == undefined) {
return(DISCONNECTED);
}
if ((_activeVP == _visibleVP) && (scrubbing)) {
return(SEEKING);
}
var _local3 = _vp[_activeVP].state;
if (_local3 == mx.video.VideoPlayer.RESIZING) {
return(LOADING);
}
if (((_vpState[_activeVP].prevState == LOADING) && (_vpState[_activeVP].autoPlay)) && (_local3 == STOPPED)) {
return(LOADING);
}
return(_local3);
}
function get stateResponsive() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_vp[_activeVP].stateResponsive);
}
function get stopButton() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_stopButton = _uiMgr.getControl(mx.video.UIManager.STOP_BUTTON);
}
return(_stopButton);
}
function set stopButton(s) {
_stopButton = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.setControl(mx.video.UIManager.STOP_BUTTON, s);
}
//return(stopButton);
}
function get stopped() {
if (_vp[_activeVP] == undefined) {
return(false);
}
return(_vp[_activeVP].state == STOPPED);
}
function get totalTime() {
if (_global.isLivePreview) {
return(1);
}
if (_vp[_activeVP] == undefined) {
return(_totalTime);
}
if (_vpState[_activeVP].totalTimeSet) {
return(_vpState[_activeVP].totalTime);
}
return(_vp[_activeVP].totalTime);
}
function set totalTime(aTime) {
if ((_activeVP == 0) || (_activeVP == undefined)) {
_totalTime = aTime;
}
_vpState[_activeVP].totalTime = aTime;
_vpState[_activeVP].totalTimeSet = true;
//return(totalTime);
}
function get visible() {
return(_visible);
}
function set visible(v) {
_visible = v;
//return(visible);
}
function get visibleVideoPlayerIndex() {
return(_visibleVP);
}
function set visibleVideoPlayerIndex(i) {
if (_visibleVP == i) {
return;
}
var _local2 = _visibleVP;
if (_vp[i] == undefined) {
createVideoPlayer(i);
}
var _local5 = (_vp[i].height != _vp[_visibleVP].height) || (_vp[i].width != _vp[_visibleVP].width);
_vp[_visibleVP].visible = false;
_vp[_visibleVP].volume = 0;
_visibleVP = i;
if (_firstStreamShown) {
_uiMgr.setupSkinAutoHide(_local2);
_vp[_visibleVP].visible = true;
if (!scrubbing) {
_vp[_visibleVP].volume = _volume;
}
} else if ((_vp[_visibleVP].stateResponsive && (_vp[_visibleVP].state != DISCONNECTED)) && (_uiMgr.__get__skinReady())) {
_uiMgr.__set__visible(true);
_uiMgr.setupSkinAutoHide(_local2);
_firstStreamReady = true;
showFirstStream();
}
if ((_vp[_local2].height != _vp[_visibleVP].height) || (_vp[_local2].width != _vp[_visibleVP].width)) {
dispatchEvent({type:"resize", x:x, y:y, width:width, height:height, auto:false, vp:_visibleVP});
}
_uiMgr.handleEvent({type:"stateChange", state:_vp[_visibleVP].state, vp:_visibleVP});
_uiMgr.handleEvent({type:"playheadUpdate", playheadTime:_vp[_visibleVP].playheadTime, vp:_visibleVP});
if (_vp[_visibleVP].isRTMP) {
_uiMgr.handleEvent({type:"ready", vp:_visibleVP});
} else {
_uiMgr.handleEvent({type:"progress", bytesLoaded:_vp[_visibleVP].bytesLoaded, bytesTotal:_vp[_visibleVP].bytesTotal, vp:_visibleVP});
}
//return(visibleVideoPlayerIndex);
}
function get volume() {
return(_volume);
}
function set volume(aVol) {
if (_volume == aVol) {
return;
}
_volume = aVol;
if (!scrubbing) {
_vp[_visibleVP].volume = _volume;
}
dispatchEvent({type:"volumeUpdate", volume:aVol});
//return(volume);
}
function get volumeBar() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_volumeBar = _uiMgr.getControl(mx.video.UIManager.VOLUME_BAR);
}
return(_volumeBar);
}
function set volumeBar(s) {
_volumeBar = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.setControl(mx.video.UIManager.VOLUME_BAR, s);
}
//return(volumeBar);
}
function get volumeBarInterval() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_volumeBarInterval = _uiMgr.volumeBarInterval;
}
return(_volumeBarInterval);
}
function set volumeBarInterval(s) {
_volumeBarInterval = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.__set__volumeBarInterval(_volumeBarInterval);
}
//return(volumeBarInterval);
}
function get volumeBarScrubTolerance() {
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_volumeBarScrubTolerance = _uiMgr.volumeBarScrubTolerance;
}
return(_volumeBarScrubTolerance);
}
function set volumeBarScrubTolerance(s) {
_volumeBarScrubTolerance = s;
if ((_uiMgr != null) && (_uiMgr != undefined)) {
_uiMgr.__set__volumeBarScrubTolerance(_volumeBarScrubTolerance);
}
//return(volumeBarScrubTolerance);
}
function get width() {
if (_global.isLivePreview) {
return(__width);
}
if (_vp[_visibleVP] != undefined) {
__width = _vp[_visibleVP].width;
}
return(__width);
}
function set width(w) {
setSize(w, height);
//return(width);
}
function get x() {
return(_x);
}
function set x(xpos) {
_x = xpos;
//return(x);
}
function get y() {
return(_y);
}
function set y(ypos) {
_y = ypos;
//return(y);
}
function createVideoPlayer(index) {
if (_global.isLivePreview) {
return(undefined);
}
var _local4 = width;
var _local5 = height;
_vp[index] = mx.video.VideoPlayer(attachMovie("VideoPlayer", String(index), VP_DEPTH_OFFSET + index));
_vp[index].setSize(_local4, _local5);
_topVP = index;
_vp[index].autoRewind = _autoRewind;
_vp[index].autoSize = _autoSize;
_vp[index].bufferTime = _bufferTime;
_vp[index].idleTimeout = _idleTimeout;
_vp[index].maintainAspectRatio = _aspectRatio;
_vp[index].playheadUpdateInterval = _playheadUpdateInterval;
_vp[index].progressInterval = _progressInterval;
_vp[index].transform = _transform;
_vp[index].volume = _volume;
if (index == 0) {
_vpState[index] = {id:index, isLive:_isLive, isLiveSet:true, totalTime:_totalTime, totalTimeSet:true, autoPlay:_autoPlay};
if (((_contentPath != null) && (_contentPath != undefined)) && (_contentPath != "")) {
_vp[index].onEnterFrame = mx.utils.Delegate.create(this, doContentPathConnect);
}
} else {
_vpState[index] = {id:index, isLive:false, isLiveSet:true, totalTime:0, totalTimeSet:true, autoPlay:false};
}
_vp[index].addEventListener("resize", this);
_vp[index].addEventListener("close", this);
_vp[index].addEventListener("complete", this);
_vp[index].addEventListener("cuePoint", this);
_vp[index].addEventListener("playheadUpdate", this);
_vp[index].addEventListener("progress", this);
_vp[index].addEventListener("metadataReceived", this);
_vp[index].addEventListener("stateChange", this);
_vp[index].addEventListener("ready", this);
_vp[index].addEventListener("rewind", this);
_cpMgr[index] = new mx.video.CuePointManager(this, index);
_cpMgr[index].playheadUpdateInterval = _playheadUpdateInterval;
}
function createUIManager() {
_uiMgr = new mx.video.UIManager(this);
_uiMgr.__set__visible(false);
if ((_backButton != undefined) && (_backButton != null)) {
_uiMgr.setControl(mx.video.UIManager.BACK_BUTTON, _backButton);
}
if ((_bufferingBar != undefined) && (_bufferingBar != null)) {
_uiMgr.setControl(mx.video.UIManager.BUFFERING_BAR, _bufferingBar);
}
_uiMgr.__set__bufferingBarHidesAndDisablesOthers(_bufferingBarHides);
if ((_forwardButton != undefined) && (_forwardButton != null)) {
_uiMgr.setControl(mx.video.UIManager.FORWARD_BUTTON, _forwardButton);
}
if ((_pauseButton != undefined) && (_pauseButton != null)) {
_uiMgr.setControl(mx.video.UIManager.PAUSE_BUTTON, _pauseButton);
}
if ((_playButton != undefined) && (_playButton != null)) {
_uiMgr.setControl(mx.video.UIManager.PLAY_BUTTON, _playButton);
}
if ((_playPauseButton != undefined) && (_playPauseButton != null)) {
_uiMgr.setControl(mx.video.UIManager.PLAY_PAUSE_BUTTON, _playPauseButton);
}
if ((_stopButton != undefined) && (_stopButton != null)) {
_uiMgr.setControl(mx.video.UIManager.STOP_BUTTON, _stopButton);
}
if ((_seekBar != undefined) && (_seekBar != null)) {
_uiMgr.setControl(mx.video.UIManager.SEEK_BAR, _seekBar);
}
if ((_seekBarInterval != undefined) && (_seekBarInterval != null)) {
_uiMgr.__set__seekBarInterval(_seekBarInterval);
}
if ((_seekBarScrubTolerance != undefined) && (_seekBarScrubTolerance != null)) {
_uiMgr.__set__seekBarScrubTolerance(_seekBarScrubTolerance);
}
if ((_skin != undefined) && (_skin != null)) {
_uiMgr.__set__skin(_skin);
}
if ((_skinAutoHide != undefined) && (_skinAutoHide != null)) {
_uiMgr.__set__skinAutoHide(_skinAutoHide);
}
if ((_muteButton != undefined) && (_muteButton != null)) {
_uiMgr.setControl(mx.video.UIManager.MUTE_BUTTON, _muteButton);
}
if ((_volumeBar != undefined) && (_volumeBar != null)) {
_uiMgr.setControl(mx.video.UIManager.VOLUME_BAR, _volumeBar);
}
if ((_volumeBarInterval != undefined) && (_volumeBarInterval != null)) {
_uiMgr.__set__volumeBarInterval(_volumeBarInterval);
}
if ((_volumeBarScrubTolerance != undefined) && (_volumeBarScrubTolerance != null)) {
_uiMgr.__set__volumeBarScrubTolerance(_volumeBarScrubTolerance);
}
}
function createLivePreviewMovieClip() {
preview_mc = createEmptyMovieClip("preview_mc", 10);
preview_mc.createEmptyMovieClip("box_mc", 10);
preview_mc.box_mc.beginFill(0);
preview_mc.box_mc.moveTo(0, 0);
preview_mc.box_mc.lineTo(0, 100);
preview_mc.box_mc.lineTo(100, 100);
preview_mc.box_mc.lineTo(100, 0);
preview_mc.box_mc.lineTo(0, 0);
preview_mc.box_mc.endFill();
preview_mc.attachMovie("Icon", "icon_mc", 20);
}
function doContentPathConnect() {
delete _vp[0].onEnterFrame;
_vp[0].onEnterFrame = undefined;
if (_global.isLivePreview) {
return(undefined);
}
if (_vpState[0].autoPlay && (_firstStreamShown)) {
_vp[0].play(_contentPath, _isLive, _totalTime);
} else {
_vp[0].load(_contentPath, _isLive, _totalTime);
}
_vpState[0].isLiveSet = false;
_vpState[0].totalTimeSet = false;
}
function showFirstStream() {
_firstStreamShown = true;
_vp[_visibleVP].visible = true;
if (!scrubbing) {
_vp[_visibleVP].volume = _volume;
}
var _local2 = 0;
while (_local2 < _vp.length) {
if (((_vp[_local2] != undefined) && (_vp[_local2].state == STOPPED)) && (_vpState[_local2].autoPlay)) {
_vp[_local2].play();
}
_local2++;
}
}
function _scrubStart() {
var _local2 = playheadTime;
_vp[_visibleVP].volume = 0;
dispatchEvent({type:"stateChange", state:SEEKING, playheadTime:_local2, vp:_visibleVP});
dispatchEvent({type:"scrubStart", state:SEEKING, playheadTime:_local2});
}
function _scrubFinish() {
var _local3 = playheadTime;
var _local2 = state;
_vp[_visibleVP].volume = _volume;
if (_local2 != SEEKING) {
dispatchEvent({type:"stateChange", state:_local2, playheadTime:_local3, vp:_visibleVP});
}
dispatchEvent({type:"scrubFinish", state:_local2, playheadTime:_local3});
}
function skinError(message) {
if (_firstStreamReady && (!_firstStreamShown)) {
showFirstStream();
}
dispatchEvent({type:"skinError", message:message});
}
function skinLoaded() {
if (_firstStreamReady) {
_uiMgr.__set__visible(true);
if (!_firstStreamShown) {
showFirstStream();
}
} else if (((_contentPath == undefined) || (_contentPath == null)) || (_contentPath == "")) {
_uiMgr.__set__visible(true);
}
dispatchEvent({type:"skinLoaded"});
}
static var version = "1.0.0.103";
static var DISCONNECTED = "disconnected";
static var STOPPED = "stopped";
static var PLAYING = "playing";
static var PAUSED = "paused";
static var BUFFERING = "buffering";
static var LOADING = "loading";
static var CONNECTION_ERROR = "connectionError";
static var REWINDING = "rewinding";
static var SEEKING = "seeking";
static var ALL = "all";
static var EVENT = "event";
static var NAVIGATION = "navigation";
static var FLV = "flv";
static var ACTIONSCRIPT = "actionscript";
static var VP_DEPTH_OFFSET = 100;
static var SEEK_TO_PREV_OFFSET_DEFAULT = 1;
}
Symbol 15 MovieClip [__Packages.mx.video.VideoPlayer] Frame 0
class mx.video.VideoPlayer extends MovieClip
{
var _state, _cachedState, _bufferState, _cachedPlayheadTime, _metadata, _startingPlay, _invalidSeekTime, _invalidSeekRecovery, _currentPos, _atEnd, _cmdQueue, _readyDispatched, _autoResizeDone, _lastUpdateTime, _sawSeekNotify, _updateTimeIntervalID, _updateTimeInterval, _updateProgressIntervalID, _updateProgressInterval, _idleTimeoutIntervalID, _idleTimeoutInterval, _autoResizeIntervalID, _rtmpDoStopAtEndIntervalID, _rtmpDoSeekIntervalID, _httpDoSeekIntervalID, _httpDoSeekCount, _finishAutoResizeIntervalID, _delayedBufferingIntervalID, _delayedBufferingInterval, _isLive, _autoSize, _aspectRatio, _autoPlay, _autoRewind, _bufferTime, _volume, _sound, __visible, _hiddenForResize, _hiddenForResizeMetadataDelay, _contentPath, _video, _ncMgr, _ns, attachAudio, _prevVideoWidth, _prevVideoHeight, _streamLength, _videoWidth, _videoHeight, dispatchEvent, _x, _y, _visible, _hiddenRewindPlayheadTime, ncMgrClassName, _height, _width;
function VideoPlayer () {
super();
mx.events.EventDispatcher.initialize(this);
_state = DISCONNECTED;
_cachedState = _state;
_bufferState = BUFFER_EMPTY;
_cachedPlayheadTime = 0;
_metadata = null;
_startingPlay = false;
_invalidSeekTime = false;
_invalidSeekRecovery = false;
_currentPos = 0;
_atEnd = false;
_cmdQueue = new Array();
_readyDispatched = false;
_autoResizeDone = false;
_lastUpdateTime = -1;
_sawSeekNotify = false;
_updateTimeIntervalID = 0;
_updateTimeInterval = DEFAULT_UPDATE_TIME_INTERVAL;
_updateProgressIntervalID = 0;
_updateProgressInterval = DEFAULT_UPDATE_PROGRESS_INTERVAL;
_idleTimeoutIntervalID = 0;
_idleTimeoutInterval = DEFAULT_IDLE_TIMEOUT_INTERVAL;
_autoResizeIntervalID = 0;
_rtmpDoStopAtEndIntervalID = 0;
_rtmpDoSeekIntervalID = 0;
_httpDoSeekIntervalID = 0;
_httpDoSeekCount = 0;
_finishAutoResizeIntervalID = 0;
_delayedBufferingIntervalID = 0;
_delayedBufferingInterval = HTTP_DELAYED_BUFFERING_INTERVAL;
if (_isLive == undefined) {
_isLive = false;
}
if (_autoSize == undefined) {
_autoSize = false;
}
if (_aspectRatio == undefined) {
_aspectRatio = true;
}
if (_autoPlay == undefined) {
_autoPlay = true;
}
if (_autoRewind == undefined) {
_autoRewind = true;
}
if (_bufferTime == undefined) {
_bufferTime = 0.1;
}
if (_volume == undefined) {
_volume = 100;
}
_sound = new Sound(this);
_sound.setVolume(_volume);
__visible = true;
_hiddenForResize = false;
_hiddenForResizeMetadataDelay = 0;
_contentPath = "";
}
function setSize(w, h) {
if (((w == _video._width) && (h == _video._height)) || (_autoSize)) {
return(undefined);
}
_video._width = w;
_video._height = h;
if (_aspectRatio) {
startAutoResize();
}
}
function setScale(xs, ys) {
if (((xs == _video._xscale) && (ys == _video._yscale)) || (_autoSize)) {
return(undefined);
}
_video._xscale = xs;
_video._yscale = ys;
if (_aspectRatio) {
startAutoResize();
}
}
function play(url, isLive, totalTime) {
if ((url != null) && (url != undefined)) {
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if (!stateResponsive) {
queueCmd(PLAY, url, isLive, totalTime);
return(undefined);
}
execQueuedCmds();
}
_autoPlay = true;
_load(url, isLive, totalTime);
return(undefined);
}
if (!isXnOK()) {
if (((((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr == undefined)) || (_ncMgr.getNetConnection() == null)) || (_ncMgr.getNetConnection() == undefined)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
// unexpected jump
}
flushQueuedCmds();
queueCmd(PLAY);
setState(LOADING);
_cachedState = LOADING;
_ncMgr.reconnect();
return(undefined);
}
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if (!stateResponsive) {
queueCmd(PLAY);
return(undefined);
}
execQueuedCmds();
}
if ((_ns == null) || (_ns == undefined)) {
_createStream();
_video.attachVideo(_ns);
attachAudio(_ns);
}
switch (_state) {
case BUFFERING :
if (_ncMgr.isRTMP()) {
_play(0);
if (_atEnd) {
_atEnd = false;
_currentPos = 0;
setState(REWINDING);
} else if (_currentPos > 0) {
_seek(_currentPos);
_currentPos = 0;
}
}
case PLAYING :
return(undefined);
case STOPPED :
if (_ncMgr.isRTMP()) {
if (_isLive) {
_play(-1);
setState(BUFFERING);
} else {
_play(0);
if (_atEnd) {
_atEnd = false;
_currentPos = 0;
_state = BUFFERING;
setState(REWINDING);
} else if (_currentPos > 0) {
_seek(_currentPos);
_currentPos = 0;
setState(BUFFERING);
} else {
setState(BUFFERING);
}
}
} else {
_pause(false);
if (_atEnd) {
_atEnd = false;
_seek(0);
_state = BUFFERING;
setState(REWINDING);
} else if (_bufferState == BUFFER_EMPTY) {
setState(BUFFERING);
} else {
setState(PLAYING);
}
}
break;
case PAUSED :
_pause(false);
if (!_ncMgr.isRTMP()) {
if (_bufferState == BUFFER_EMPTY) {
setState(BUFFERING);
} else {
setState(PLAYING);
}
} else {
setState(BUFFERING);
}
}
}
function load(url, isLive, totalTime) {
if ((url == null) || (url == undefined)) {
throw new Error("null url sent to VideoPlayer.load");
}
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if (!stateResponsive) {
queueCmd(LOAD, url, isLive, totalTime);
return(undefined);
}
execQueuedCmds();
}
_autoPlay = false;
_load(url, isLive, totalTime);
}
function _load(url, isLive, totalTime) {
_prevVideoWidth = videoWidth;
if (_prevVideoWidth == undefined) {
_prevVideoWidth = _video.width;
if (_prevVideoWidth == undefined) {
_prevVideoWidth = 0;
}
}
_prevVideoHeight = videoHeight;
if (_prevVideoHeight == undefined) {
_prevVideoHeight = _video.height;
if (_prevVideoHeight == undefined) {
_prevVideoHeight = 0;
}
}
_autoResizeDone = false;
_cachedPlayheadTime = 0;
_bufferState = BUFFER_EMPTY;
_metadata = null;
_startingPlay = false;
_invalidSeekTime = false;
_invalidSeekRecovery = false;
_isLive = ((isLive == undefined) ? false : (isLive));
_contentPath = url;
_currentPos = 0;
_streamLength = totalTime;
_atEnd = false;
_videoWidth = undefined;
_videoHeight = undefined;
_readyDispatched = false;
_lastUpdateTime = -1;
_sawSeekNotify = false;
clearInterval(_updateTimeIntervalID);
_updateTimeIntervalID = 0;
clearInterval(_updateProgressIntervalID);
_updateProgressIntervalID = 0;
clearInterval(_idleTimeoutIntervalID);
_idleTimeoutIntervalID = 0;
clearInterval(_autoResizeIntervalID);
_autoResizeIntervalID = 0;
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
clearInterval(_rtmpDoSeekIntervalID);
_rtmpDoSeekIntervalID = 0;
clearInterval(_httpDoSeekIntervalID);
_httpDoSeekIntervalID = 0;
clearInterval(_finishAutoResizeIntervalID);
_finishAutoResizeIntervalID = 0;
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = 0;
closeNS(false);
if ((_ncMgr == null) || (_ncMgr == undefined)) {
createINCManager();
}
var _local2 = _ncMgr.connectToURL(_contentPath);
setState(LOADING);
_cachedState = LOADING;
if (_local2) {
_createStream();
_setUpStream();
}
if (!_ncMgr.isRTMP()) {
clearInterval(_updateProgressIntervalID);
_updateProgressIntervalID = setInterval(this, "doUpdateProgress", _updateProgressInterval);
}
}
function pause() {
if (!isXnOK()) {
if (((((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr == undefined)) || (_ncMgr.getNetConnection() == null)) || (_ncMgr.getNetConnection() == undefined)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
// unexpected jump
}
return(undefined);
}
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if (!stateResponsive) {
queueCmd(PAUSE);
return(undefined);
}
execQueuedCmds();
}
if ((((_state == PAUSED) || (_state == STOPPED)) || (_ns == null)) || (_ns == undefined)) {
return(undefined);
}
_pause(true);
setState(PAUSED);
}
function stop() {
if (!isXnOK()) {
if (((((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr == undefined)) || (_ncMgr.getNetConnection() == null)) || (_ncMgr.getNetConnection() == undefined)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
// unexpected jump
}
return(undefined);
}
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if (!stateResponsive) {
queueCmd(STOP);
return(undefined);
}
execQueuedCmds();
}
if (((_state == STOPPED) || (_ns == null)) || (_ns == undefined)) {
return(undefined);
}
if (_ncMgr.isRTMP()) {
if (_autoRewind && (!_isLive)) {
_currentPos = 0;
_play(0, 0);
_state = STOPPED;
setState(REWINDING);
} else {
closeNS(true);
setState(STOPPED);
}
} else {
_pause(true);
if (_autoRewind) {
_seek(0);
_state = STOPPED;
setState(REWINDING);
} else {
setState(STOPPED);
}
}
}
function seek(time) {
if (_invalidSeekTime) {
return(undefined);
}
if (isNaN(time) || (time < 0)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_SEEK);
}
if (!isXnOK()) {
if (((((_state == CONNECTION_ERROR) || (_ncMgr == null)) || (_ncMgr == undefined)) || (_ncMgr.getNetConnection() == null)) || (_ncMgr.getNetConnection() == undefined)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_CONNECTION);
// unexpected jump
}
flushQueuedCmds();
queueCmd(SEEK, null, false, time);
setState(LOADING);
_cachedState = LOADING;
_ncMgr.reconnect();
return(undefined);
}
if (_state == EXEC_QUEUED_CMD) {
_state = _cachedState;
} else {
if (!stateResponsive) {
queueCmd(SEEK, null, false, time);
return(undefined);
}
execQueuedCmds();
}
if ((_ns == null) || (_ns == undefined)) {
_createStream();
_video.attachVideo(_ns);
attachAudio(_ns);
}
if (_atEnd && (time < playheadTime)) {
_atEnd = false;
}
switch (_state) {
case PLAYING :
_state = BUFFERING;
case BUFFERING :
case PAUSED :
_seek(time);
setState(SEEKING);
break;
case STOPPED :
if (_ncMgr.isRTMP()) {
_play(0);
_pause(true);
}
_seek(time);
_state = PAUSED;
setState(SEEKING);
}
}
function close() {
closeNS(true);
if (((_ncMgr != null) && (_ncMgr != undefined)) && (_ncMgr.isRTMP())) {
_ncMgr.close();
}
setState(DISCONNECTED);
dispatchEvent({type:"close", state:_state, playheadTime:playheadTime});
}
function get x() {
return(_x);
}
function set x(xpos) {
_x = xpos;
//return(x);
}
function get y() {
return(_y);
}
function set y(ypos) {
_y = ypos;
//return(y);
}
function get scaleX() {
return(_video._xscale);
}
function set scaleX(xs) {
setScale(xs, scaleY);
//return(scaleX);
}
function get scaleY() {
return(_video._yscale);
}
function set scaleY(ys) {
setScale(scaleX, ys);
//return(scaleY);
}
function get width() {
return(_video._width);
}
function set width(w) {
setSize(w, _video._height);
//return(width);
}
function get height() {
return(_video._height);
}
function set height(h) {
setSize(_video._width, h);
//return(height);
}
function get videoWidth() {
if (_readyDispatched) {
_videoWidth = _video.width;
}
return(_videoWidth);
}
function get videoHeight() {
if (_readyDispatched) {
_videoHeight = _video.height;
}
return(_videoHeight);
}
function get visible() {
if (!_hiddenForResize) {
__visible = _visible;
}
return(__visible);
}
function set visible(v) {
__visible = v;
if (!_hiddenForResize) {
_visible = __visible;
}
//return(visible);
}
function get autoSize() {
return(_autoSize);
}
function set autoSize(flag) {
if (_autoSize != flag) {
_autoSize = flag;
if (_autoSize) {
startAutoResize();
}
}
//return(autoSize);
}
function get maintainAspectRatio() {
return(_aspectRatio);
}
function set maintainAspectRatio(flag) {
if (_aspectRatio != flag) {
_aspectRatio = flag;
if (_aspectRatio && (!_autoSize)) {
startAutoResize();
}
}
//return(maintainAspectRatio);
}
function get autoRewind() {
return(_autoRewind);
}
function set autoRewind(flag) {
_autoRewind = flag;
//return(autoRewind);
}
function get playheadTime() {
var _local2 = (((_ns == null) || (_ns == undefined)) ? (_currentPos) : (_ns.time));
if (_metadata.audiodelay != undefined) {
_local2 = _local2 - _metadata.audiodelay;
if (_local2 < 0) {
_local2 = 0;
}
}
return(_local2);
}
function set playheadTime(position) {
seek(position);
//return(playheadTime);
}
function get url() {
return(_contentPath);
}
function get volume() {
return(_volume);
}
function set volume(aVol) {
_volume = aVol;
if (!_hiddenForResize) {
_sound.setVolume(_volume);
}
//return(volume);
}
function get transform() {
return(_sound.getTransform());
}
function set transform(s) {
_sound.setTransform(s);
//return(transform);
}
function get isRTMP() {
if ((_ncMgr == null) || (_ncMgr == undefined)) {
return(undefined);
}
return(_ncMgr.isRTMP());
}
function get isLive() {
return(_isLive);
}
function get state() {
return(_state);
}
function get stateResponsive() {
switch (_state) {
case DISCONNECTED :
case STOPPED :
case PLAYING :
case PAUSED :
case BUFFERING :
return(true);
}
return(false);
}
function get bytesLoaded() {
if (((_ns == null) || (_ns == undefined)) || (_ncMgr.isRTMP())) {
return(-1);
}
return(_ns.bytesLoaded);
}
function get bytesTotal() {
if (((_ns == null) || (_ns == undefined)) || (_ncMgr.isRTMP())) {
return(-1);
}
return(_ns.bytesTotal);
}
function get totalTime() {
return(_streamLength);
}
function get bufferTime() {
return(_bufferTime);
}
function set bufferTime(aTime) {
_bufferTime = aTime;
if ((_ns != null) && (_ns != undefined)) {
_ns.setBufferTime(_bufferTime);
}
//return(bufferTime);
}
function get idleTimeout() {
return(_idleTimeoutInterval);
}
function set idleTimeout(aTime) {
_idleTimeoutInterval = aTime;
if (_idleTimeoutIntervalID > 0) {
clearInterval(_idleTimeoutIntervalID);
_idleTimeoutIntervalID = setInterval(this, "doIdleTimeout", _idleTimeoutInterval);
}
//return(idleTimeout);
}
function get playheadUpdateInterval() {
return(_updateTimeInterval);
}
function set playheadUpdateInterval(aTime) {
_updateTimeInterval = aTime;
if (_updateTimeIntervalID > 0) {
clearInterval(_updateTimeIntervalID);
_updateTimeIntervalID = setInterval(this, "doUpdateTime", _updateTimeInterval);
}
//return(playheadUpdateInterval);
}
function get progressInterval() {
return(_updateProgressInterval);
}
function set progressInterval(aTime) {
_updateProgressInterval = aTime;
if (_updateProgressIntervalID > 0) {
clearInterval(_updateProgressIntervalID);
_updateProgressIntervalID = setInterval(this, "doUpdateProgress", _updateProgressInterval);
}
//return(progressInterval);
}
function get ncMgr() {
if ((_ncMgr == null) || (_ncMgr == undefined)) {
createINCManager();
}
return(_ncMgr);
}
function get metadata() {
return(_metadata);
}
function doUpdateTime() {
var _local2 = playheadTime;
switch (_state) {
case STOPPED :
case PAUSED :
case DISCONNECTED :
case CONNECTION_ERROR :
clearInterval(_updateTimeIntervalID);
_updateTimeIntervalID = 0;
}
if (_lastUpdateTime != _local2) {
dispatchEvent({type:"playheadUpdate", state:_state, playheadTime:_local2});
_lastUpdateTime = _local2;
}
}
function doUpdateProgress() {
if ((_ns == null) || (_ns == undefined)) {
return(undefined);
}
if ((_ns.bytesTotal >= 0) && (_ns.bytesTotal >= 0)) {
dispatchEvent({type:"progress", bytesLoaded:_ns.bytesLoaded, bytesTotal:_ns.bytesTotal});
}
if (((_state == DISCONNECTED) || (_state == CONNECTION_ERROR)) || (_ns.bytesLoaded == _ns.bytesTotal)) {
clearInterval(_updateProgressIntervalID);
_updateProgressIntervalID = 0;
}
}
function rtmpOnStatus(info) {
if (_state == CONNECTION_ERROR) {
return(undefined);
}
switch (info.code) {
case "NetStream.Play.Stop" :
if (_startingPlay) {
return(undefined);
}
switch (_state) {
case RESIZING :
if (_hiddenForResize) {
finishAutoResize();
}
break;
case LOADING :
case STOPPED :
case PAUSED :
break;
default :
if ((_bufferState == BUFFER_EMPTY) || (_bufferTime <= 0.1)) {
_cachedPlayheadTime = playheadTime;
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = setInterval(this, "rtmpDoStopAtEnd", RTMP_DO_STOP_AT_END_INTERVAL);
} else {
if (_bufferState != BUFFER_FULL) {
break;
}
_bufferState = BUFFER_FULL_SAW_PLAY_STOP;
}
}
break;
case "NetStream.Buffer.Empty" :
switch (_bufferState) {
case BUFFER_FULL_SAW_PLAY_STOP :
rtmpDoStopAtEnd(true);
break;
case BUFFER_FULL :
if (_state == PLAYING) {
setState(BUFFERING);
}
break;
}
_bufferState = BUFFER_EMPTY;
break;
case "NetStream.Buffer.Flush" :
case "NetStream.Buffer.Full" :
if (_sawSeekNotify && (_state == SEEKING)) {
_bufferState = BUFFER_EMPTY;
setStateFromCachedState();
doUpdateTime();
}
switch (_bufferState) {
case BUFFER_EMPTY :
if (!_hiddenForResize) {
if (((_state == LOADING) && (_cachedState == PLAYING)) || (_state == BUFFERING)) {
setState(PLAYING);
} else if (_cachedState == BUFFERING) {
_cachedState = PLAYING;
}
}
_bufferState = BUFFER_FULL;
break;
default :
}
break;
case "NetStream.Pause.Notify" :
if ((_state == RESIZING) && (_hiddenForResize)) {
finishAutoResize();
}
break;
case "NetStream.Play.Start" :
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
_bufferState = BUFFER_EMPTY;
if (_startingPlay) {
_startingPlay = false;
_cachedPlayheadTime = playheadTime;
} else if (_state == PLAYING) {
setState(BUFFERING);
}
break;
case "NetStream.Play.Reset" :
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
if (_state == REWINDING) {
clearInterval(_rtmpDoSeekIntervalID);
_rtmpDoSeekIntervalID = 0;
if ((playheadTime == 0) || (playheadTime < _cachedPlayheadTime)) {
setStateFromCachedState();
} else {
_cachedPlayheadTime = playheadTime;
_rtmpDoSeekIntervalID = setInterval(this, "rtmpDoSeek", RTMP_DO_SEEK_INTERVAL);
}
}
break;
case "NetStream.Seek.Notify" :
if (playheadTime != _cachedPlayheadTime) {
setStateFromCachedState();
doUpdateTime();
} else {
_sawSeekNotify = true;
if (_rtmpDoSeekIntervalID == 0) {
_rtmpDoSeekIntervalID = setInterval(this, "rtmpDoSeek", RTMP_DO_SEEK_INTERVAL);
}
}
break;
case "Netstream.Play.UnpublishNotify" :
break;
case "Netstream.Play.PublishNotify" :
break;
case "NetStream.Play.StreamNotFound" :
if (!_ncMgr.connectAgain()) {
setState(CONNECTION_ERROR);
}
break;
case "NetStream.Play.Failed" :
case "NetStream.Failed" :
setState(CONNECTION_ERROR);
}
}
function httpOnStatus(info) {
switch (info.code) {
case "NetStream.Play.Stop" :
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = 0;
if (_invalidSeekTime) {
_invalidSeekTime = false;
_invalidSeekRecovery = true;
setState(_cachedState);
seek(playheadTime);
} else {
switch (_state) {
case PLAYING :
case BUFFERING :
case SEEKING :
httpDoStopAtEnd();
}
}
break;
case "NetStream.Seek.InvalidTime" :
if (_invalidSeekRecovery) {
_invalidSeekTime = false;
_invalidSeekRecovery = false;
setState(_cachedState);
seek(0);
} else {
_invalidSeekTime = true;
}
break;
case "NetStream.Buffer.Empty" :
_bufferState = BUFFER_EMPTY;
if (_state == PLAYING) {
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = setInterval(this, "doDelayedBuffering", _delayedBufferingInterval);
}
break;
case "NetStream.Buffer.Full" :
case "NetStream.Buffer.Flush" :
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = 0;
_bufferState = BUFFER_FULL;
if (!_hiddenForResize) {
if (((_state == LOADING) && (_cachedState == PLAYING)) || (_state == BUFFERING)) {
setState(PLAYING);
} else if (_cachedState == BUFFERING) {
_cachedState = PLAYING;
}
}
break;
case "NetStream.Seek.Notify" :
_invalidSeekRecovery = false;
switch (_state) {
case SEEKING :
case REWINDING :
if (_httpDoSeekIntervalID != 0) {
break;
}
_httpDoSeekCount = 0;
_httpDoSeekIntervalID = setInterval(this, "httpDoSeek", HTTP_DO_SEEK_INTERVAL);
}
break;
case "NetStream.Play.StreamNotFound" :
setState(CONNECTION_ERROR);
}
}
function ncConnected() {
if ((((_ncMgr == null) || (_ncMgr == undefined)) || (_ncMgr.getNetConnection() == null)) || (_ncMgr.getNetConnection() == undefined)) {
setState(CONNECTION_ERROR);
} else {
_createStream();
_setUpStream();
}
}
function ncReconnected() {
if ((((_ncMgr == null) || (_ncMgr == undefined)) || (_ncMgr.getNetConnection() == null)) || (_ncMgr.getNetConnection() == undefined)) {
setState(CONNECTION_ERROR);
} else {
_ns = null;
_state = STOPPED;
execQueuedCmds();
}
}
function onMetaData(info) {
if (_metadata != null) {
return(undefined);
}
_metadata = info;
if (((_streamLength == undefined) || (_streamLength == null)) || (_streamLength <= 0)) {
_streamLength = info.duration;
}
if (isNaN(_videoWidth) || (_videoWidth <= 0)) {
_videoWidth = info.width;
}
if (isNaN(_videoHeight) || (_videoHeight <= 0)) {
_videoHeight = info.height;
}
dispatchEvent({type:"metadataReceived", info:info});
}
function onCuePoint(info) {
if ((!_hiddenForResize) || ((!isNaN(_hiddenRewindPlayheadTime)) && (playheadTime < _hiddenRewindPlayheadTime))) {
dispatchEvent({type:"cuePoint", info:info});
}
}
function setState(s) {
if (s == _state) {
return(undefined);
}
_hiddenRewindPlayheadTime = undefined;
_cachedState = _state;
_cachedPlayheadTime = playheadTime;
_state = s;
var _local2 = _state;
dispatchEvent({type:"stateChange", state:_local2, playheadTime:playheadTime});
if (!_readyDispatched) {
switch (_local2) {
case STOPPED :
case PLAYING :
case PAUSED :
case BUFFERING :
_readyDispatched = true;
dispatchEvent({type:"ready", state:_local2, playheadTime:playheadTime});
}
}
if (!(_cachedState === REWINDING)) {
} else {
dispatchEvent({type:"rewind", state:_local2, playheadTime:playheadTime});
if (_ncMgr.isRTMP() && (_local2 == STOPPED)) {
closeNS();
}
}
switch (_local2) {
case STOPPED :
case PAUSED :
if (_ncMgr.isRTMP() && (_idleTimeoutIntervalID == 0)) {
_idleTimeoutIntervalID = setInterval(this, "doIdleTimeout", _idleTimeoutInterval);
}
break;
case SEEKING :
case REWINDING :
_bufferState = BUFFER_EMPTY;
case PLAYING :
case BUFFERING :
if (_updateTimeIntervalID == 0) {
_updateTimeIntervalID = setInterval(this, "doUpdateTime", _updateTimeInterval);
}
case LOADING :
case RESIZING :
clearInterval(_idleTimeoutIntervalID);
_idleTimeoutIntervalID = 0;
}
execQueuedCmds();
}
function setStateFromCachedState() {
switch (_cachedState) {
case PLAYING :
case PAUSED :
setState(_cachedState);
break;
case BUFFERING :
if (_bufferState == BUFFER_EMPTY) {
setState(BUFFERING);
} else {
setState(_cachedState);
}
break;
default :
setState(STOPPED);
}
}
function createINCManager() {
if ((ncMgrClassName == null) || (ncMgrClassName == undefined)) {
ncMgrClassName = DEFAULT_INCMANAGER;
}
var ncMgrConstructor = eval (this.ncMgrClassName);
_ncMgr = new ncMgrConstructor();
_ncMgr.setVideoPlayer(this);
}
function rtmpDoStopAtEnd(force) {
if (_rtmpDoStopAtEndIntervalID > 0) {
switch (_state) {
case DISCONNECTED :
case CONNECTION_ERROR :
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
return(undefined);
}
if (force || (_cachedPlayheadTime == playheadTime)) {
clearInterval(_rtmpDoStopAtEndIntervalID);
_rtmpDoStopAtEndIntervalID = 0;
} else {
_cachedPlayheadTime = playheadTime;
return(undefined);
}
}
_bufferState = BUFFER_EMPTY;
_atEnd = true;
setState(STOPPED);
if (_state != STOPPED) {
return(undefined);
}
doUpdateTime();
if (_state != STOPPED) {
return(undefined);
}
dispatchEvent({type:"complete", state:_state, playheadTime:playheadTime});
if (_state != STOPPED) {
return(undefined);
}
if ((_autoRewind && (!_isLive)) && (playheadTime != 0)) {
_atEnd = false;
_currentPos = 0;
_play(0, 0);
setState(REWINDING);
} else {
closeNS();
}
}
function rtmpDoSeek() {
if ((_state != REWINDING) && (_state != SEEKING)) {
clearInterval(_rtmpDoSeekIntervalID);
_rtmpDoSeekIntervalID = 0;
_sawSeekNotify = false;
} else if (playheadTime != _cachedPlayheadTime) {
clearInterval(_rtmpDoSeekIntervalID);
_rtmpDoSeekIntervalID = 0;
_sawSeekNotify = false;
setStateFromCachedState();
doUpdateTime();
}
}
function httpDoStopAtEnd() {
_atEnd = true;
if (((_streamLength == undefined) || (_streamLength == null)) || (_streamLength <= 0)) {
_streamLength = _ns.time;
}
_pause(true);
setState(STOPPED);
if (_state != STOPPED) {
return(undefined);
}
doUpdateTime();
if (_state != STOPPED) {
return(undefined);
}
dispatchEvent({type:"complete", state:_state, playheadTime:playheadTime});
if (_state != STOPPED) {
return(undefined);
}
if (_autoRewind) {
_atEnd = false;
_pause(true);
_seek(0);
setState(REWINDING);
}
}
function httpDoSeek() {
var _local2 = (_state == REWINDING) || (_state == SEEKING);
if ((_local2 && (_httpDoSeekCount < HTTP_DO_SEEK_MAX_COUNT)) && ((_cachedPlayheadTime == playheadTime) || (_invalidSeekTime))) {
_httpDoSeekCount++;
return(undefined);
}
_httpDoSeekCount = 0;
clearInterval(_httpDoSeekIntervalID);
_httpDoSeekIntervalID = 0;
if (!_local2) {
return(undefined);
}
setStateFromCachedState();
if (_invalidSeekTime) {
_invalidSeekTime = false;
_invalidSeekRecovery = true;
seek(playheadTime);
} else {
doUpdateTime();
}
}
function closeNS(updateCurrentPos) {
if ((_ns != null) && (_ns != undefined)) {
if (updateCurrentPos) {
clearInterval(_updateTimeIntervalID);
_updateTimeIntervalID = 0;
doUpdateTime();
_currentPos = _ns.time;
}
delete _ns.onStatus;
_ns.onStatus = null;
_ns.close();
_ns = null;
}
}
function doDelayedBuffering() {
switch (_state) {
case LOADING :
case RESIZING :
break;
case PLAYING :
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = 0;
setState(BUFFERING);
break;
default :
clearInterval(_delayedBufferingIntervalID);
_delayedBufferingIntervalID = 0;
}
}
function _pause(doPause) {
_ns.pause(doPause);
}
function _play() {
_startingPlay = true;
switch (arguments.length) {
case 0 :
_ns.play(_ncMgr.getStreamName(), (_isLive ? -1 : 0), -1);
break;
case 1 :
_ns.play(_ncMgr.getStreamName(), (_isLive ? -1 : (arguments[0])), -1);
break;
case 2 :
_ns.play(_ncMgr.getStreamName(), (_isLive ? -1 : (arguments[0])), arguments[1]);
break;
default :
throw new Error("bad args to _play");
}
}
function _seek(time) {
if ((_metadata.audiodelay != undefined) && ((time + _metadata.audiodelay) < _streamLength)) {
time = time + _metadata.audiodelay;
}
_ns.seek(time);
_invalidSeekTime = false;
_bufferState = BUFFER_EMPTY;
_sawSeekNotify = false;
}
function isXnOK() {
if (_state == LOADING) {
return(true);
}
if (_state == CONNECTION_ERROR) {
return(false);
}
if (_state != DISCONNECTED) {
if (((((_ncMgr == null) || (_ncMgr == undefined)) || (_ncMgr.getNetConnection() == null)) || (_ncMgr.getNetConnection() == undefined)) || (!_ncMgr.getNetConnection().isConnected)) {
setState(DISCONNECTED);
return(false);
}
return(true);
}
return(false);
}
function startAutoResize() {
switch (_state) {
case DISCONNECTED :
case CONNECTION_ERROR :
return(undefined);
}
_autoResizeDone = false;
if ((stateResponsive && (_videoWidth != undefined)) && (_videoHeight != undefined)) {
doAutoResize();
} else {
clearInterval(_autoResizeIntervalID);
_autoResizeIntervalID = setInterval(this, "doAutoResize", AUTO_RESIZE_INTERVAL);
}
}
function doAutoResize() {
if (_autoResizeIntervalID > 0) {
switch (_state) {
case RESIZING :
case LOADING :
break;
case DISCONNECTED :
case CONNECTION_ERROR :
clearInterval(_autoResizeIntervalID);
_autoResizeIntervalID = 0;
return(undefined);
default :
if (stateResponsive) {
break;
}
return(undefined);
}
if ((((_video.width != _prevVideoWidth) || (_video.height != _prevVideoHeight)) || (_bufferState >= BUFFER_FULL)) || (_ns.time > AUTO_RESIZE_PLAYHEAD_TIMEOUT)) {
if ((_hiddenForResize && (_metadata == null)) && (_hiddenForResizeMetadataDelay < AUTO_RESIZE_METADATA_DELAY_MAX)) {
_hiddenForResizeMetadataDelay++;
return(undefined);
}
_videoWidth = _video.width;
_videoHeight = _video.height;
clearInterval(_autoResizeIntervalID);
_autoResizeIntervalID = 0;
} else {
return(undefined);
}
}
if (((!_autoSize) && (!_aspectRatio)) || (_autoResizeDone)) {
setState(_cachedState);
return(undefined);
}
_autoResizeDone = true;
if (_autoSize) {
_video._width = _videoWidth;
_video._height = _videoHeight;
} else if (_aspectRatio) {
var _local3 = (_videoWidth * height) / _videoHeight;
var _local2 = (_videoHeight * width) / _videoWidth;
if (_local2 < height) {
_video._height = _local2;
} else if (_local3 < width) {
_video._width = _local3;
}
}
if (_hiddenForResize) {
_hiddenRewindPlayheadTime = playheadTime;
if (_state == LOADING) {
_cachedState = PLAYING;
}
if (!_ncMgr.isRTMP()) {
_pause(true);
_seek(0);
clearInterval(_finishAutoResizeIntervalID);
_finishAutoResizeIntervalID = setInterval(this, "finishAutoResize", FINISH_AUTO_RESIZE_INTERVAL);
} else if (!_isLive) {
_currentPos = 0;
_play(0, 0);
setState(RESIZING);
} else if (_autoPlay) {
clearInterval(_finishAutoResizeIntervalID);
_finishAutoResizeIntervalID = setInterval(this, "finishAutoResize", FINISH_AUTO_RESIZE_INTERVAL);
} else {
finishAutoResize();
}
} else {
dispatchEvent({type:"resize", x:_x, y:_y, width:_width, height:_height});
}
}
function finishAutoResize() {
clearInterval(_finishAutoResizeIntervalID);
_finishAutoResizeIntervalID = 0;
if (stateResponsive) {
return(undefined);
}
_visible = __visible;
_sound.setVolume(_volume);
_hiddenForResize = false;
dispatchEvent({type:"resize", x:_x, y:_y, width:_width, height:_height});
if (_autoPlay) {
if (_ncMgr.isRTMP()) {
if (!_isLive) {
_currentPos = 0;
_play(0);
}
if (_state == RESIZING) {
setState(LOADING);
_cachedState = PLAYING;
}
} else {
_pause(false);
_cachedState = PLAYING;
}
} else {
setState(STOPPED);
}
}
function _createStream() {
_ns = new NetStream(_ncMgr.getNetConnection());
_ns.mc = this;
if (_ncMgr.isRTMP()) {
_ns.onStatus = function (info) {
this.mc.rtmpOnStatus(info);
};
} else {
_ns.onStatus = function (info) {
this.mc.httpOnStatus(info);
};
}
_ns.onMetaData = function (info) {
this.mc.onMetaData(info);
};
_ns.onCuePoint = function (info) {
this.mc.onCuePoint(info);
};
_ns.setBufferTime(_bufferTime);
}
function _setUpStream() {
_video.attachVideo(_ns);
attachAudio(_ns);
if ((!isNaN(_ncMgr.getStreamLength())) && (_ncMgr.getStreamLength() >= 0)) {
_streamLength = _ncMgr.getStreamLength();
}
if ((!isNaN(_ncMgr.getStreamWidth())) && (_ncMgr.getStreamWidth() >= 0)) {
_videoWidth = _ncMgr.getStreamWidth();
} else {
_videoWidth = undefined;
}
if ((!isNaN(_ncMgr.getStreamHeight())) && (_ncMgr.getStreamHeight() >= 0)) {
_videoHeight = _ncMgr.getStreamHeight();
} else {
_videoHeight = undefined;
}
if (((_autoSize || (_aspectRatio)) && (_videoWidth != undefined)) && (_videoHeight != undefined)) {
_prevVideoWidth = undefined;
_prevVideoHeight = undefined;
doAutoResize();
}
if (((!_autoSize) && (!_aspectRatio)) || ((_videoWidth != undefined) && (_videoHeight != undefined))) {
if (_autoPlay) {
if (!_ncMgr.isRTMP()) {
_cachedState = BUFFERING;
_play();
} else if (_isLive) {
_cachedState = BUFFERING;
_play(-1);
} else {
_cachedState = BUFFERING;
_play(0);
}
} else {
_cachedState = STOPPED;
if (_ncMgr.isRTMP()) {
_play(0, 0);
} else {
_play();
_pause(true);
_seek(0);
}
}
} else {
_hiddenForResize = true;
_hiddenForResizeMetadataDelay = 0;
__visible = _visible;
_visible = false;
_volume = _sound.getVolume();
_sound.setVolume(0);
_play(0);
if (_currentPos > 0) {
_seek(_currentPos);
_currentPos = 0;
}
}
clearInterval(_autoResizeIntervalID);
_autoResizeIntervalID = setInterval(this, "doAutoResize", AUTO_RESIZE_INTERVAL);
}
function doIdleTimeout() {
clearInterval(_idleTimeoutIntervalID);
_idleTimeoutIntervalID = 0;
close();
}
function flushQueuedCmds() {
while (_cmdQueue.length > 0) {
_cmdQueue.pop();
}
}
function execQueuedCmds() {
while (((_cmdQueue.length > 0) && (stateResponsive || (_state == CONNECTION_ERROR))) && (((_cmdQueue[0].url != null) && (_cmdQueue[0].url != undefined)) || ((_state != DISCONNECTED) && (_state != CONNECTION_ERROR)))) {
var _local2 = _cmdQueue.shift();
_cachedState = _state;
_state = EXEC_QUEUED_CMD;
switch (_local2.type) {
case PLAY :
play(_local2.url, _local2.isLive, _local2.time);
break;
case LOAD :
load(_local2.url, _local2.isLive, _local2.time);
break;
case PAUSE :
pause();
break;
case STOP :
stop();
break;
case SEEK :
seek(_local2.time);
}
}
}
function queueCmd(type, url, isLive, time) {
_cmdQueue.push({type:type, url:url, isLive:false, time:time});
}
static var version = "1.0.0.103";
static var DISCONNECTED = "disconnected";
static var STOPPED = "stopped";
static var PLAYING = "playing";
static var PAUSED = "paused";
static var BUFFERING = "buffering";
static var LOADING = "loading";
static var CONNECTION_ERROR = "connectionError";
static var REWINDING = "rewinding";
static var SEEKING = "seeking";
static var RESIZING = "resizing";
static var EXEC_QUEUED_CMD = "execQueuedCmd";
static var BUFFER_EMPTY = "bufferEmpty";
static var BUFFER_FULL = "bufferFull";
static var BUFFER_FULL_SAW_PLAY_STOP = "bufferFullSawPlayStop";
static var DEFAULT_INCMANAGER = "mx.video.NCManager";
static var DEFAULT_UPDATE_TIME_INTERVAL = 250;
static var DEFAULT_UPDATE_PROGRESS_INTERVAL = 250;
static var DEFAULT_IDLE_TIMEOUT_INTERVAL = 300000;
static var AUTO_RESIZE_INTERVAL = 100;
static var AUTO_RESIZE_PLAYHEAD_TIMEOUT = 0.5;
static var AUTO_RESIZE_METADATA_DELAY_MAX = 5;
static var FINISH_AUTO_RESIZE_INTERVAL = 250;
static var RTMP_DO_STOP_AT_END_INTERVAL = 500;
static var RTMP_DO_SEEK_INTERVAL = 100;
static var HTTP_DO_SEEK_INTERVAL = 250;
static var HTTP_DO_SEEK_MAX_COUNT = 4;
static var CLOSE_NS_INTERVAL = 0.25;
static var HTTP_DELAYED_BUFFERING_INTERVAL = 100;
static var PLAY = 0;
static var LOAD = 1;
static var PAUSE = 2;
static var STOP = 3;
static var SEEK = 4;
}
Symbol 16 MovieClip [__Packages.mx.video.INCManager] Frame 0
interface mx.video.INCManager
{
}
Symbol 18 MovieClip [__Packages.mx.video.VideoError] Frame 0
class mx.video.VideoError extends Error
{
var _code, message, name;
function VideoError (errCode, msg) {
super();
_code = errCode;
message = ((("" + errCode) + ": ") + ERROR_MSG[errCode - BASE_ERROR_CODE]) + ((msg == undefined) ? "" : (": " + msg));
name = "VideoError";
}
function get code() {
return(_code);
}
static var version = "1.0.0.103";
static var BASE_ERROR_CODE = 1000;
static var NO_CONNECTION = 1000;
static var NO_CUE_POINT_MATCH = 1001;
static var ILLEGAL_CUE_POINT = 1002;
static var INVALID_SEEK = 1003;
static var INVALID_CONTENT_PATH = 1004;
static var INVALID_XML = 1005;
static var NO_BITRATE_MATCH = 1006;
static var DELETE_DEFAULT_PLAYER = 1007;
static var ERROR_MSG = ["Unable to make connection to server or to find FLV on server", "No matching cue point found", "Illegal cue point", "Invalid seek", "Invalid contentPath", "Invalid xml", "No bitrate match, must be no default flv", "Cannot delete default VideoPlayer"];
}
Symbol 19 MovieClip [__Packages.mx.video.UIManager] Frame 0
class mx.video.UIManager
{
var _vc, _skin, _skinAutoHide, _skinReady, __visible, _bufferingBarHides, _controlsEnabled, _lastScrubPos, _lastVolumePos, cachedSoundLevel, _isMuted, controls, customClips, skin_mc, skinLoader, layout_mc, border_mc, _seekBarIntervalID, _seekBarInterval, _seekBarScrubTolerance, _volumeBarIntervalID, _volumeBarInterval, _volumeBarScrubTolerance, _bufferingDelayIntervalID, _bufferingDelayInterval, _bufferingOn, _skinAutoHideIntervalID, _progressPercent, placeholderLeft, placeholderRight, placeholderTop, placeholderBottom, videoLeft, videoRight, videoTop, videoBottom, _playAfterScrub;
function UIManager (vc) {
_vc = vc;
_skin = undefined;
_skinAutoHide = false;
_skinReady = true;
__visible = true;
_bufferingBarHides = false;
_controlsEnabled = true;
_lastScrubPos = 0;
_lastVolumePos = 0;
cachedSoundLevel = _vc.volume;
_isMuted = false;
controls = new Array();
customClips = undefined;
skin_mc = undefined;
skinLoader = undefined;
layout_mc = undefined;
border_mc = undefined;
_seekBarIntervalID = 0;
_seekBarInterval = SEEK_BAR_INTERVAL_DEFAULT;
_seekBarScrubTolerance = SEEK_BAR_SCRUB_TOLERANCE_DEFAULT;
_volumeBarIntervalID = 0;
_volumeBarInterval = VOLUME_BAR_INTERVAL_DEFAULT;
_volumeBarScrubTolerance = VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT;
_bufferingDelayIntervalID = 0;
_bufferingDelayInterval = BUFFERING_DELAY_INTERVAL_DEFAULT;
_bufferingOn = false;
_skinAutoHideIntervalID = 0;
_vc.addEventListener("metadataReceived", this);
_vc.addEventListener("playheadUpdate", this);
_vc.addEventListener("progress", this);
_vc.addEventListener("stateChange", this);
_vc.addEventListener("ready", this);
_vc.addEventListener("resize", this);
_vc.addEventListener("volumeUpdate", this);
}
function handleEvent(e) {
if ((e.vp != undefined) && (e.vp != _vc.__get__visibleVideoPlayerIndex())) {
return(undefined);
}
var _local9 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
if (e.type == "stateChange") {
if (e.state == mx.video.FLVPlayback.BUFFERING) {
if (!_bufferingOn) {
clearInterval(_bufferingDelayIntervalID);
_bufferingDelayIntervalID = setInterval(this, "doBufferingDelay", _bufferingDelayInterval);
}
} else {
clearInterval(_bufferingDelayIntervalID);
_bufferingDelayIntervalID = 0;
_bufferingOn = false;
}
if (e.state == mx.video.FLVPlayback.LOADING) {
_progressPercent = (_vc.getVideoPlayer(e.vp).__get__isRTMP() ? 100 : 0);
var _local2 = SEEK_BAR;
while (_local2 <= VOLUME_BAR) {
var _local4 = controls[_local2];
if (_local4.progress_mc != undefined) {
positionBar(_local4, "progress", _progressPercent);
}
_local2++;
}
}
var _local2 = 0;
while (_local2 < NUM_CONTROLS) {
if (controls[_local2] == undefined) {
} else {
setEnabledAndVisibleForState(_local2, e.state);
if (_local2 < NUM_BUTTONS) {
skinButtonControl(controls[_local2]);
}
}
_local2++;
}
} else if ((e.type == "ready") || (e.type == "metadataReceived")) {
var _local2 = 0;
while (_local2 < NUM_CONTROLS) {
if (controls[_local2] == undefined) {
} else {
setEnabledAndVisibleForState(_local2, _vc.__get__state());
if (_local2 < NUM_BUTTONS) {
skinButtonControl(controls[_local2]);
}
}
_local2++;
}
if (_vc.getVideoPlayer(e.vp).__get__isRTMP()) {
_progressPercent = 100;
_local2 = SEEK_BAR;
while (_local2 <= VOLUME_BAR) {
var _local4 = controls[_local2];
if (_local4.progress_mc != undefined) {
positionBar(_local4, "progress", _progressPercent);
}
_local2++;
}
}
} else if (e.type == "resize") {
layoutSkin();
setupSkinAutoHide();
} else if (e.type == "volumeUpdate") {
if (_isMuted && (e.volume > 0)) {
_isMuted = false;
setEnabledAndVisibleForState(MUTE_OFF_BUTTON, mx.video.FLVPlayback.PLAYING);
skinButtonControl(controls[MUTE_OFF_BUTTON]);
setEnabledAndVisibleForState(MUTE_ON_BUTTON, mx.video.FLVPlayback.PLAYING);
skinButtonControl(controls[MUTE_ON_BUTTON]);
}
var _local5 = controls[VOLUME_BAR];
_local5.percentage = (_isMuted ? (cachedSoundLevel) : (e.volume));
if (_local5.percentage < 0) {
_local5.percentage = 0;
} else if (_local5.percentage > 100) {
_local5.percentage = 100;
}
positionHandle(VOLUME_BAR);
} else if ((e.type == "playheadUpdate") && (controls[SEEK_BAR] != undefined)) {
if ((!_vc.__get__isLive()) && (_vc.__get__totalTime() > 0)) {
var _local6 = (e.playheadTime / _vc.__get__totalTime()) * 100;
if (_local6 < 0) {
_local6 = 0;
} else if (_local6 > 100) {
_local6 = 100;
}
var _local10 = controls[SEEK_BAR];
_local10.percentage = _local6;
positionHandle(SEEK_BAR);
}
} else if (e.type == "progress") {
_progressPercent = ((e.bytesTotal <= 0) ? 100 : ((e.bytesLoaded / e.bytesTotal) * 100));
var _local7 = _vc._vpState[e.vp].minProgressPercent;
if ((!isNaN(_local7)) && (_local7 > _progressPercent)) {
_progressPercent = _local7;
}
if (_vc.__get__totalTime() > 0) {
var _local8 = (_vc.__get__playheadTime() / _vc.__get__totalTime()) * 100;
if (_local8 > _progressPercent) {
_progressPercent = _local8;
_vc._vpState[e.vp].minProgressPercent = _progressPercent;
}
}
var _local2 = SEEK_BAR;
while (_local2 <= VOLUME_BAR) {
var _local4 = controls[_local2];
if (_local4.progress_mc != undefined) {
positionBar(_local4, "progress", _progressPercent);
}
_local2++;
}
}
_vc.__set__activeVideoPlayerIndex(_local9);
}
function get bufferingBarHidesAndDisablesOthers() {
return(_bufferingBarHides);
}
function set bufferingBarHidesAndDisablesOthers(b) {
_bufferingBarHides = b;
//return(bufferingBarHidesAndDisablesOthers);
}
function get controlsEnabled() {
return(_controlsEnabled);
}
function set controlsEnabled(flag) {
if (_controlsEnabled == flag) {
return;
}
_controlsEnabled = flag;
var _local2 = 0;
while (_local2 < NUM_BUTTONS) {
if (controls[_local2] == undefined) {
} else {
controls[_local2].releaseCapture();
controls[_local2].enabled = _controlsEnabled && (controls[_local2].myEnabled);
skinButtonControl(controls[_local2]);
}
_local2++;
}
//return(controlsEnabled);
}
function get skin() {
return(_skin);
}
function set skin(s) {
if (s == _skin) {
return;
}
if (_skin != undefined) {
removeSkin();
}
_skin = s;
_skinReady = ((_skin == undefined) || (_skin == null)) || (_skin == "");
if (!_skinReady) {
downloadSkin();
}
//return(skin);
}
function get skinAutoHide() {
return(_skinAutoHide);
}
function set skinAutoHide(b) {
if (b == _skinAutoHide) {
return;
}
_skinAutoHide = b;
setupSkinAutoHide();
//return(skinAutoHide);
}
function get skinReady() {
return(_skinReady);
}
function get seekBarInterval() {
return(_seekBarInterval);
}
function set seekBarInterval(s) {
if (_seekBarInterval == s) {
return;
}
_seekBarInterval = s;
if (_seekBarIntervalID > 0) {
clearInterval(_seekBarIntervalID);
_seekBarIntervalID = setInterval(this, "seekBarListener", _seekBarInterval, false);
}
//return(seekBarInterval);
}
function get volumeBarInterval() {
return(_volumeBarInterval);
}
function set volumeBarInterval(s) {
if (_volumeBarInterval == s) {
return;
}
_volumeBarInterval = s;
if (_volumeBarIntervalID > 0) {
clearInterval(_volumeBarIntervalID);
_volumeBarIntervalID = setInterval(this, "volumeBarListener", _volumeBarInterval, false);
}
//return(volumeBarInterval);
}
function get bufferingDelayInterval() {
return(_bufferingDelayInterval);
}
function set bufferingDelayInterval(s) {
if (_bufferingDelayInterval == s) {
return;
}
_bufferingDelayInterval = s;
if (_bufferingDelayIntervalID > 0) {
clearInterval(_bufferingDelayIntervalID);
_bufferingDelayIntervalID = setInterval(this, "doBufferingDelay", _bufferingDelayIntervalID);
}
//return(bufferingDelayInterval);
}
function get volumeBarScrubTolerance() {
return(_volumeBarScrubTolerance);
}
function set volumeBarScrubTolerance(s) {
_volumeBarScrubTolerance = s;
//return(volumeBarScrubTolerance);
}
function get seekBarScrubTolerance() {
return(_seekBarScrubTolerance);
}
function set seekBarScrubTolerance(s) {
_seekBarScrubTolerance = s;
//return(seekBarScrubTolerance);
}
function get visible() {
return(__visible);
}
function set visible(v) {
if (__visible == v) {
return;
}
__visible = v;
if (!__visible) {
skin_mc._visible = false;
} else {
setupSkinAutoHide();
}
//return(visible);
}
function getControl(index) {
return(controls[index]);
}
function setControl(index, s) {
if (s == null) {
s = undefined;
}
if (s == controls[index]) {
return(undefined);
}
switch (index) {
case PAUSE_BUTTON :
case PLAY_BUTTON :
resetPlayPause();
break;
case PLAY_PAUSE_BUTTON :
if (s._parent != layout_mc) {
resetPlayPause();
setControl(PAUSE_BUTTON, s.pause_mc);
setControl(PLAY_BUTTON, s.play_mc);
}
break;
case MUTE_BUTTON :
if (s._parent == layout_mc) {
break;
}
setControl(MUTE_ON_BUTTON, s.on_mc);
setControl(MUTE_OFF_BUTTON, s.off_mc);
}
if (index >= NUM_BUTTONS) {
controls[index] = s;
switch (index) {
case SEEK_BAR :
addBarControl(SEEK_BAR);
break;
case VOLUME_BAR :
addBarControl(VOLUME_BAR);
controls[VOLUME_BAR].percentage = _vc.volume;
break;
case BUFFERING_BAR :
controls[BUFFERING_BAR].uiMgr = this;
controls[BUFFERING_BAR].controlIndex = BUFFERING_BAR;
if (controls[BUFFERING_BAR]._parent == skin_mc) {
finishAddBufferingBar();
} else {
controls[BUFFERING_BAR].onEnterFrame = function () {
this.uiMgr.finishAddBufferingBar();
};
}
}
setEnabledAndVisibleForState(index, _vc.__get__state());
} else {
removeButtonControl(index);
controls[index] = s;
addButtonControl(index);
}
}
function resetPlayPause() {
if (controls[PLAY_PAUSE_BUTTON] == undefined) {
return(undefined);
}
var _local2 = PAUSE_BUTTON;
while (_local2 <= PLAY_BUTTON) {
removeButtonControl(_local2);
_local2++;
}
controls[PLAY_PAUSE_BUTTON] = undefined;
}
function addButtonControl(index) {
var _local3 = controls[index];
if (_local3 == undefined) {
return(undefined);
}
var _local5 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
_local3.id = index;
_local3.state = UP_STATE;
_local3.uiMgr = this;
setEnabledAndVisibleForState(index, _vc.__get__state());
_local3.onRollOver = function () {
this.state = mx.video.UIManager.OVER_STATE;
this.uiMgr.skinButtonControl(this);
};
_local3.onRollOut = function () {
this.state = mx.video.UIManager.UP_STATE;
this.uiMgr.skinButtonControl(this);
};
if ((index == SEEK_BAR_HANDLE) || (index == VOLUME_BAR_HANDLE)) {
_local3.onPress = function () {
if (_root.focusManager) {
this._focusrect = false;
Selection.setFocus(this);
}
this.state = mx.video.UIManager.DOWN_STATE;
this.uiMgr.dispatchMessage(this);
this.uiMgr.skinButtonControl(this);
};
_local3.onRelease = function () {
this.state = mx.video.UIManager.OVER_STATE;
this.uiMgr.handleRelease(this.controlIndex);
this.uiMgr.skinButtonControl(this);
};
_local3.onReleaseOutside = function () {
this.state = mx.video.UIManager.UP_STATE;
this.uiMgr.handleRelease(this.controlIndex);
this.uiMgr.skinButtonControl(this);
};
} else {
_local3.onPress = function () {
if (_root.focusManager) {
this._focusrect = false;
Selection.setFocus(this);
}
this.state = mx.video.UIManager.DOWN_STATE;
this.uiMgr.skinButtonControl(this);
};
_local3.onRelease = function () {
this.state = mx.video.UIManager.OVER_STATE;
this.uiMgr.dispatchMessage(this);
this.uiMgr.skinButtonControl(this);
};
_local3.onReleaseOutside = function () {
this.state = mx.video.UIManager.UP_STATE;
this.uiMgr.skinButtonControl(this);
};
}
if (_local3._parent == skin_mc) {
skinButtonControl(_local3);
} else {
_local3.onEnterFrame = function () {
this.uiMgr.skinButtonControl(this);
};
}
_vc.__set__activeVideoPlayerIndex(_local5);
}
function removeButtonControl(index) {
if (controls[index] == undefined) {
return(undefined);
}
controls[index].uiMgr = undefined;
controls[index].onRollOver = undefined;
controls[index].onRollOut = undefined;
controls[index].onPress = undefined;
controls[index].onRelease = undefined;
controls[index].onReleaseOutside = undefined;
controls[index] = undefined;
}
function downloadSkin() {
if (skinLoader == undefined) {
skinLoader = new MovieClipLoader();
skinLoader.addListener(this);
}
if (skin_mc == undefined) {
skin_mc = _vc.createEmptyMovieClip("skin_mc", _vc.getNextHighestDepth());
}
skin_mc._visible = false;
skin_mc._x = Stage.width + 100;
skin_mc._y = Stage.height + 100;
skinLoader.loadClip(_skin, skin_mc);
}
function onLoadError(target_mc, errorCode) {
_skinReady = true;
_vc.skinError("Unable to load skin swf");
}
function onLoadInit() {
try {
skin_mc._visible = false;
skin_mc._x = 0;
skin_mc._y = 0;
layout_mc = skin_mc.layout_mc;
if (layout_mc == undefined) {
throw new Error("No layout_mc");
}
layout_mc._visible = false;
customClips = new Array();
setCustomClips("bg");
if (layout_mc.playpause_mc != undefined) {
setSkin(PLAY_PAUSE_BUTTON, layout_mc.playpause_mc);
} else {
setSkin(PAUSE_BUTTON, layout_mc.pause_mc);
setSkin(PLAY_BUTTON, layout_mc.play_mc);
}
setSkin(STOP_BUTTON, layout_mc.stop_mc);
setSkin(BACK_BUTTON, layout_mc.back_mc);
setSkin(FORWARD_BUTTON, layout_mc.forward_mc);
setSkin(MUTE_BUTTON, layout_mc.volumeMute_mc);
setSkin(SEEK_BAR, layout_mc.seekBar_mc);
setSkin(VOLUME_BAR, layout_mc.volumeBar_mc);
setSkin(BUFFERING_BAR, layout_mc.bufferingBar_mc);
setCustomClips("fg");
layoutSkin();
setupSkinAutoHide();
skin_mc._visible = __visible;
_skinReady = true;
_vc.skinLoaded();
var _local4 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
var _local3 = _vc.__get__state();
var _local2 = 0;
while (_local2 < NUM_CONTROLS) {
if (controls[_local2] == undefined) {
} else {
setEnabledAndVisibleForState(_local2, _local3);
if (_local2 < NUM_BUTTONS) {
skinButtonControl(controls[_local2]);
}
}
_local2++;
}
_vc.__set__activeVideoPlayerIndex(_local4);
} catch(err:Error) {
_vc.skinError(err.message);
removeSkin();
}
}
function layoutSkin() {
if (layout_mc == undefined) {
return(undefined);
}
var _local3 = layout_mc.video_mc;
if (_local3 == undefined) {
throw new Error("No layout_mc.video_mc");
}
placeholderLeft = _local3._x;
placeholderRight = _local3._x + _local3._width;
placeholderTop = _local3._y;
placeholderBottom = _local3._y + _local3._height;
videoLeft = 0;
videoRight = _vc.width;
videoTop = 0;
videoBottom = _vc.height;
if (((!isNaN(layout_mc.minWidth)) && (layout_mc.minWidth > 0)) && (layout_mc.minWidth > videoRight)) {
videoLeft = videoLeft - ((layout_mc.minWidth - videoRight) / 2);
videoRight = layout_mc.minWidth + videoLeft;
}
if (((!isNaN(layout_mc.minHeight)) && (layout_mc.minHeight > 0)) && (layout_mc.minHeight > videoBottom)) {
videoTop = videoTop - ((layout_mc.minHeight - videoBottom) / 2);
videoBottom = layout_mc.minHeight + videoTop;
}
var _local2;
_local2 = 0;
while (_local2 < customClips.length) {
layoutControl(customClips[_local2]);
_local2++;
}
_local2 = 0;
while (_local2 < NUM_CONTROLS) {
layoutControl(controls[_local2]);
_local2++;
}
}
function layoutControl(ctrl) {
if (ctrl == undefined) {
return(undefined);
}
if (ctrl.skin.anchorRight) {
if (ctrl.skin.anchorLeft) {
ctrl._x = (ctrl.skin._x - placeholderLeft) + videoLeft;
ctrl._width = (((ctrl.skin._x + ctrl.skin._width) - placeholderRight) + videoRight) - ctrl._x;
if (ctrl.origWidth != undefined) {
ctrl.origWidth = undefined;
}
} else {
ctrl._x = (ctrl.skin._x - placeholderRight) + videoRight;
}
} else {
ctrl._x = (ctrl.skin._x - placeholderLeft) + videoLeft;
}
if (ctrl.skin.anchorTop) {
if (ctrl.skin.anchorBottom) {
ctrl._y = (ctrl.skin._y - placeholderTop) + videoTop;
ctrl._height = (((ctrl.skin._y + ctrl.skin._height) - placeholderBottom) + videoBottom) - ctrl._y;
if (ctrl.origHeight != undefined) {
ctrl.origHeight = undefined;
}
} else {
ctrl._y = (ctrl.skin._y - placeholderTop) + videoTop;
}
} else {
ctrl._y = (ctrl.skin._y - placeholderBottom) + videoBottom;
}
switch (ctrl.controlIndex) {
case SEEK_BAR :
case VOLUME_BAR :
if (ctrl.progress_mc != undefined) {
if (_progressPercent == undefined) {
_progressPercent = (_vc.__get__isRTMP() ? 100 : 0);
}
positionBar(ctrl, "progress", _progressPercent);
}
positionHandle(ctrl.controlIndex);
break;
case BUFFERING_BAR :
if (ctrl.fill_mc == undefined) {
break;
}
positionMaskedFill(ctrl, ctrl.fill_mc, 100);
}
if (ctrl.layoutSelf != undefined) {
ctrl.layoutSelf();
}
}
function removeSkin() {
if (skin_mc != undefined) {
var _local2 = 0;
while (_local2 < NUM_BUTTONS) {
removeButtonControl(_local2);
_local2++;
}
_local2 = NUM_BUTTONS;
while (_local2 < NUM_CONTROLS) {
controls[_local2] = undefined;
_local2++;
}
skin_mc.unloadMovie();
layout_mc = undefined;
border_mc = undefined;
}
}
function setCustomClips(prefix) {
var _local4 = 1;
while (true) {
var _local2 = layout_mc[(prefix + (_local4++)) + "_mc"];
if (_local2 == undefined) {
break;
}
var _local3 = _local2.mc;
if (_local3 == undefined) {
_local3 = _local2._parent._parent[_local2._name];
}
if (_local3 == undefined) {
throw new Error("Bad clip in skin: " + _local2);
}
_local3.skin = _local2;
customClips.push(_local3);
if ((prefix == "bg") && (_local4 == 2)) {
border_mc = _local3;
}
}
}
function setSkin(index, s) {
if (s == undefined) {
return(undefined);
}
var _local2 = s.mc;
if (_local2 == undefined) {
_local2 = s._parent._parent[s._name];
}
if (_local2 == undefined) {
throw new Error("Bad clip in skin: " + s);
}
_local2.skin = s;
if (index < NUM_BUTTONS) {
setupSkinStates(_local2);
} else {
switch (index) {
case PLAY_PAUSE_BUTTON :
setupSkinStates(_local2.play_mc);
setupSkinStates(_local2.pause_mc);
break;
case MUTE_BUTTON :
setupSkinStates(_local2.on_mc);
setupSkinStates(_local2.off_mc);
break;
case SEEK_BAR :
case VOLUME_BAR :
var _local4 = ((index == SEEK_BAR) ? "seekBar" : "volumeBar");
if (_local2.handle_mc == undefined) {
_local2.handle_mc = _local2.skin.seekBarHandle_mc;
if (_local2.handle_mc == undefined) {
_local2.handle_mc = _local2.skin._parent._parent[_local4 + "Handle_mc"];
}
}
if (_local2.progress_mc == undefined) {
_local2.progress_mc = _local2.skin.progress_mc;
if (_local2.progress_mc == undefined) {
_local2.progress_mc = _local2.skin._parent._parent[_local4 + "Progress_mc"];
}
}
if (_local2.fullness_mc == undefined) {
_local2.fullness_mc = _local2.skin.fullness_mc;
if (_local2.fullness_mc == undefined) {
_local2.fullness_mc = _local2.skin._parent._parent[_local4 + "Fullness_mc"];
}
}
break;
case BUFFERING_BAR :
if (_local2.fill_mc != undefined) {
break;
}
_local2.fill_mc = _local2.skin.fill_mc;
if (_local2.fill_mc != undefined) {
break;
}
_local2.fill_mc = _local2.skin._parent._parent.bufferingBarFill_mc;
}
}
setControl(index, _local2);
}
function setupSkinStates(ctrl) {
if (ctrl.up_mc == undefined) {
ctrl.up_mc = ctrl;
ctrl.over_mc = ctrl;
ctrl.down_mc = ctrl;
ctrl.disabled_mc = ctrl;
} else {
ctrl._x = 0;
ctrl._y = 0;
ctrl.up_mc._x = 0;
ctrl.up_mc._y = 0;
ctrl.up_mc._visible = true;
if (ctrl.over_mc == undefined) {
ctrl.over_mc = ctrl.up_mc;
} else {
ctrl.over_mc._x = 0;
ctrl.over_mc._y = 0;
ctrl.over_mc._visible = false;
}
if (ctrl.down_mc == undefined) {
ctrl.down_mc = ctrl.up_mc;
} else {
ctrl.down_mc._x = 0;
ctrl.down_mc._y = 0;
ctrl.down_mc._visible = false;
}
if (ctrl.disabled_mc == undefined) {
ctrl.disabled_mc_mc = ctrl.up_mc;
} else {
ctrl.disabled_mc._x = 0;
ctrl.disabled_mc._y = 0;
ctrl.disabled_mc._visible = false;
}
}
}
function skinButtonControl(ctrl) {
if (ctrl.onEnterFrame != undefined) {
delete ctrl.onEnterFrame;
ctrl.onEnterFrame = undefined;
}
if (ctrl.enabled) {
switch (ctrl.state) {
case UP_STATE :
if (ctrl.up_mc == undefined) {
ctrl.up_mc = ctrl.attachMovie(ctrl.upLinkageID, "up_mc", ctrl.getNextHighestDepth());
}
applySkinState(ctrl, ctrl.up_mc);
break;
case OVER_STATE :
if (ctrl.over_mc == undefined) {
if (ctrl.overLinkageID == undefined) {
ctrl.over_mc = ctrl.up_mc;
} else {
ctrl.over_mc = ctrl.attachMovie(ctrl.overLinkageID, "over_mc", ctrl.getNextHighestDepth());
}
}
applySkinState(ctrl, ctrl.over_mc);
break;
case DOWN_STATE :
if (ctrl.down_mc == undefined) {
if (ctrl.downLinkageID == undefined) {
ctrl.down_mc = ctrl.up_mc;
} else {
ctrl.down_mc = ctrl.attachMovie(ctrl.downLinkageID, "down_mc", ctrl.getNextHighestDepth());
}
}
applySkinState(ctrl, ctrl.down_mc);
}
} else {
ctrl.state = UP_STATE;
if (ctrl.disabled_mc == undefined) {
if (ctrl.disabledLinkageID == undefined) {
ctrl.disabled_mc = ctrl.up_mc;
} else {
ctrl.disabled_mc = ctrl.attachMovie(ctrl.disabledLinkageID, "disabled_mc", ctrl.getNextHighestDepth());
}
}
applySkinState(ctrl, ctrl.disabled_mc);
}
if (ctrl.placeholder_mc != undefined) {
ctrl.placeholder_mc.unloadMovie();
delete ctrl.placeholder_mc;
ctrl.placeholder_mc = undefined;
}
}
function applySkinState(ctrl, state) {
if (state != ctrl.currentState_mc) {
if (state != undefined) {
state._visible = true;
}
if (ctrl.currentState_mc != undefined) {
ctrl.currentState_mc._visible = false;
}
ctrl.currentState_mc = state;
}
}
function addBarControl(controlIndex) {
var _local2 = controls[controlIndex];
_local2.isDragging = false;
_local2.percentage = 0;
_local2.uiMgr = this;
_local2.controlIndex = controlIndex;
if (_local2._parent == skin_mc) {
finishAddBarControl(controlIndex);
} else {
_local2.onEnterFrame = function () {
this.uiMgr.finishAddBarControl(this.controlIndex);
};
}
}
function finishAddBarControl(controlIndex) {
var _local2 = controls[controlIndex];
delete _local2.onEnterFrame;
_local2.onEnterFrame = undefined;
if (_local2.addBarControl != undefined) {
_local2.addBarControl();
}
calcBarMargins(_local2, "handle", true);
calcBarMargins(_local2, "progress", false);
calcBarMargins(_local2.progress_mc, "fill", false);
calcBarMargins(_local2.progress_mc, "mask", false);
calcBarMargins(_local2, "fullness", false);
calcBarMargins(_local2.fullness_mc, "fill", false);
calcBarMargins(_local2.fullness_mc, "mask", false);
_local2.origWidth = _local2._width;
_local2.origHeight = _local2._height;
fixUpBar(_local2, "progress");
if (_local2.progress_mc != undefined) {
fixUpBar(_local2, "progressBarFill");
if (_progressPercent == undefined) {
_progressPercent = (_vc.__get__isRTMP() ? 100 : 0);
}
positionBar(_local2, "progress", _progressPercent);
}
fixUpBar(_local2, "fullness");
if (_local2.fullness_mc != undefined) {
fixUpBar(_local2, "fullnessBarFill");
}
fixUpBar(_local2, "handle");
_local2.handle_mc.controlIndex = controlIndex;
switch (controlIndex) {
case SEEK_BAR :
setControl(SEEK_BAR_HANDLE, _local2.handle_mc);
break;
case VOLUME_BAR :
setControl(VOLUME_BAR_HANDLE, _local2.handle_mc);
}
positionHandle(controlIndex);
}
function fixUpBar(ctrl, type) {
if ((ctrl[type + "LinkageID"] != undefined) && (ctrl[type + "LinkageID"].length > 0)) {
var _local1;
if (ctrl[type + "Below"]) {
_local1 = -1;
while (ctrl._parent.getInstanceAtDepth(_local1) != undefined) {
_local1--;
}
} else {
ctrl[type + "Below"] = false;
_local1 = ctrl._parent.getNextHighestDepth();
}
ctrl[type + "_mc"] = ctrl._parent.attachMovie(ctrl[type + "LinkageID"], type + "_mc", _local1);
}
}
function calcBarMargins(ctrl, type, symmetricMargins) {
var _local2 = ctrl[type + "_mc"];
if (_local2 == undefined) {
return(undefined);
}
if ((ctrl[type + "LeftMargin"] == undefined) && (_local2._parent == ctrl._parent)) {
ctrl[type + "LeftMargin"] = _local2._x - ctrl._x;
}
if (ctrl[type + "RightMargin"] == undefined) {
if (symmetricMargins) {
ctrl[type + "RightMargin"] = ctrl[type + "LeftMargin"];
} else if (_local2._parent == ctrl._parent) {
ctrl[type + "RightMargin"] = ((ctrl._width - _local2._width) - _local2._x) + ctrl._x;
}
}
if ((ctrl[type + "TopMargin"] == undefined) && (_local2._parent == ctrl._parent)) {
ctrl[type + "TopMargin"] = _local2._y - ctrl._y;
}
if (ctrl[type + "BottomMargin"] == undefined) {
if (symmetricMargins) {
ctrl[type + "BottomMargin"] = ctrl[type + "TopMargin"];
} else if (_local2._parent == ctrl._parent) {
ctrl[type + "BottomMargin"] = ((ctrl._height - _local2._height) - _local2._y) + ctrl._y;
}
}
if (ctrl[type + "X"] == undefined) {
if (_local2._parent == ctrl._parent) {
ctrl[type + "X"] = _local2._x - ctrl._x;
} else if (_local2._parent == ctrl) {
ctrl[type + "X"] = _local2._x;
}
}
if (ctrl[type + "Y"] == undefined) {
if (_local2._parent == ctrl._parent) {
ctrl[type + "Y"] = _local2._y - ctrl._y;
} else if (_local2._parent == ctrl) {
ctrl[type + "Y"] = _local2._y;
}
}
ctrl[type + "XScale"] = _local2._xscale;
ctrl[type + "YScale"] = _local2._yscale;
ctrl[type + "Width"] = _local2._width;
ctrl[type + "Height"] = _local2._height;
}
function finishAddBufferingBar() {
var _local2 = controls[BUFFERING_BAR];
delete _local2.onEnterFrame;
_local2.onEnterFrame = undefined;
calcBarMargins(_local2, "fill", true);
fixUpBar(_local2, "fill");
if (_local2.fill_mc != undefined) {
positionMaskedFill(_local2, _local2.fill_mc, 100);
}
}
function positionMaskedFill(ctrl, fill, percent) {
var _local5 = fill._parent;
var _local3 = ctrl.mask_mc;
if (_local3 == undefined) {
_local3 = _local5.createEmptyMovieClip(ctrl._name + "Mask_mc", _local5.getNextHighestDepth());
ctrl.mask_mc = _local3;
_local3.beginFill(16777215);
_local3.lineTo(0, 0);
_local3.lineTo(1, 0);
_local3.lineTo(1, 1);
_local3.lineTo(0, 1);
_local3.lineTo(0, 0);
_local3.endFill();
fill.setMask(_local3);
_local3._x = ctrl.fillX;
_local3._y = ctrl.fillY;
_local3._width = ctrl.fillWidth;
_local3._height = ctrl.fillHeight;
_local3._visible = false;
calcBarMargins(ctrl, "mask", true);
}
if (_local5 == ctrl) {
if (fill.slideReveal) {
fill._x = (ctrl.maskX - ctrl.fillWidth) + ((ctrl.fillWidth * percent) / 100);
} else {
_local3._width = (ctrl.fillWidth * percent) / 100;
}
} else if (_local5 == ctrl._parent) {
if (fill.slideReveal) {
_local3._x = ctrl._x + ctrl.maskLeftMargin;
_local3._y = ctrl._y + ctrl.maskTopMargin;
_local3._width = (ctrl._width - ctrl.maskRightMargin) - ctrl.maskLeftMargin;
_local3._height = (ctrl._height - ctrl.maskTopMargin) - ctrl.maskBottomMargin;
fill._x = (_local3._x - ctrl.fillWidth) + ((ctrl.maskWidth * percent) / 100);
fill._y = ctrl._y + ctrl.fillTopMargin;
} else {
fill._x = ctrl._x + ctrl.fillLeftMargin;
fill._y = ctrl._y + ctrl.fillTopMargin;
_local3._x = fill._x;
_local3._y = fill._y;
_local3._width = (((ctrl._width - ctrl.fillRightMargin) - ctrl.fillLeftMargin) * percent) / 100;
_local3._height = (ctrl._height - ctrl.fillTopMargin) - ctrl.fillBottomMargin;
}
}
}
function startHandleDrag(controlIndex) {
var _local2 = controls[controlIndex];
var _local5 = _local2.handle_mc;
if ((_local2.startHandleDrag == undefined) || (!_local2.startHandleDrag())) {
var _local3 = _local2._y + _local2.handleY;
var _local4 = ((_local2.origWidth == undefined) ? (_local2._width) : (_local2.origWidth));
_local5.startDrag(false, _local2._x + _local2.handleLeftMargin, _local3, (_local2._x + _local4) - _local2.handleRightMargin, _local3);
}
_local2.isDragging = true;
}
function stopHandleDrag(controlIndex) {
var _local2 = controls[controlIndex];
var _local3 = _local2.handle_mc;
if ((_local2.stopHandleDrag == undefined) || (!_local2.stopHandleDrag())) {
_local3.stopDrag();
}
_local2.isDragging = false;
}
function positionHandle(controlIndex) {
var _local2 = controls[controlIndex];
var _local3 = _local2.handle_mc;
if (_local3 == undefined) {
return(undefined);
}
if ((_local2.positionHandle != undefined) && (_local2.positionHandle())) {
return(undefined);
}
var _local4 = ((_local2.origWidth == undefined) ? (_local2._width) : (_local2.origWidth));
var _local5 = (_local4 - _local2.handleRightMargin) - _local2.handleLeftMargin;
_local3._x = (_local2._x + _local2.handleLeftMargin) + ((_local5 * _local2.percentage) / 100);
_local3._y = _local2._y + _local2.handleY;
if (_local2.fullness_mc != undefined) {
positionBar(_local2, "fullness", _local2.percentage);
}
}
function positionBar(ctrl, type, percent) {
if ((ctrl.positionBar != undefined) && (ctrl.positionBar(type, percent))) {
return(undefined);
}
var _local2 = ctrl[type + "_mc"];
if (_local2._parent == ctrl) {
if (_local2.fill_mc == undefined) {
_local2._xscale = (ctrl[type + "XScale"] * percent) / 100;
} else {
positionMaskedFill(_local2, _local2.fill_mc, percent);
}
} else {
_local2._x = ctrl._x + ctrl[type + "LeftMargin"];
_local2._y = ctrl._y + ctrl[type + "Y"];
if (_local2.fill_mc == undefined) {
_local2._width = (((ctrl._width - ctrl[type + "LeftMargin"]) - ctrl[type + "RightMargin"]) * percent) / 100;
} else {
positionMaskedFill(_local2, _local2.fill_mc, percent);
}
}
}
function calcPercentageFromHandle(controlIndex) {
var _local2 = controls[controlIndex];
var _local5 = _local2.handle_mc;
if ((_local2.calcPercentageFromHandle == undefined) || (!_local2.calcPercentageFromHandle())) {
var _local3 = ((_local2.origWidth == undefined) ? (_local2._width) : (_local2.origWidth));
var _local6 = (_local3 - _local2.handleRightMargin) - _local2.handleLeftMargin;
var _local4 = _local5._x - (_local2._x + _local2.handleLeftMargin);
_local2.percentage = (_local4 / _local6) * 100;
if (_local2.fullness_mc != undefined) {
positionBar(_local2, "fullness", _local2.percentage);
}
}
if (_local2.percentage < 0) {
_local2.percentage = 0;
}
if (_local2.percentage > 100) {
_local2.percentage = 100;
}
}
function handleRelease(controlIndex) {
var _local3 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
if (controlIndex == SEEK_BAR) {
seekBarListener(true);
} else if (controlIndex == VOLUME_BAR) {
volumeBarListener(true);
}
stopHandleDrag(controlIndex);
_vc.__set__activeVideoPlayerIndex(_local3);
if (controlIndex == SEEK_BAR) {
_vc._scrubFinish();
}
}
function seekBarListener(finish) {
var _local3 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
var _local4 = controls[SEEK_BAR];
calcPercentageFromHandle(SEEK_BAR);
var _local2 = _local4.percentage;
if (finish) {
clearInterval(_seekBarIntervalID);
_seekBarIntervalID = 0;
if (_local2 != _lastScrubPos) {
_vc.seekPercent(_local2);
}
_vc.addEventListener("playheadUpdate", this);
if (_playAfterScrub) {
_vc.play();
}
} else if (_vc.getVideoPlayer(_vc.__get__visibleVideoPlayerIndex()).__get__state() == mx.video.VideoPlayer.SEEKING) {
} else if ((((_seekBarScrubTolerance <= 0) || (Math.abs(_local2 - _lastScrubPos) > _seekBarScrubTolerance)) || (_local2 < _seekBarScrubTolerance)) || (_local2 > (100 - _seekBarScrubTolerance))) {
if (_local2 != _lastScrubPos) {
_lastScrubPos = _local2;
_vc.seekPercent(_local2);
}
}
_vc.__set__activeVideoPlayerIndex(_local3);
}
function volumeBarListener(finish) {
var _local3 = controls[VOLUME_BAR];
calcPercentageFromHandle(VOLUME_BAR);
var _local2 = _local3.percentage;
if (finish) {
clearInterval(_volumeBarIntervalID);
_volumeBarIntervalID = 0;
_vc.addEventListener("volumeUpdate", this);
}
if ((((finish || (_volumeBarScrubTolerance <= 0)) || (Math.abs(_local2 - _lastVolumePos) > _volumeBarScrubTolerance)) || (_local2 < _volumeBarScrubTolerance)) || (_local2 > (100 - _volumeBarScrubTolerance))) {
if (_local2 != _lastVolumePos) {
if (_isMuted) {
cachedSoundLevel = _local2;
} else {
_vc.__set__volume(_local2);
}
}
}
}
function doBufferingDelay() {
clearInterval(_bufferingDelayIntervalID);
_bufferingDelayIntervalID = 0;
var _local2 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
if (_vc.__get__state() == mx.video.FLVPlayback.BUFFERING) {
_bufferingOn = true;
handleEvent({type:"stateChange", state:mx.video.FLVPlayback.BUFFERING, vp:_vc.__get__visibleVideoPlayerIndex()});
}
_vc.__set__activeVideoPlayerIndex(_local2);
}
function dispatchMessage(ctrl) {
if (ctrl.id == SEEK_BAR_HANDLE) {
_vc._scrubStart();
}
var _local2 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
switch (ctrl.id) {
case PAUSE_BUTTON :
_vc.pause();
break;
case PLAY_BUTTON :
_vc.play();
break;
case STOP_BUTTON :
_vc.stop();
break;
case SEEK_BAR_HANDLE :
calcPercentageFromHandle(SEEK_BAR);
_lastScrubPos = controls[SEEK_BAR].percentage;
_vc.removeEventListener("playheadUpdate", this);
if (_vc.__get__playing() || (_vc.__get__buffering())) {
_playAfterScrub = true;
} else if (_vc.__get__state() != mx.video.VideoPlayer.SEEKING) {
_playAfterScrub = false;
}
_seekBarIntervalID = setInterval(this, "seekBarListener", _seekBarInterval, false);
startHandleDrag(SEEK_BAR, SEEK_BAR_HANDLE);
_vc.pause();
break;
case VOLUME_BAR_HANDLE :
calcPercentageFromHandle(VOLUME_BAR);
_lastVolumePos = controls[VOLUME_BAR].percentage;
_vc.removeEventListener("volumeUpdate", this);
_volumeBarIntervalID = setInterval(this, "volumeBarListener", _volumeBarInterval, false);
startHandleDrag(VOLUME_BAR, VOLUME_BAR_HANDLE);
break;
case BACK_BUTTON :
_vc.seekToPrevNavCuePoint();
break;
case FORWARD_BUTTON :
_vc.seekToNextNavCuePoint();
break;
case MUTE_ON_BUTTON :
case MUTE_OFF_BUTTON :
if (!_isMuted) {
_isMuted = true;
cachedSoundLevel = _vc.volume;
_vc.__set__volume(0);
} else {
_isMuted = false;
_vc.__set__volume(cachedSoundLevel);
}
setEnabledAndVisibleForState(MUTE_OFF_BUTTON, mx.video.FLVPlayback.PLAYING);
skinButtonControl(controls[MUTE_OFF_BUTTON]);
setEnabledAndVisibleForState(MUTE_ON_BUTTON, mx.video.FLVPlayback.PLAYING);
skinButtonControl(controls[MUTE_ON_BUTTON]);
break;
default :
throw new Error("Unknown ButtonControl");
}
_vc.__set__activeVideoPlayerIndex(_local2);
}
function setEnabledAndVisibleForState(index, state) {
var _local5 = _vc.__get__activeVideoPlayerIndex();
_vc.__set__activeVideoPlayerIndex(_vc.visibleVideoPlayerIndex);
var _local3 = state;
if ((_local3 == mx.video.FLVPlayback.BUFFERING) && (!_bufferingOn)) {
_local3 = mx.video.FLVPlayback.PLAYING;
}
switch (index) {
case VOLUME_BAR :
case VOLUME_BAR_HANDLE :
controls[index].myEnabled = true;
controls[index].enabled = _controlsEnabled;
break;
case MUTE_ON_BUTTON :
controls[index].myEnabled = !_isMuted;
if (controls[MUTE_BUTTON] != undefined) {
controls[index]._visible = controls[index].myEnabled;
}
break;
case MUTE_OFF_BUTTON :
controls[index].myEnabled = _isMuted;
if (controls[MUTE_BUTTON] != undefined) {
controls[index]._visible = controls[index].myEnabled;
}
break;
default :
switch (_local3) {
case mx.video.FLVPlayback.LOADING :
case mx.video.FLVPlayback.CONNECTION_ERROR :
controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.DISCONNECTED :
controls[index].myEnabled = _vc.__get__contentPath() != undefined;
break;
case mx.video.FLVPlayback.SEEKING :
break;
default :
controls[index].myEnabled = true;
}
}
switch (index) {
case SEEK_BAR :
switch (_local3) {
case mx.video.FLVPlayback.STOPPED :
case mx.video.FLVPlayback.PLAYING :
case mx.video.FLVPlayback.PAUSED :
case mx.video.FLVPlayback.REWINDING :
case mx.video.FLVPlayback.SEEKING :
controls[index].myEnabled = true;
break;
case mx.video.FLVPlayback.BUFFERING :
controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined);
break;
default :
controls[index].myEnabled = false;
}
if (controls[index].myEnabled) {
controls[index].myEnabled = (!isNaN(_vc.__get__totalTime())) && (_vc.__get__totalTime() > 0);
}
controls[index].handle_mc.myEnabled = controls[index].myEnabled;
controls[index].handle_mc.enabled = controls[index].handle_mc.myEnabled;
controls[index].handle_mc._visible = controls[index].myEnabled;
var _local4 = (((!_bufferingBarHides) || (controls[index].myEnabled)) || (controls[BUFFERING_BAR] == undefined)) || (!controls[BUFFERING_BAR]._visible);
controls[index]._visible = _local4;
controls[index].progress_mc._visible = _local4;
controls[index].progress_mc.fill_mc._visible = _local4;
controls[index].fullness_mc._visible = _local4;
controls[index].progress_mc.fill_mc._visible = _local4;
break;
case BUFFERING_BAR :
switch (_local3) {
case mx.video.FLVPlayback.STOPPED :
case mx.video.FLVPlayback.PLAYING :
case mx.video.FLVPlayback.PAUSED :
case mx.video.FLVPlayback.REWINDING :
case mx.video.FLVPlayback.SEEKING :
controls[index].myEnabled = false;
break;
default :
controls[index].myEnabled = true;
}
controls[index]._visible = controls[index].myEnabled;
controls[index].fill_mc._visible = controls[index].myEnabled;
break;
case PAUSE_BUTTON :
switch (_local3) {
case mx.video.FLVPlayback.DISCONNECTED :
case mx.video.FLVPlayback.STOPPED :
case mx.video.FLVPlayback.PAUSED :
case mx.video.FLVPlayback.REWINDING :
controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.PLAYING :
controls[index].myEnabled = true;
break;
case mx.video.FLVPlayback.BUFFERING :
controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined);
}
if (controls[PLAY_PAUSE_BUTTON] != undefined) {
controls[index]._visible = controls[index].myEnabled;
}
break;
case PLAY_BUTTON :
switch (_local3) {
case mx.video.FLVPlayback.PLAYING :
controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.STOPPED :
case mx.video.FLVPlayback.PAUSED :
controls[index].myEnabled = true;
break;
case mx.video.FLVPlayback.BUFFERING :
controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined);
}
if (controls[PLAY_PAUSE_BUTTON] != undefined) {
controls[index]._visible = !controls[PAUSE_BUTTON]._visible;
}
break;
case STOP_BUTTON :
switch (_local3) {
case mx.video.FLVPlayback.DISCONNECTED :
case mx.video.FLVPlayback.STOPPED :
controls[index].myEnabled = false;
break;
case mx.video.FLVPlayback.PAUSED :
case mx.video.FLVPlayback.PLAYING :
case mx.video.FLVPlayback.BUFFERING :
controls[index].myEnabled = true;
}
break;
case BACK_BUTTON :
case FORWARD_BUTTON :
if (!(_local3 === mx.video.FLVPlayback.BUFFERING)) {
} else {
controls[index].myEnabled = (!_bufferingBarHides) || (controls[BUFFERING_BAR] == undefined);
}
}
controls[index].enabled = _controlsEnabled && (controls[index].myEnabled);
_vc.__set__activeVideoPlayerIndex(_local5);
}
function setupSkinAutoHide() {
var _local2 = _vc.getVideoPlayer(_vc.__get__visibleVideoPlayerIndex());
if (_skinAutoHide && (skin_mc != undefined)) {
skinAutoHideHitTest();
if (_skinAutoHideIntervalID == 0) {
_skinAutoHideIntervalID = setInterval(this, "skinAutoHideHitTest", SKIN_AUTO_HIDE_INTERVAL);
}
} else {
skin_mc._visible = __visible;
clearInterval(_skinAutoHideIntervalID);
_skinAutoHideIntervalID = 0;
}
}
function skinAutoHideHitTest() {
if (!__visible) {
skin_mc._visible = false;
} else {
var _local4 = _vc.getVideoPlayer(_vc.__get__visibleVideoPlayerIndex());
var _local3 = _local4.hitTest(_root._xmouse, _root._ymouse, true);
if ((!_local3) && (border_mc != undefined)) {
_local3 = border_mc.hitTest(_root._xmouse, _root._ymouse, true);
}
skin_mc._visible = _local3;
}
}
static var version = "1.0.0.103";
static var PAUSE_BUTTON = 0;
static var PLAY_BUTTON = 1;
static var STOP_BUTTON = 2;
static var SEEK_BAR_HANDLE = 3;
static var BACK_BUTTON = 4;
static var FORWARD_BUTTON = 5;
static var MUTE_ON_BUTTON = 6;
static var MUTE_OFF_BUTTON = 7;
static var VOLUME_BAR_HANDLE = 8;
static var NUM_BUTTONS = 9;
static var PLAY_PAUSE_BUTTON = 9;
static var MUTE_BUTTON = 10;
static var BUFFERING_BAR = 11;
static var SEEK_BAR = 12;
static var VOLUME_BAR = 13;
static var NUM_CONTROLS = 14;
static var UP_STATE = 0;
static var OVER_STATE = 1;
static var DOWN_STATE = 2;
static var SKIN_AUTO_HIDE_INTERVAL = 200;
static var VOLUME_BAR_INTERVAL_DEFAULT = 250;
static var VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT = 0;
static var SEEK_BAR_INTERVAL_DEFAULT = 250;
static var SEEK_BAR_SCRUB_TOLERANCE_DEFAULT = 5;
static var BUFFERING_DELAY_INTERVAL_DEFAULT = 1000;
}
Symbol 21 MovieClip [__Packages.mx.video.SMILManager] Frame 0
class mx.video.SMILManager
{
var _owner, _url, xml, baseURLAttr, videoTags, width, height;
function SMILManager (owner) {
_owner = owner;
}
function connectXML(url) {
_url = url;
xml = new XML();
xml.onLoad = mx.utils.Delegate.create(this, xmlOnLoad);
xml.load(url);
return(false);
}
function xmlOnLoad(success) {
try {
if (!success) {
_owner.helperDone(this, false);
} else {
baseURLAttr = new Array();
videoTags = new Array();
var _local4 = xml.firstChild;
if (_local4.nodeName == null) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" No root node found; if file is an flv it must have .flv extension");
} else if (_local4.nodeName.toLowerCase() != "smil") {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, (("URL: \"" + _url) + "\" Root node not smil: ") + _local4.nodeName);
}
var _local5 = false;
var _local3 = 0;
while (_local3 < _local4.childNodes.length) {
var _local2 = _local4.childNodes[_local3];
if (_local2.nodeType != ELEMENT_NODE) {
} else if (_local2.nodeName.toLowerCase() == "head") {
parseHead(_local2);
} else if (_local2.nodeName.toLowerCase() == "body") {
_local5 = true;
parseBody(_local2);
} else {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((((("URL: \"" + _url) + "\" Tag ") + _local2.nodeName) + " not supported in ") + _local4.nodeName) + " tag.");
}
_local3++;
}
if (!_local5) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" Tag body is required.");
}
_owner.helperDone(this, true);
}
} catch(err:Error) {
_owner.helperDone(this, false);
throw err;
}
}
function parseHead(parentNode) {
var _local4 = false;
var _local3 = 0;
while (_local3 < parentNode.childNodes.length) {
var _local2 = parentNode.childNodes[_local3];
if (_local2.nodeType != ELEMENT_NODE) {
} else if (_local2.nodeName.toLowerCase() == "meta") {
for (var _local6 in _local2.attributes) {
if (_local6.toLowerCase() == "base") {
baseURLAttr.push(_local2.attributes[_local6]);
} else {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((((("URL: \"" + _url) + "\" Attribute ") + _local6) + " not supported in ") + _local2.nodeName) + " tag.");
}
}
} else if (_local2.nodeName.toLowerCase() == "layout") {
if (!_local4) {
parseLayout(_local2);
_local4 = true;
}
}
_local3++;
}
}
function parseLayout(parentNode) {
var _local3 = 0;
while (_local3 < parentNode.childNodes.length) {
var _local2 = parentNode.childNodes[_local3];
if (_local2.nodeType != ELEMENT_NODE) {
} else if (_local2.nodeName.toLowerCase() == "root-layout") {
for (var _local5 in _local2.attributes) {
if (_local5.toLowerCase() == "width") {
width = Number(_local2.attributes[_local5]);
} else if (_local5.toLowerCase() == "height") {
height = Number(_local2.attributes[_local5]);
}
}
if (((isNaN(width) || (width < 0)) || (isNaN(height))) || (height < 0)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((("URL: \"" + _url) + "\" Tag ") + _local2.nodeName) + " requires attributes id, width and height. Width and height must be numbers greater than or equal to 0.");
}
width = Math.round(width);
height = Math.round(height);
return(undefined);
}
_local3++;
}
}
function parseBody(parentNode) {
var _local6 = 0;
var _local3 = 0;
while (_local3 < parentNode.childNodes.length) {
var _local2 = parentNode.childNodes[_local3];
if (_local2.nodeType != ELEMENT_NODE) {
} else {
_local6++;
if (_local6 > 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((("URL: \"" + _url) + "\" Tag ") + parentNode.nodeName) + " is required to contain exactly one tag.");
}
if (_local2.nodeName.toLowerCase() == "switch") {
parseSwitch(_local2);
} else if ((_local2.nodeName.toLowerCase() == "video") || (_local2.nodeName.toLowerCase() == "ref")) {
var _local5 = parseVideo(_local2);
videoTags.push(_local5);
}
}
_local3++;
}
if (videoTags.length < 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ("URL: \"" + _url) + "\" At least one video of ref tag is required.");
}
}
function parseSwitch(parentNode) {
var _local4 = 0;
while (_local4 < parentNode.childNodes.length) {
var _local5 = parentNode.childNodes[_local4];
if (_local5.nodeType != ELEMENT_NODE) {
} else if ((_local5.nodeName.toLowerCase() == "video") || (_local5.nodeName.toLowerCase() == "ref")) {
var _local3 = parseVideo(_local5);
if (_local3.bitrate == undefined) {
videoTags.push(_local3);
} else {
var _local6 = false;
var _local2 = 0;
while (_local2 < videoTags.length) {
if ((videoTags[_local2].bitrate == undefined) || (_local3.bitrate < videoTags[_local4].bitrate)) {
_local6 = true;
videoTags.splice(_local2, 0, videoTags);
break;
}
_local2++;
}
if (!_local6) {
videoTags.push(_local3);
}
}
}
_local4++;
}
}
function parseVideo(node) {
var _local3 = new Object();
for (var _local4 in node.attributes) {
if (_local4.toLowerCase() == "src") {
_local3.src = node.attributes[_local4];
} else if (_local4.toLowerCase() == "system-bitrate") {
_local3.bitrate = Number(node.attributes[_local4]);
} else if (_local4.toLowerCase() == "dur") {
_local3.dur = Number(node.attributes[_local4]);
}
}
if (_local3.src == undefined) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, ((("URL: \"" + _url) + "\" Attribute src is required in ") + node.nodeName) + " tag.");
}
return(_local3);
}
static var version = "1.0.0.103";
static var ELEMENT_NODE = 1;
}
Symbol 22 MovieClip [__Packages.mx.video.NCManager] Frame 0
class mx.video.NCManager implements mx.video.INCManager
{
var _timeoutIntervalId, _tryNCIntervalId, _timeout, _isRTMP, _serverName, _wrappedURL, _portNumber, _appName, _contentPath, _streamName, _streamLength, _streamWidth, _streamHeight, _streams, _autoSenseBW, _payload, _connTypeCounter, _bitrate, _owner, _nc, _protocol, _smilMgr, _ncUri, fallbackServerName, _tryNC;
function NCManager () {
initNCInfo();
initOtherInfo();
_timeoutIntervalId = 0;
_tryNCIntervalId = 0;
_timeout = DEFAULT_TIMEOUT;
}
function initNCInfo() {
_isRTMP = undefined;
_serverName = undefined;
_wrappedURL = undefined;
_portNumber = undefined;
_appName = undefined;
}
function initOtherInfo() {
_contentPath = undefined;
_streamName = undefined;
_streamLength = undefined;
_streamWidth = undefined;
_streamHeight = undefined;
_streams = undefined;
_autoSenseBW = false;
_payload = 0;
_connTypeCounter = 0;
cleanConns();
}
function getTimeout() {
return(_timeout);
}
function setTimeout(t) {
_timeout = t;
if (_timeoutIntervalId != 0) {
clearInterval(_timeoutIntervalId);
_timeoutIntervalId = setInterval(this, "_onFCSConnectTimeOut", _timeout);
}
}
function getBitrate() {
return(_bitrate);
}
function setBitrate(b) {
if ((_isRTMP == undefined) || (!_isRTMP)) {
_bitrate = b;
}
}
function getVideoPlayer() {
return(_owner);
}
function setVideoPlayer(v) {
_owner = v;
}
function getNetConnection() {
return(_nc);
}
function getStreamName() {
return(_streamName);
}
function isRTMP() {
return(_isRTMP);
}
function getStreamLength() {
return(_streamLength);
}
function getStreamWidth() {
return(_streamWidth);
}
function getStreamHeight() {
return(_streamHeight);
}
function connectToURL(url) {
initOtherInfo();
_contentPath = url;
if (((_contentPath == null) || (_contentPath == undefined)) || (_contentPath == "")) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH);
}
var _local2 = parseURL(_contentPath);
if ((_local2.streamName == undefined) || (_local2.streamName == "")) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url);
}
if (_local2.isRTMP) {
var _local3 = canReuseOldConnection(_local2);
_isRTMP = true;
_protocol = _local2.protocol;
_streamName = _local2.streamName;
_serverName = _local2.serverName;
_wrappedURL = _local2.wrappedURL;
_portNumber = _local2.portNumber;
_appName = _local2.appName;
if ((((_appName == undefined) || (_appName == "")) || (_streamName == undefined)) || (_streamName == "")) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url);
}
_autoSenseBW = _streamName.indexOf(",") != -1;
return(_local3 || (connectRTMP()));
}
if (_local2.streamName.slice(-4).toLowerCase() == ".flv") {
var _local3 = canReuseOldConnection(_local2);
_isRTMP = false;
_streamName = _local2.streamName;
return(_local3 || (connectHTTP()));
}
_smilMgr = new mx.video.SMILManager(this);
return(_smilMgr.connectXML(_local2.streamName));
}
function connectAgain() {
var _local2 = _appName.indexOf("/");
if (_local2 < 0) {
_local2 = _streamName.indexOf("/");
if (_local2 >= 0) {
_appName = _appName + "/";
_appName = _appName + _streamName.slice(0, _local2);
_streamName = _streamName.slice(_local2 + 1);
}
return(false);
}
var _local3 = _appName.slice(_local2 + 1);
_local3 = _local3 + "/";
_local3 = _local3 + _streamName;
_streamName = _local3;
_appName = _appName.slice(0, _local2);
close();
_payload = 0;
_connTypeCounter = 0;
cleanConns();
connectRTMP();
return(true);
}
function reconnect() {
if (!_isRTMP) {
throw new Error("Cannot call reconnect on an http connection");
}
_nc.onStatus = function (info) {
this.mc.reconnectOnStatus(this, info);
};
_nc.onBWDone = function () {
this.mc.onReconnected();
};
_nc.connect(_ncUri, false);
}
function onReconnected() {
delete _nc.onStatus;
delete _nc.onBWDone;
_owner.ncReconnected();
}
function close() {
if (_nc) {
_nc.close();
}
}
function helperDone(helper, success) {
if (helper != _smilMgr) {
return(undefined);
}
if (!success) {
_nc = undefined;
_owner.ncConnected();
delete _smilMgr;
return(undefined);
}
_streamWidth = _smilMgr.width;
_streamHeight = _smilMgr.height;
var _local2;
var _local4 = _smilMgr.baseURLAttr[0];
if ((_local4 != undefined) && (_local4 != "")) {
_local2 = parseURL(_local4);
_isRTMP = _local2.isRTMP;
_streamName = _local2.streamName;
if (_isRTMP) {
_protocol = _local2.protocol;
_serverName = _local2.serverName;
_portNumber = _local2.portNumber;
_wrappedURL = _local2.wrappedURL;
_appName = _local2.appName;
if ((_appName == undefined) || (_appName == "")) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Base RTMP URL must include application name: " + _local4);
}
if (_smilMgr.baseURLAttr.length > 1) {
_local2 = parseURL(_smilMgr.baseURLAttr[1]);
if (_local2.serverName != undefined) {
fallbackServerName = _local2.serverName;
}
}
}
}
_streams = _smilMgr.videoTags;
var _local3 = 0;
while (_local3 < _streams.length) {
_local4 = _streams[_local3].src;
_local2 = parseURL(_local4);
if (_isRTMP == undefined) {
_isRTMP = _local2.isRTMP;
if (_isRTMP) {
_protocol = _local2.protocol;
if (_streams.length > 1) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Cannot switch between multiple absolute RTMP URLs, must use meta tag base attribute.");
}
_serverName = _local2.serverName;
_portNumber = _local2.portNumber;
_wrappedURL = _local2.wrappedURL;
_appName = _local2.appName;
if ((_appName == undefined) || (_appName == "")) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "Base RTMP URL must include application name: " + _local4);
}
}
} else if ((((_streamName != undefined) && (_streamName != "")) && (!_local2.isRelative)) && (_streams.length > 1)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_XML, "When using meta tag base attribute, cannot use absolute URLs for video or ref tag src attributes.");
}
_streams[_local3].parseResults = _local2;
_local3++;
}
_autoSenseBW = _streams.length > 1;
if (!_autoSenseBW) {
if (_streamName != undefined) {
_streamName = _streamName + _streams[0].parseResults.streamName;
} else {
_streamName = _streams[0].parseResults.streamName;
}
_streamLength = _streams[0].dur;
}
if (_isRTMP) {
connectRTMP();
} else {
if (_autoSenseBW) {
bitrateMatch();
}
connectHTTP();
_owner.ncConnected();
}
}
function bitrateMatch() {
var _local3;
if (isNaN(_bitrate)) {
_local3 = 0;
} else {
var _local2 = 0;
while (_local2 < _streams.length) {
if (isNaN(_streams[_local2].bitrate) || (_bitrate <= _streams[_local2].bitrate)) {
_local3 = _local2;
break;
}
_local2++;
}
}
if (isNaN(_local3)) {
throw new mx.video.VideoError(mx.video.VideoError.NO_BITRATE_MATCH);
}
if (_streamName != undefined) {
_streamName = _streamName + _streams[_local3].src;
} else {
_streamName = _streams[_local3].src;
}
_streamLength = _streams[_local3].dur;
}
function parseURL(url) {
var _local2 = new Object();
var _local3 = 0;
var _local4 = url.indexOf(":/", _local3);
if (_local4 >= 0) {
_local4 = _local4 + 2;
_local2.protocol = url.slice(_local3, _local4);
_local2.isRelative = false;
} else {
_local2.isRelative = true;
}
if ((_local2.protocol != undefined) && (((_local2.protocol == "rtmp:/") || (_local2.protocol == "rtmpt:/")) || (_local2.protocol == "rtmps:/"))) {
_local2.isRTMP = true;
_local3 = _local4;
if (url.charAt(_local3) == "/") {
_local3++;
var _local7 = url.indexOf(":", _local3);
var _local8 = url.indexOf("/", _local3);
if (_local8 < 0) {
if (_local7 < 0) {
_local2.serverName = url.slice(_local3);
} else {
_local4 = _local7;
_local2.portNumber = url.slice(_local3, _local4);
_local3 = _local4 + 1;
_local2.serverName = url.slice(_local3);
}
return(_local2);
}
if ((_local7 >= 0) && (_local7 < _local8)) {
_local4 = _local7;
_local2.serverName = url.slice(_local3, _local4);
_local3 = _local4 + 1;
_local4 = _local8;
_local2.portNumber = url.slice(_local3, _local4);
} else {
_local4 = _local8;
_local2.serverName = url.slice(_local3, _local4);
}
_local3 = _local4 + 1;
}
if (url.charAt(_local3) == "?") {
var _local9 = url.slice(_local3 + 1);
var _local6 = parseURL(_local9);
if ((_local6.protocol == undefined) || (!_local6.isRTMP)) {
throw new mx.video.VideoError(mx.video.VideoError.INVALID_CONTENT_PATH, url);
}
_local2.wrappedURL = "?";
_local2.wrappedURL = _local2.wrappedURL + _local6.protocol;
if (_local6.server != undefined) {
_local2.wrappedURL = _local2.wrappedURL + "/";
_local2.wrappedURL = _local2.wrappedURL + _local6.server;
}
if (_local6.wrappedURL != undefined) {
_local2.wrappedURL = _local2.wrappedURL + "/?";
_local2.wrappedURL = _local2.wrappedURL + _local6.wrappedURL;
}
_local2.appName = _local6.appName;
_local2.streamName = _local6.streamName;
return(_local2);
}
_local4 = url.indexOf("/", _local3);
if (_local4 < 0) {
_local2.appName = url.slice(_local3);
return(_local2);
}
_local2.appName = url.slice(_local3, _local4);
_local3 = _local4 + 1;
_local4 = url.indexOf("/", _local3);
if (_local4 < 0) {
_local2.streamName = url.slice(_local3);
return(_local2);
}
_local2.appName = _local2.appName + "/";
_local2.appName = _local2.appName + url.slice(_local3, _local4);
_local3 = _local4 + 1;
_local2.streamName = url.slice(_local3);
} else {
_local2.isRTMP = false;
_local2.streamName = url;
}
return(_local2);
}
function canReuseOldConnection(parseResults) {
if ((_nc == undefined) || (_nc == null)) {
return(false);
}
if (!parseResults.isRTMP) {
if (!_isRTMP) {
return(true);
}
_owner.close();
_nc = null;
initNCInfo();
return(false);
}
if (_isRTMP) {
if (((((parseResults.serverName == _serverName) && (parseResults.appName == _appName)) && (parseResults.protocol == _protocol)) && (parseResults.portNumber == _portNumber)) && (parseResults.wrappedURL == _wrappedURL)) {
return(true);
}
_owner.close();
_nc = null;
}
initNCInfo();
return(false);
}
function connectHTTP() {
_nc = new NetConnection();
_nc.connect(null);
return(true);
}
function connectRTMP() {
clearInterval(_timeoutIntervalId);
_timeoutIntervalId = setInterval(this, "_onFCSConnectTimeOut", _timeout);
_tryNC = new Array();
var _local2 = 0;
while (_local2 < RTMP_CONN.length) {
_tryNC[_local2] = new NetConnection();
_tryNC[_local2].mc = this;
_tryNC[_local2].pending = false;
_tryNC[_local2].connIndex = _local2;
_tryNC[_local2].onBWDone = function (p_bw) {
this.mc.onConnected(this, p_bw);
};
_tryNC[_local2].onBWCheck = function () {
return(++this.mc._payload);
};
_tryNC[_local2].onStatus = function (info) {
this.mc.connectOnStatus(this, info);
};
_local2++;
}
nextConnect();
return(false);
}
function nextConnect() {
clearInterval(_tryNCIntervalId);
_tryNCIntervalId = 0;
var _local4;
var _local3;
if (_connTypeCounter == 0) {
_local4 = _protocol;
if (_portNumber != undefined) {
_local3 = _portNumber;
} else {
var _local2 = 0;
while (_local2 < RTMP_CONN.length) {
if (_local4 == RTMP_CONN[_local2].protocol) {
_local3 = RTMP_CONN[_local2].port;
break;
}
_local2++;
}
}
} else {
_local4 = RTMP_CONN[_connTypeCounter].protocol;
_local3 = RTMP_CONN[_connTypeCounter].port;
}
var _local5 = ((_local4 + ((_serverName == undefined) ? "" : (((("/" + _serverName) + ":") + _local3) + "/"))) + ((_wrappedURL == undefined) ? "" : (_wrappedURL + "/"))) + _appName;
_tryNC[_connTypeCounter].pending = true;
_tryNC[_connTypeCounter].connect(_local5, _autoSenseBW);
if (_connTypeCounter < (RTMP_CONN.length - 1)) {
_connTypeCounter++;
_tryNCIntervalId = setInterval(this, "nextConnect", 1500);
}
}
function cleanConns() {
clearInterval(_tryNCIntervalId);
_tryNCIntervalId = 0;
if (_tryNC != undefined) {
var _local2 = 0;
while (_local2 < _tryNC.length) {
if (_tryNC[_local2] != undefined) {
delete _tryNC[_local2].onStatus;
if (_tryNC[_local2].pending) {
_tryNC[_local2].onStatus = function (info) {
this.mc.disconnectOnStatus(this, info);
};
} else {
delete _tryNC[_local2].onStatus;
_tryNC[_local2].close();
}
}
delete _tryNC[_local2];
_local2++;
}
delete _tryNC;
}
}
function tryFallBack() {
if (((_serverName == fallbackServerName) || (fallbackServerName == undefined)) || (fallbackServerName == null)) {
delete _nc;
_nc = undefined;
_owner.ncConnected();
} else {
_connTypeCounter = 0;
cleanConns();
_serverName = fallbackServerName;
connectRTMP();
}
}
function onConnected(p_nc, p_bw) {
clearInterval(_timeoutIntervalId);
_timeoutIntervalId = 0;
delete p_nc.onBWDone;
delete p_nc.onBWCheck;
delete p_nc.onStatus;
_nc = p_nc;
_ncUri = _nc.uri;
if (_autoSenseBW) {
_bitrate = p_bw * 1024;
if (_streams != undefined) {
bitrateMatch();
} else if (_streamName.indexOf(",") != -1) {
var _local3 = _streamName.split(",");
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = stripFrontAndBackWhiteSpace(_local3[_local2]);
if ((_local2 + 1) < _local3.length) {
if (p_bw <= Number(_local3[_local2 + 1])) {
_streamName = _local4;
break;
}
} else {
_streamName = _local4;
break;
}
_local2 = _local2 + 2;
}
}
}
if (_streamName.slice(-4).toLowerCase() == ".flv") {
_streamName = _streamName.slice(0, -4);
}
if ((!_owner.__get__isLive()) && (_streamLength == undefined)) {
var _local6 = new Object();
_local6.mc = this;
_local6.onResult = function (length) {
this.mc.getStreamLengthResult(length);
};
_nc.call("getStreamLength", _local6, _streamName);
} else {
_owner.ncConnected();
}
}
function connectOnStatus(target, info) {
target.pending = false;
if (info.code == "NetConnection.Connect.Success") {
_nc = _tryNC[target.connIndex];
_tryNC[target.connIndex] = undefined;
cleanConns();
} else if (((info.code == "NetConnection.Connect.Failed") || (info.code == "NetConnection.Connect.Rejected")) && (target.connIndex == (RTMP_CONN.length - 1))) {
if (!connectAgain()) {
tryFallBack();
}
}
}
function reconnectOnStatus(target, info) {
if ((info.code == "NetConnection.Connect.Failed") || (info.code == "NetConnection.Connect.Rejected")) {
delete _nc;
_nc = undefined;
_owner.ncReconnected();
}
}
function disconnectOnStatus(target, info) {
if (info.code == "NetConnection.Connect.Success") {
delete target.onStatus;
target.close();
}
}
function getStreamLengthResult(length) {
_streamLength = length;
_owner.ncConnected();
}
function _onFCSConnectTimeOut() {
cleanConns();
_nc = undefined;
if (!connectAgain()) {
_owner.ncConnected();
}
}
static function stripFrontAndBackWhiteSpace(p_str) {
var _local1;
var _local2 = p_str.length;
var _local4 = 0;
var _local5 = _local2;
_local1 = 0;
while (_local1 < _local2) {
switch (p_str.charCodeAt(_local1)) {
case 9 :
case 10 :
case 13 :
case 32 :
break;
default :
_local4 = _local1;
break;!//outer level
}
_local1++;
}
_local1 = _local2;
while (_local1 >= 0) {
switch (p_str.charCodeAt(_local1)) {
case 9 :
case 10 :
case 13 :
case 32 :
break;
default :
_local5 = _local1 + 1;
break;!//outer level
}
_local1--;
}
if (_local5 <= _local4) {
return("");
}
return(p_str.slice(_local4, _local5));
}
static var version = "1.0.0.103";
var DEFAULT_TIMEOUT = 60000;
static var RTMP_CONN = [{protocol:"rtmp:/", port:"1935"}, {protocol:"rtmp:/", port:"443"}, {protocol:"rtmpt:/", port:"80"}, {protocol:"rtmps:/", port:"443"}];
}
Symbol 23 MovieClip [__Packages.mx.video.CuePointManager] Frame 0
class mx.video.CuePointManager
{
var _owner, _id, _asCuePointTolerance, _linearSearchTolerance, _metadataLoaded, allCuePoints, asCuePoints, _disabledCuePoints, flvCuePoints, navCuePoints, eventCuePoints, _asCuePointIndex, __get__playheadUpdateInterval, _disabledCuePointsByNameOnly;
function CuePointManager (owner, id) {
_owner = owner;
_id = id;
reset();
_asCuePointTolerance = _owner.getVideoPlayer(_id).__get__playheadUpdateInterval() / 2000;
_linearSearchTolerance = DEFAULT_LINEAR_SEARCH_TOLERANCE;
}
function reset() {
_metadataLoaded = false;
allCuePoints = null;
asCuePoints = null;
_disabledCuePoints = null;
flvCuePoints = null;
navCuePoints = null;
eventCuePoints = null;
_asCuePointIndex = 0;
}
function get metadataLoaded() {
return(_metadataLoaded);
}
function set playheadUpdateInterval(aTime) {
_asCuePointTolerance = aTime / 2000;
//return(__get__playheadUpdateInterval());
}
function get id() {
return(_id);
}
function addASCuePoint(timeOrCuePoint, name, parameters) {
var _local3;
if (typeof(timeOrCuePoint) == "object") {
_local3 = deepCopyObject(timeOrCuePoint);
} else {
_local3 = {time:timeOrCuePoint, name:name, parameters:deepCopyObject(parameters)};
}
var _local7 = isNaN(_local3.time) || (_local3.time < 0);
if (_local7) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number");
}
var _local6 = (_local3.name == undefined) || (_local3.name == null);
if (_local6) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "name cannot be undefined or null");
}
var _local2;
_local3.type = "actionscript";
if (((asCuePoints == null) || (asCuePoints == undefined)) || (asCuePoints.length < 1)) {
_local2 = 0;
asCuePoints = new Array();
asCuePoints.push(_local3);
} else {
_local2 = getCuePointIndex(asCuePoints, true, _local3.time);
_local2 = ((asCuePoints[_local2].time > _local3.time) ? 0 : (_local2 + 1));
asCuePoints.splice(_local2, 0, _local3);
}
if (((allCuePoints == null) || (allCuePoints == undefined)) || (allCuePoints.length < 1)) {
_local2 = 0;
allCuePoints = new Array();
allCuePoints.push(_local3);
} else {
_local2 = getCuePointIndex(allCuePoints, true, _local3.time);
_local2 = ((allCuePoints[_local2].time > _local3.time) ? 0 : (_local2 + 1));
allCuePoints.splice(_local2, 0, _local3);
}
var _local5 = _owner.getVideoPlayer(_id).__get__playheadTime();
if (_local5 > 0) {
if (_asCuePointIndex == _local2) {
if (_local5 > asCuePoints[_local2].time) {
_asCuePointIndex++;
}
} else if (_asCuePointIndex > _local2) {
_asCuePointIndex++;
}
} else {
_asCuePointIndex = 0;
}
var _local4 = deepCopyObject(asCuePoints[_local2]);
_local4.array = asCuePoints;
_local4.index = _local2;
return(_local4);
}
function removeASCuePoint(timeNameOrCuePoint) {
if (((asCuePoints == null) || (asCuePoints == undefined)) || (asCuePoints.length < 1)) {
return(null);
}
var _local3;
switch (typeof(timeNameOrCuePoint)) {
case "string" :
_local3 = {name:timeNameOrCuePoint};
break;
case "number" :
_local3 = {time:timeNameOrCuePoint};
break;
case "object" :
_local3 = timeNameOrCuePoint;
}
var _local2 = getCuePointIndex(asCuePoints, false, _local3.time, _local3.name);
if (_local2 < 0) {
return(null);
}
_local3 = asCuePoints[_local2];
asCuePoints.splice(_local2, 1);
_local2 = getCuePointIndex(allCuePoints, false, _local3.time, _local3.name);
if (_local2 > 0) {
allCuePoints.splice(_local2, 1);
}
if (_owner.getVideoPlayer(_id).__get__playheadTime() > 0) {
if (_asCuePointIndex > _local2) {
_asCuePointIndex--;
}
} else {
_asCuePointIndex = 0;
}
return(_local3);
}
function setFLVCuePointEnabled(enabled, timeNameOrCuePoint) {
var _local4;
switch (typeof(timeNameOrCuePoint)) {
case "string" :
_local4 = {name:timeNameOrCuePoint};
break;
case "number" :
_local4 = {time:timeNameOrCuePoint};
break;
case "object" :
_local4 = timeNameOrCuePoint;
}
var _local12 = isNaN(_local4.time) || (_local4.time < 0);
var _local11 = (_local4.name == undefined) || (_local4.name == null);
if (_local12 && (_local11)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number and/or name must not be undefined or null");
}
var _local6 = 0;
var _local2;
var _local5;
if (_local12) {
if (!_metadataLoaded) {
if (_disabledCuePointsByNameOnly[_local4.name] == undefined) {
if (!enabled) {
if (((_disabledCuePointsByNameOnly == null) || (_disabledCuePointsByNameOnly == undefined)) || (_disabledCuePointsByNameOnly.length < 0)) {
_disabledCuePointsByNameOnly = new Object();
}
_disabledCuePointsByNameOnly[_local4.name] = new Array();
}
} else {
if (enabled) {
_disabledCuePointsByNameOnly[_local4.name] = undefined;
}
return(-1);
}
removeCuePoints(_disabledCuePoints, _local4);
return(-1);
}
if (enabled) {
_local6 = removeCuePoints(_disabledCuePoints, _local4);
} else {
var _local3;
_local2 = getCuePointIndex(flvCuePoints, true, -1, _local4.name);
while (_local2 >= 0) {
_local3 = flvCuePoints[_local2];
_local5 = getCuePointIndex(_disabledCuePoints, true, _local3.time);
if ((_local5 < 0) || (_disabledCuePoints[_local5].time != _local3.time)) {
_disabledCuePoints = insertCuePoint(_local5, _disabledCuePoints, {name:_local3.name, time:_local3.time});
_local6 = _local6 + 1;
}
_local2 = getNextCuePointIndexWithName(_local3.name, flvCuePoints, _local2);
}
}
return(_local6);
}
_local2 = getCuePointIndex(_disabledCuePoints, false, _local4.time, _local4.name);
if (_local2 < 0) {
if (enabled) {
if (!_metadataLoaded) {
_local2 = getCuePointIndex(_disabledCuePoints, false, _local4.time);
if (_local2 < 0) {
_local5 = getCuePointIndex(_disabledCuePointsByNameOnly[_local4.name], true, _local4.time);
if (cuePointCompare(_local4.time, null, _disabledCuePointsByNameOnly[_local4.name]) != 0) {
_disabledCuePointsByNameOnly[_local4.name] = insertCuePoint(_local5, _disabledCuePointsByNameOnly[_local4.name], _local4);
}
} else {
_disabledCuePoints.splice(_local2, 1);
}
}
return((_metadataLoaded ? 0 : -1));
}
} else {
if (enabled) {
_disabledCuePoints.splice(_local2, 1);
_local6 = 1;
} else {
_local6 = 0;
}
return((_metadataLoaded ? (_local6) : -1));
}
if (_metadataLoaded) {
_local2 = getCuePointIndex(flvCuePoints, false, _local4.time, _local4.name);
if (_local2 < 0) {
return(0);
}
if (_local11) {
_local4.name = flvCuePoints[_local2].name;
}
}
_local5 = getCuePointIndex(_disabledCuePoints, true, _local4.time);
_disabledCuePoints = insertCuePoint(_local5, _disabledCuePoints, _local4);
_local6 = 1;
return((_metadataLoaded ? 1 : -1));
}
function removeCuePoints(cuePointArray, cuePoint) {
var _local2;
var _local4;
var _local5 = 0;
_local2 = getCuePointIndex(cuePointArray, true, -1, cuePoint.name);
while (_local2 >= 0) {
_local4 = cuePointArray[_local2];
cuePointArray.splice(_local2, 1);
_local2--;
_local5++;
_local2 = getNextCuePointIndexWithName(_local4.name, cuePointArray, _local2);
}
return(_local5);
}
function insertCuePoint(insertIndex, cuePointArray, cuePoint) {
if (insertIndex < 0) {
cuePointArray = new Array();
cuePointArray.push(cuePoint);
} else {
if (cuePointArray[insertIndex].time > cuePoint.time) {
insertIndex = 0;
} else {
insertIndex++;
}
cuePointArray.splice(insertIndex, 0, cuePoint);
}
return(cuePointArray);
}
function isFLVCuePointEnabled(timeNameOrCuePoint) {
if (!_metadataLoaded) {
return(true);
}
var _local3;
switch (typeof(timeNameOrCuePoint)) {
case "string" :
_local3 = {name:timeNameOrCuePoint};
break;
case "number" :
_local3 = {time:timeNameOrCuePoint};
break;
case "object" :
_local3 = timeNameOrCuePoint;
}
var _local5 = isNaN(_local3.time) || (_local3.time < 0);
var _local6 = (_local3.name == undefined) || (_local3.name == null);
if (_local5 && (_local6)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number and/or name must not be undefined or null");
}
if (_local5) {
var _local2 = getCuePointIndex(flvCuePoints, true, -1, _local3.name);
if (_local2 < 0) {
return(true);
}
while (_local2 >= 0) {
if (getCuePointIndex(_disabledCuePoints, false, flvCuePoints[_local2].time, flvCuePoints[_local2].name) < 0) {
return(true);
}
_local2 = getNextCuePointIndexWithName(_local3.name, flvCuePoints, _local2);
}
return(false);
}
return(getCuePointIndex(_disabledCuePoints, false, _local3.time, _local3.name) < 0);
}
function dispatchASCuePoints() {
var _local5 = _owner.getVideoPlayer(_id).__get__playheadTime();
if ((_owner.getVideoPlayer(_id).__get__stateResponsive() && (asCuePoints != null)) && (asCuePoints != undefined)) {
while ((_asCuePointIndex < asCuePoints.length) && (asCuePoints[_asCuePointIndex].time <= (_local5 + _asCuePointTolerance))) {
_owner.dispatchEvent({type:"cuePoint", info:deepCopyObject(asCuePoints[_asCuePointIndex++]), vp:_id});
}
}
}
function resetASCuePointIndex(time) {
if (((time <= 0) || (asCuePoints == null)) || (asCuePoints == undefined)) {
_asCuePointIndex = 0;
return(undefined);
}
var _local2 = getCuePointIndex(asCuePoints, true, time);
_asCuePointIndex = ((asCuePoints[_local2].time < time) ? (_local2 + 1) : (_local2));
}
function processFLVCuePoints(metadataCuePoints) {
_metadataLoaded = true;
if (((metadataCuePoints == undefined) || (metadataCuePoints == null)) || (metadataCuePoints.length < 1)) {
flvCuePoints = null;
navCuePoints = null;
eventCuePoints = null;
return(undefined);
}
flvCuePoints = metadataCuePoints;
navCuePoints = new Array();
eventCuePoints = new Array();
var _local5;
var _local6 = -1;
var _local2;
var _local4 = _disabledCuePoints;
var _local3 = 0;
_disabledCuePoints = new Array();
var _local9 = 0;
while (_local2 = flvCuePoints[_local9++] , _local2 != undefined) {
if ((_local6 > 0) && (_local6 >= _local2.time)) {
flvCuePoints = null;
navCuePoints = null;
eventCuePoints = null;
_disabledCuePoints = null;
_disabledCuePointsByNameOnly = null;
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "Unsorted cuePoint found after time: " + _local6);
}
_local6 = _local2.time;
while ((_local3 < _local4.length) && (cuePointCompare(_local4[_local3].time, null, _local2) < 0)) {
_local3++;
}
if ((_disabledCuePointsByNameOnly[_local2.name] != undefined) || ((_local3 < _local4.length) && (cuePointCompare(_local4[_local3].time, _local4[_local3].name, _local2) == 0))) {
_disabledCuePoints.push({time:_local2.time, name:_local2.name});
}
if (_local2.type == "navigation") {
navCuePoints.push(_local2);
} else if (_local2.type == "event") {
eventCuePoints.push(_local2);
}
if (((allCuePoints == null) || (allCuePoints == undefined)) || (allCuePoints.length < 1)) {
allCuePoints = new Array();
allCuePoints.push(_local2);
} else {
_local5 = getCuePointIndex(allCuePoints, true, _local2.time);
_local5 = ((allCuePoints[_local5].time > _local2.time) ? 0 : (_local5 + 1));
allCuePoints.splice(_local5, 0, _local2);
}
}
delete _disabledCuePointsByNameOnly;
_disabledCuePointsByNameOnly = null;
delete _disabledCuePointsByNameOnly;
_disabledCuePointsByNameOnly = null;
}
function processCuePointsProperty(cuePoints) {
if (((cuePoints == undefined) || (cuePoints == null)) || (cuePoints.length == 0)) {
return(undefined);
}
var _local4 = 0;
var _local8;
var _local6;
var _local7;
var _local5;
var _local9;
var _local2 = 0;
while (_local2 < (cuePoints.length - 1)) {
switch (_local4) {
case 6 :
addOrDisable(_local9, _local5);
_local4 = 0;
case 0 :
if (cuePoints[_local2++] != "t") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format");
}
if (isNaN(cuePoints[_local2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number");
}
_local5 = new Object();
_local5.time = cuePoints[_local2] / 1000;
_local4++;
break;
case 1 :
if (cuePoints[_local2++] != "n") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format");
}
if ((cuePoints[_local2] == undefined) || (cuePoints[_local2] == null)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "name cannot be null or undefined");
}
_local5.name = unescape(cuePoints[_local2]);
_local4++;
break;
case 2 :
if (cuePoints[_local2++] != "t") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format");
}
if (isNaN(cuePoints[_local2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "type must be number");
}
switch (cuePoints[_local2]) {
case 0 :
_local5.type = "event";
break;
case 1 :
_local5.type = "navigation";
break;
case 2 :
_local5.type = "actionscript";
break;
default :
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "type must be 0, 1 or 2");
}
_local4++;
break;
case 3 :
if (cuePoints[_local2++] != "d") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format");
}
if (isNaN(cuePoints[_local2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "disabled must be number");
}
_local9 = cuePoints[_local2] != 0;
_local4++;
break;
case 4 :
if (cuePoints[_local2++] != "p") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format");
}
if (isNaN(cuePoints[_local2])) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "num params must be number");
}
_local8 = cuePoints[_local2];
_local4++;
if (_local8 == 0) {
_local4++;
} else {
_local5.parameters = new Object();
}
break;
case 5 :
_local6 = cuePoints[_local2++];
_local7 = cuePoints[_local2];
if (typeof(_local6) == "string") {
_local6 = unescape(_local6);
}
if (typeof(_local7) == "string") {
_local7 = unescape(_local7);
}
_local5.parameters[_local6] = _local7;
_local8--;
if (_local8 != 0) {
break;
}
_local4++;
}
_local2++;
}
if (_local4 == 6) {
addOrDisable(_local9, _local5);
} else {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "unexpected end of cuePoint param string");
}
}
function addOrDisable(disable, cuePoint) {
if (disable) {
if (cuePoint.type == "actionscript") {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "Cannot disable actionscript cue points");
}
setFLVCuePointEnabled(false, cuePoint);
} else if (cuePoint.type == "actionscript") {
addASCuePoint(cuePoint);
}
}
function unescape(origStr) {
var _local3 = origStr;
var _local1 = 0;
while (_local1 < cuePointsReplace.length) {
var _local2 = _local3.split(cuePointsReplace[_local1++]);
if (_local2.length > 1) {
_local3 = _local2.join(cuePointsReplace[_local1]);
}
_local1++;
}
return(_local3);
}
function getCuePointIndex(cuePointArray, closeIsOK, time, name, start, len) {
if (((cuePointArray == null) || (cuePointArray == undefined)) || (cuePointArray.length < 1)) {
return(-1);
}
var _local13 = isNaN(time) || (time < 0);
var _local16 = (name == undefined) || (name == null);
if (_local13 && (_local16)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number and/or name must not be undefined or null");
}
if ((start == undefined) || (start == null)) {
start = 0;
}
if ((len == undefined) || (len == null)) {
len = cuePointArray.length;
}
if ((!_local16) && (closeIsOK || (_local13))) {
var _local8;
var _local2;
if (_local13) {
_local8 = start;
} else {
_local8 = getCuePointIndex(cuePointArray, closeIsOK, time);
}
_local2 = _local8;
while (_local2 >= start) {
if (cuePointArray[_local2].name == name) {
break;
}
_local2--;
}
if (_local2 >= start) {
return(_local2);
}
_local2 = _local8 + 1;
while (_local2 < len) {
if (cuePointArray[_local2].name == name) {
break;
}
_local2++;
}
if (_local2 < len) {
return(_local2);
}
return(-1);
}
var _local6;
if (len <= _linearSearchTolerance) {
var _local11 = start + len;
var _local3 = start;
while (_local3 < _local11) {
_local6 = cuePointCompare(time, name, cuePointArray[_local3]);
if (_local6 == 0) {
return(_local3);
}
if (_local6 < 0) {
break;
}
_local3++;
}
if (closeIsOK) {
if (_local3 > 0) {
return(_local3 - 1);
}
return(0);
}
return(-1);
}
var _local12 = Math.floor(len / 2);
var _local15 = start + _local12;
_local6 = cuePointCompare(time, name, cuePointArray[_local15]);
if (_local6 < 0) {
return(getCuePointIndex(cuePointArray, closeIsOK, time, name, start, _local12));
}
if (_local6 > 0) {
return(getCuePointIndex(cuePointArray, closeIsOK, time, name, _local15 + 1, (_local12 - 1) + (len % 2)));
}
return(_local15);
}
function getNextCuePointIndexWithName(name, array, index) {
if ((name == undefined) || (name == null)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "name cannot be undefined or null");
}
if ((array == null) || (array == undefined)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "cuePoint.array undefined");
}
if ((isNaN(index) || (index < -1)) || (index >= array.length)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "cuePoint.index must be number between -1 and cuePoint.array.length");
}
var _local1;
_local1 = index + 1;
while (_local1 < array.length) {
if (array[_local1].name == name) {
break;
}
_local1++;
}
if (_local1 < array.length) {
return(_local1);
}
return(-1);
}
static function cuePointCompare(time, name, cuePoint) {
var _local2 = Math.round(time * 1000);
var _local3 = Math.round(cuePoint.time * 1000);
if (_local2 < _local3) {
return(-1);
}
if (_local2 > _local3) {
return(1);
}
if ((name != null) || (name != undefined)) {
if (name == cuePoint.name) {
return(0);
}
if (name < cuePoint.name) {
return(-1);
}
return(1);
}
return(0);
}
function getCuePoint(cuePointArray, closeIsOK, timeNameOrCuePoint) {
var _local3;
switch (typeof(timeNameOrCuePoint)) {
case "string" :
_local3 = {name:timeNameOrCuePoint};
break;
case "number" :
_local3 = {time:timeNameOrCuePoint};
break;
case "object" :
_local3 = timeNameOrCuePoint;
}
var _local2 = getCuePointIndex(cuePointArray, closeIsOK, _local3.time, _local3.name);
if (_local2 < 0) {
return(null);
}
_local3 = deepCopyObject(cuePointArray[_local2]);
_local3.array = cuePointArray;
_local3.index = _local2;
return(_local3);
}
function getNextCuePointWithName(cuePoint) {
if ((cuePoint == null) || (cuePoint == undefined)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "cuePoint parameter undefined");
}
if (isNaN(cuePoint.time) || (cuePoint.time < 0)) {
throw new mx.video.VideoError(mx.video.VideoError.ILLEGAL_CUE_POINT, "time must be number");
}
var _local3 = getNextCuePointIndexWithName(cuePoint.name, cuePoint.array, cuePoint.index);
if (_local3 < 0) {
return(null);
}
var _local4 = deepCopyObject(cuePoint.array[_local3]);
_local4.array = cuePoint.array;
_local4.index = _local3;
return(_local4);
}
static function deepCopyObject(obj, recurseLevel) {
if (((obj == undefined) || (obj == null)) || (typeof(obj) != "object")) {
return(obj);
}
if (recurseLevel == undefined) {
recurseLevel = 0;
}
var _local2 = new Object();
for (var _local4 in obj) {
if ((recurseLevel == 0) && ((_local4 == "array") || (_local4 == "index"))) {
} else if (typeof(obj[_local4]) == "object") {
_local2[_local4] = deepCopyObject(obj[_local4], recurseLevel + 1);
} else {
_local2[_local4] = obj[_local4];
}
}
return(_local2);
}
static var DEFAULT_LINEAR_SEARCH_TOLERANCE = 50;
static var cuePointsReplace = [""", "\"", "'", "'", ",", ",", "&", "&"];
}
Symbol 103 Button
on (release) {
_root.game.challenge();
}
Symbol 106 Button
on (release) {
getURL ("http://www.zumanity.com", "_blank");
}
Symbol 110 Button
on (release) {
getURL ("http://www.nynyhotelcasino.com", "_blank");
}
Symbol 113 Button
on (release) {
getURL ("http://clk.atdmt.com/MGM/go/397293668/direct/01/", "_blank");
}
Symbol 120 MovieClip Frame 1
audioOFF._visible = false;
Instance of Symbol 117 MovieClip in Symbol 120 MovieClip Frame 1
on (release) {
getURL ("mailto:feedback@zumanityhoops.com", "_blank");
}
Instance of Symbol 119 MovieClip in Symbol 120 MovieClip Frame 1
on (release) {
_parent._parent.soundToggle();
}
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 54
function executeCallback() {
clearInterval(intervalId);
trace((("executeCallback intervalId: " + intervalId) + " count: ") + count);
play();
pauseCurtains = 0;
}
_parent.game.curtainsAreOpen();
if (halfOpen) {
trace("half open");
halfOpen = false;
} else {
if (pauseCurtains > 0) {
var intervalId;
var count = 0;
var maxCount = 1;
var duration = pauseCurtains;
intervalId = setInterval(this, "executeCallback", duration);
}
stop();
}
Symbol 128 MovieClip Frame 60
_parent.game.curtainsOpen = false;
Symbol 128 MovieClip Frame 100
stop();
Symbol 137 MovieClip Frame 300
gotoAndPlay (2);
Symbol 159 MovieClip Frame 1
useHandCursor = false;
this.onRelease = function () {
};
Symbol 169 Button
on (release) {
_root.game.levelMessagePlay();
}
Symbol 170 MovieClip Frame 1
levelIII.stop();
var display = function (game) {
trace("display : " + game);
levelName.text = game.levelName;
for (var _local3 in game.levelNames) {
if (_local3 == game.current) {
this[game.levelNames[_local3]]._visible = true;
} else {
this[game.levelNames[_local3]]._visible = false;
}
}
};
stop();
Symbol 173 Button
on (release) {
_parent.play();
}
Symbol 174 MovieClip Frame 300
stop();
Symbol 175 MovieClip Frame 1
stop();
Symbol 175 MovieClip Frame 15
stop();
Symbol 175 MovieClip Frame 24
_root.game.gameIntroComplete();
stop();
Symbol 190 MovieClip Frame 1
stop();
Symbol 190 MovieClip Frame 25
_root.game.showBall();
stop();
Symbol 190 MovieClip Frame 105
this._parent.myClass.levelIntroComplete();
Symbol 194 Button
on (release) {
_root.game.fadeOut(this);
_root.game.replayLevel();
}
Symbol 198 Button
on (release) {
_root.game.replayLevel(0);
_root.game.fadeOut(this);
}
Symbol 202 Button
on (release) {
_root.game.showWindow("postScore");
}
Symbol 206 Button
on (release) {
_root.game.challenge();
}
Symbol 210 Button
on (release) {
_root.game.showWindow("champs");
}
Symbol 212 MovieClip Frame 1
var display = function (game) {
failMsg.text = game.lossMessage;
};
Symbol 221 Button
on (release) {
sendFriend();
}
Symbol 238 MovieClip Frame 1
useHandCursor = false;
this.onRelease = function () {
};
Symbol 239 MovieClip Frame 1
function clearFields() {
for (var _local2 in fields) {
this[fields[_local2]].text = "";
}
friendEmail2.text = "";
friendEmail3.text = "";
}
function show() {
clearFields();
sent._visible = false;
this._visible = true;
}
function sendFriend() {
err.text = "";
if (!sending) {
sending = true;
var _local3 = false;
for (var _local4 in fields) {
if (this[fields[_local4]].text.length < 2) {
_local3 = true;
trace("nope");
}
}
if (!_local3) {
var _local2 = new Object();
_local2.myName = myName.text;
_local2.myEmail = myEmail.text;
_local2.emailAdd1 = friendEmail1.text;
_local2.emailAdd2 = friendEmail2.text;
_local2.emailAdd3 = friendEmail3.text;
_local2.comments = comments.text;
_local2.myScore = 7;
var _local5 = myService.zumanity_send2friend(_local2);
_local5.__set__responder(new mx.rpc.RelayResponder(this, "getData_Result", "getData_Fault"));
} else {
err.text = "FILL REQUIRED * FIELDS PLEASE";
}
}
}
function getData_Result(re) {
sent._visible = true;
sending = false;
_root.game.fadeOut(this);
trace("re : " + re.__get__result().__result);
dump(re);
}
function getData_Fault(re) {
loadDefaultImg();
sending = false;
this.cb.loadDefaultImg();
for (var _local4 in re) {
trace((("val : " + _local4) + " is : ") + re[_local4]);
for (var _local3 in re[_local4]) {
trace((("val : " + _local3) + " is : ") + re[_local4][_local3]);
}
}
}
var fields = ["myName", "myEmail", "friendEmail1", "comments"];
var myService = (new mx.remoting.Service("http://www.zumanityhoops.com/flashservices/gateway", null, "remoteservices", null, null));
var levels = ["Z", "ZU", "ZUM", "ZUMA", "ZUMAN", "ZUMANI", "ZUMANIT", "ZUMANITY"];
var f;
var sending = false;
sent._visible = false;
var dump = function (obj) {
for (var _local3 in obj) {
trace((("val : " + _local3) + " is : ") + obj[_local3]);
for (var _local2 in obj[_local3]) {
trace((("val : " + _local2) + " is : ") + obj[_local3][_local2]);
}
}
};
build();
Instance of Symbol 235 MovieClip "closeBtn" in Symbol 239 MovieClip Frame 1
on (release) {
_root.game.fadeOut(_parent);
}
Instance of Symbol 238 MovieClip "sent" in Symbol 239 MovieClip Frame 1
on (release) {
}
Symbol 244 Button
on (release) {
postScore();
}
Symbol 251 MovieClip Frame 1
useHandCursor = false;
this.onRelease = function () {
};
Symbol 252 MovieClip Frame 1
function show() {
sent._visible = false;
this._visible = true;
level = _root.game.current;
myScore.text = levels[level];
}
function postScore() {
err.text = "";
if (myName.text.length < 2) {
err.text = "ENTER YOUR NAME PLEASE";
trace("nope");
} else {
var _local2 = new Object();
_local2.myName = myName.text;
_local2.myScore = level + 1;
var _local3 = myService.zumanity_postscore(_local2);
_local3.__set__responder(new mx.rpc.RelayResponder(this, "getData_Result", "getData_Fault"));
}
}
function getData_Result(re) {
dump(re.__get__result()._items);
_root.game.fadeOut(this);
}
function getData_Fault(re) {
loadDefaultImg();
this.cb.loadDefaultImg();
for (var _local4 in re) {
trace((("val : " + _local4) + " is : ") + re[_local4]);
for (var _local3 in re[_local4]) {
trace((("val : " + _local3) + " is : ") + re[_local4][_local3]);
}
}
}
sent._visible = false;
var myService = (new mx.remoting.Service("http://www.zumanityhoops.com/flashservices/gateway", null, "remoteservices", null, null));
var levels = ["Z", "ZU", "ZUM", "ZUMA", "ZUMAN", "ZUMANI", "ZUMANIT", "ZUMANITY"];
var f;
var level;
var dump = function (obj) {
for (var _local3 in obj) {
trace((("val : " + _local3) + " is : ") + obj[_local3]);
for (var _local2 in obj[_local3]) {
trace((("val : " + _local2) + " is : ") + obj[_local3][_local2]);
}
}
};
Instance of Symbol 235 MovieClip "closeBtn" in Symbol 252 MovieClip Frame 1
on (release) {
_root.game.fadeOut(_parent);
}
Instance of Symbol 251 MovieClip "sent" in Symbol 252 MovieClip Frame 1
on (release) {
}
Symbol 270 Button
on (release) {
pageMod(true);
}
Symbol 274 Button
on (release) {
pageMod();
}
Symbol 275 MovieClip Frame 1
function show() {
this._visible = true;
build();
}
function onInterval() {
trace("int");
f.start();
}
function getData_Result(re) {
scores = new Array();
if (re.__get__result()._items.length > 0) {
var _local1 = 0;
while (_local1 < re.__get__result()._items.length) {
scores[_local1] = re.__get__result()._items[_local1];
_local1++;
}
levelWinners = new Object();
_local1 = scores.length;
while (_local1 >= 0) {
if (levelWinners["level" + scores[_local1].score] == undefined) {
levelWinners["level" + scores[_local1].score] = new Array();
}
levelWinners["level" + scores[_local1].score].push(scores[_local1]);
_local1--;
}
display();
}
}
function getData_Fault(re) {
loadDefaultImg();
this.cb.loadDefaultImg();
for (var _local4 in re) {
trace((("val : " + _local4) + " is : ") + re[_local4]);
for (var _local3 in re[_local4]) {
trace((("val : " + _local3) + " is : ") + re[_local4][_local3]);
}
}
}
champsBkg.useHandCursor = false;
champsBkg.onRelease = function () {
};
var levels = ["Z", "ZU", "ZUM", "ZUMA", "ZUMAN", "ZUMANI", "ZUMANIT", "ZUMANITY"];
var levelWinners;
var f;
com.mosesSupposes.fuse.ZigoEngine.register(com.mosesSupposes.fuse.PennerEasing, com.mosesSupposes.fuse.Fuse, com.mosesSupposes.fuse.FuseItem, com.mosesSupposes.fuse.FuseFMP);
var scores;
var current = 0;
var modCurrent = 0;
var pageInc = 3;
var modInc = 10;
var maxResults = 8;
var myService = (new mx.remoting.Service("http://www.zumanityhoops.com/flashservices/gateway", null, "remoteservices", null, null));
next = function () {
if ((current + pageInc) > maxResults) {
} else {
current = current + pageInc;
display();
}
};
prev = function () {
if (current <= 0) {
} else {
current = current - pageInc;
display();
}
};
pageMod = function (back) {
if (back) {
if (modCurrent <= 0) {
} else {
modCurrent = modCurrent - modInc;
}
} else if ((modCurrent + modInc) > currentMAXLength()) {
} else {
modCurrent = modCurrent + modInc;
}
var _local1 = pageInc;
while (_local1 >= 0) {
var _local2 = current + _local1;
displayMod(_local1, levels.length - _local2, modCurrent);
_local1--;
}
};
currentMAXLength = function () {
var _local4 = 0;
var _local1 = pageInc;
while (_local1 >= 0) {
var _local3 = current + _local1;
var _local2 = levelWinners["level" + (levels.length - _local3)].length;
if (_local2 > _local4) {
_local4 = _local2;
}
_local1--;
}
return(_local4);
};
var displayMod = function (modNum, myData, page) {
lessBut.enabled = false;
if ((currentMAXLength() > modInc) && ((modCurrent + modInc) < currentMAXLength())) {
moreBut.enabled = true;
} else if (modCurrent > 0) {
lessBut.enabled = true;
if ((modCurrent + modInc) > currentMAXLength()) {
moreBut.enabled = false;
}
} else {
moreBut.enabled = false;
}
if (page == undefined) {
page = 0;
}
trace("my length : " + levelWinners["level" + myData].length);
if (levelWinners["level" + myData][0] == undefined) {
this["mod" + modNum]._visible = false;
} else {
this["mod" + modNum]._visible = true;
}
var _local8 = Number(levelWinners["level" + myData][0].score);
var _local9 = levels[_local8 - 1];
if (_local8 == 0) {
this["mod" + modNum]._visible = false;
} else {
this["mod" + modNum].myLevel.text = _local9;
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = page + _local2;
var _local6 = com.jc.date.DateFormat.getZuDate(levelWinners["level" + myData][_local3].record_date);
if (levelWinners["level" + myData][_local3] == undefined) {
this["mod" + modNum]["e" + _local2]._visible = false;
} else {
this["mod" + modNum]["e" + _local2]._visible = true;
_local6 = com.jc.date.DateFormat.getZuDate(levelWinners["level" + myData][_local3].record_date);
this["mod" + modNum]["e" + _local2].myName.text = levelWinners["level" + myData][_local3].name;
this["mod" + modNum]["e" + _local2].myLevel.text = _local6;
}
_local2++;
}
};
var display = function () {
var _local1 = pageInc - 1;
while (_local1 >= 0) {
var _local2 = current + _local1;
displayMod(_local1, levels.length - _local2);
_local1--;
}
};
var build = function (game) {
f = new com.mosesSupposes.fuse.Fuse();
var _local2 = 0;
while (_local2 < 8) {
f.push({target:this["e" + _local2], alpha:0, time:0.7, ease:"easeOutCubic", trigger:0.1});
_local2++;
}
f.push({delay:0.25});
f.push({func:display, args:this});
_local2 = 0;
while (_local2 < 8) {
f.push({target:this["e" + _local2], alpha:100, time:0.7, ease:"easeInCubic", trigger:0.1});
_local2++;
}
var _local8 = myService.zumanity_leader(obj);
_local8.__set__responder(new mx.rpc.RelayResponder(this, "getData_Result", "getData_Fault"));
};
var dump = function (obj) {
for (var _local3 in obj) {
trace((("val : " + _local3) + " is : ") + obj[_local3]);
for (var _local2 in obj[_local3]) {
trace((("val : " + _local2) + " is : ") + obj[_local3][_local2]);
}
}
};
build();
Instance of Symbol 256 MovieClip "next" in Symbol 275 MovieClip Frame 1
on (release) {
_parent.next();
}
Instance of Symbol 258 MovieClip "back" in Symbol 275 MovieClip Frame 1
on (release) {
_parent.prev();
}
Instance of Symbol 235 MovieClip "closeBtn" in Symbol 275 MovieClip Frame 1
on (release) {
_root.game.fadeOut(_parent);
}
Symbol 278 Button
on (release) {
game.skipIntro();
}
Symbol 292 MovieClip Frame 1
function show() {
sent._visible = false;
this._visible = true;
level = _root.game.current;
myScore.text = levels[level];
}
function postScore() {
err.text = "";
if (myName.text.length < 2) {
err.text = "ENTER YOUR NAME PLEASE";
trace("nope");
} else {
var _local2 = new Object();
_local2.myName = myName.text;
_local2.myScore = level + 1;
var _local3 = myService.zumanity_postscore(_local2);
_local3.__set__responder(new mx.rpc.RelayResponder(this, "getData_Result", "getData_Fault"));
}
}
function getData_Result(re) {
dump(re.__get__result()._items);
_root.game.fadeOut(this);
}
function getData_Fault(re) {
loadDefaultImg();
this.cb.loadDefaultImg();
for (var _local4 in re) {
trace((("val : " + _local4) + " is : ") + re[_local4]);
for (var _local3 in re[_local4]) {
trace((("val : " + _local3) + " is : ") + re[_local4][_local3]);
}
}
}
sent._visible = false;
var myService = (new mx.remoting.Service("http://www.zumanityhoops.com/flashservices/gateway", null, "remoteservices", null, null));
var levels = ["Z", "ZU", "ZUM", "ZUMA", "ZUMAN", "ZUMANI", "ZUMANIT", "ZUMANITY"];
var f;
var level;
var dump = function (obj) {
for (var _local3 in obj) {
trace((("val : " + _local3) + " is : ") + obj[_local3]);
for (var _local2 in obj[_local3]) {
trace((("val : " + _local2) + " is : ") + obj[_local3][_local2]);
}
}
};