STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/97505491?noj=FRM97505491-22DC" width="1" height="1"></div>

Rambo - The Fight Continues.swf

This is the info page for
Flash #47667

(Click the ID number above for more basic data on this flash file.)


Text
Msg

Title

LEVEL Summary

Starting Score:
Level Score:
Level Accuracy:
Accuracy Bonus:
Total Score:

100

100

100

100

100

Use your left and right arrow keys to swing Rambo’s fifty-cal in that direction.

Tip

<p align="center"><font face="Arial" size="12" color="#ffffff" letterSpacing="0.000000" kerning="1">v 1.1.0</font></p>

©2007 EQUITY PICTURES MEDIENFONDS GMBH & CO.KG IV. ALL RIGHTS RESERVED.
Game Copyright © 2008 Blockdot, Inc.  All Rights Reserved

<p align="center"><font face="Digital dream" size="20" color="#ffffff" letterSpacing="0.000000" kerning="1">0.00</font></p>

<p align="right"></p>

<p align="right"></p>

<p align="center"><font face="Digital dream" size="12" color="#ffffff" letterSpacing="0.000000" kerning="1">1</font></p>

<p align="center"><font face="Digital dream" size="18" color="#ffffff" letterSpacing="0.000000" kerning="1">100</font></p>

anybody@somewhere.com

Blockdot, Inc. disclaims all express and implied warranties in regard to this
computer program.  Under no circumstances shall Blockdot, Inc. be liable for
any damages arising out of the use or distribution of this computer program,
even if it has been advised of the possibilities of such damages.
Blockdot, Inc. makes no express or implied representations regarding this
computer program and you assume all risk of play and distribution.
Lionsgate Legal and Disclaimer: Please click here to display in a browser
(requires an Internet connection).

<p align="justify"><font face="Arial Narrow" size="14" color="#ffffff" letterSpacing="0.000000" kerning="0"><a href="http://lionsgate.com/terms.html" target = "_blank">here</a></font></p>

LEGAL INFORMATION

When you play this game with an open Internet connection, it will send a signal to kewlbox.com, so
that kewlbox.com can count how many times its games are played. This signal does not transfer
any personal information, such as your name, email address, etc. to kewlbox.com or its owner,
Blockdot, Inc.
This game may leave behind a very small file called a "cookie" on your computer, which it uses to
store information such as your preferences and high scores. You may disable cookies in your
primary web browser to prevent this from happening.  After playing the game, if you choose to
register your score or participate in various promotions, this game will open a browser to
kewlbox.com or an associated website. You may be asked for personal information such as your
name, email address, etc., in order to participate in these activities.
Blockdot, Inc. will not share or transfer this personal information to any third parties without your
permission, although it may collect, sell, or publish demographic information and statistics in the
aggregate. You will be notified if this policy changes, and you will have the option at the time of
notification of not permitting the transfer of your personal data.
Lionsgate Privacy Policy: Please click here to display in a browser(requires an Internet connection).

<p align="justify"><font face="Arial Narrow" size="12" color="#ffffff" letterSpacing="0.000000" kerning="0"><a href="http://lionsgate.com/privacy.html" target = "_blank">here</a></font></p>

PRIVACY INFORMATION

Defend innocent villagers from the attacking mercenaries.
• Use your left and right arrow keys (or “A” and “D” keys) to control the direction
of Rambo’s fifty-cal machine gun. Aim the crosshairs at approaching
mercenaries.  Click your left mouse button to shoot.
• Kill mercenaries quickly or they will advance; mercenaries inflict more damage
at close range.
• Blast enough mercenaries in a firefight and you’ll move on to the next round.
• If a mercenary has fired at Rambo (but missed), a portion of the screen will
flash white, depending on the location of the mercenary.
• If a mercenary hits Rambo, your screen will flash red, and the health meter will
decrease.  Take too many hits and the health meter will be completely drained,
bringing Rambo’s mission – and the game – to an end.

Your Mission:

ActionScript [AS3]

Section 1
//SoundManager (com.blockdot.audio.SoundManager) package com.blockdot.audio { import flash.events.*; import fl.transitions.*; public class SoundManager { private static var muted:Boolean; private static var internalDependancy:Boolean = init(); protected static var soundList:Object; public function SoundManager(){ throw (new Error("SOUND MANAGER ERROR: No instatiation allowed - use the static methods.")); } public static function isMuted(){ return (muted); } public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ var _local6:*; for each (_local6 in soundList) { _local6.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); }; } public static function getPan(_arg1:String):Number{ if (!soundList[_arg1]){ throw (new Error((("SOUND MANAGER ERROR: Sound " + _arg1) + " does not exist."))); }; return (soundList[_arg1].pan); } private static function soundComplete(_arg1:Event){ } public static function stop(_arg1:String):void{ if (!soundList[_arg1]){ throw (new Error((("SOUND MANAGER ERROR: Sound " + _arg1) + " does not exist."))); }; soundList[_arg1].removeEventListener(Event.SOUND_COMPLETE, soundComplete); soundList[_arg1].stop(); } public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ var _local4:*; for each (_local4 in soundList) { _local4.removeEventListener(_arg1, _arg2, _arg3); }; } private static function init():Boolean{ soundList = new Object(); muted = false; return (true); } public static function unmute(_arg1:String=null):void{ var _local2:String; if (_arg1 == null){ for (_local2 in soundList) { unmute(_local2); }; SoundManager.muted = false; } else { soundList[_arg1].unmute(); }; } public static function play(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4:String="internal", _arg5:Boolean=true):Boolean{ if (soundList[_arg1]){ if (soundList[_arg1].playing){ if (_arg5){ soundList[_arg1].loops = _arg3; soundList[_arg1].stop(); soundList[_arg1].play(); return (true); }; return (false); } else { soundList[_arg1].loops = _arg3; soundList[_arg1].play(); return (true); }; } else { soundList[_arg1] = new SoundManagerObject(_arg1, _arg2, _arg3, _arg4); soundList[_arg1].addEventListener(Event.SOUND_COMPLETE, soundComplete); soundList[_arg1].play(); if (isMuted()){ mute(_arg1); }; }; return (true); } public static function getVolume(_arg1:String):Number{ if (!soundList[_arg1]){ throw (new Error((("SOUND MANAGER ERROR: Sound " + _arg1) + " does not exist."))); }; return (soundList[_arg1].volume); } public static function mute(_arg1:String=null):void{ var _local2:String; if (_arg1 == null){ for (_local2 in soundList) { mute(_local2); }; SoundManager.muted = true; } else { soundList[_arg1].mute(); }; } public static function setPan(_arg1:String, _arg2:Number, _arg3:Number=0):void{ if (!soundList[_arg1]){ throw (new Error((("SOUND MANAGER ERROR: Sound " + _arg1) + " does not exist."))); }; if (_arg3 <= 0){ soundList[_arg1].pan = _arg2; } else { if (soundList[_arg1].panTween){ soundList[_arg1].panTween.stop(); }; soundList[_arg1].panTween = new Tween(soundList[_arg1], "pan", null, soundList[_arg1].pan, _arg2, _arg3, true); }; } public static function setVolume(_arg1:String, _arg2:Number, _arg3:Number=0, _arg4:Boolean=false):void{ if (!soundList[_arg1]){ throw (new Error((("SOUND MANAGER ERROR: Sound " + _arg1) + " does not exist."))); }; if (_arg3 <= 0){ soundList[_arg1].volume = _arg2; if (_arg4){ soundList[_arg1].stop(); }; } else { if (soundList[_arg1].volTween){ soundList[_arg1].volTween.stop(); }; soundList[_arg1].volTween = new Tween(soundList[_arg1], "volume", null, soundList[_arg1].volume, _arg2, _arg3, true); }; } public static function stopAll():void{ var _local1:String; for (_local1 in soundList) { stop(_local1); }; } } }//package com.blockdot.audio import flash.net.*; import flash.events.*; import flash.media.*; import flash.utils.*; import fl.transitions.*; class SoundManagerObject extends EventDispatcher { private var channel:SoundChannel; public var name:String; public var panTween:Tween; private var sound:Sound; private var _pan:Number;// = 0 private var prevvol:Number; public var loops:Number; private var muted:Boolean; public var volTween:Tween; private var transform:SoundTransform; public var playing:Boolean;// = false private var _volume:Number;// = 1 private function SoundManagerObject(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String){ var _local5:Class; var _local6:URLRequest; _volume = 1; _pan = 0; playing = false; super(); name = _arg1; loops = _arg3; _volume = _arg2; if (_arg4 == "internal"){ _local5 = (getDefinitionByName(_arg1) as Class); sound = new (_local5); } else { _local6 = new URLRequest(_arg1); sound = new Sound(_local6); }; transform = new SoundTransform(_volume, 0); } public function stop(){ channel.removeEventListener(Event.SOUND_COMPLETE, soundComplete); channel.stop(); playing = false; } public function set volume(_arg1):void{ _volume = _arg1; transform.volume = _volume; channel.soundTransform = transform; } public function set pan(_arg1):void{ _pan = _arg1; transform.pan = _pan; channel.soundTransform = transform; } public function play(){ channel = sound.play(0, Math.max(0, loops), transform); channel.addEventListener(Event.SOUND_COMPLETE, soundComplete); playing = true; } public function mute(){ muted = true; prevvol = _volume; volume = 0; } public function get volume():Number{ return (_volume); } public function isMuted(){ return (muted); } public function get pan():Number{ return (_pan); } public function soundComplete(_arg1:Event){ if (loops < 0){ play(); } else { playing = false; dispatchEvent(_arg1); }; } public function unmute(){ muted = false; volume = prevvol; } }
Section 2
//GameData (com.blockdot.comm.kewlbox.GameData) package com.blockdot.comm.kewlbox { import flash.display.*; import flash.utils.*; public class GameData { public static const rsId:int = UserInfo.sessionID; public static const ruId:int = UserInfo.userID; public static var gameHeight:int = -1; public static var playNum:int; public static var var1:int = 0; public static var clientId:int = -1; public static var pp:int = 0; public static var partner:int = -1; private static var _scope:DisplayObjectContainer; private static var _startTime:int = getTimer(); public static var version:int = -1; public static var gameShortName:String; public static var agev:int = 0; public static var scoreCode:String; public static var gameId:int = -1; public static var gameWidth:int = -1; public static var gameLongName:String; public static var type:int; public static function getDuration():int{ return (((getTimer() - _startTime) / 1000)); } public static function validate():void{ var _local1:Array; _local1 = new Array(); if (gameId == -1){ _local1.push("gameId"); //unresolved jump }; if (clientId == -1){ _local1.push("clientId"); //unresolved jump }; if (scoreCode == null){ _local1.push("scoreCode"); //unresolved jump }; if (gameShortName == null){ _local1.push("gameShortName"); //unresolved jump }; if (gameLongName == null){ _local1.push("gameLongName"); //unresolved jump }; if (partner == -1){ _local1.push("partner"); //unresolved jump }; if (version == -1){ _local1.push("version"); //unresolved jump }; if (gameWidth == -1){ _local1.push("gameWidth"); //unresolved jump }; if (gameHeight == -1){ _local1.push("gameHeight"); //unresolved jump }; if (_local1.length > 0){ throw (new Error(("The following required properties must be set within your game: " + _local1.toString()))); }; } public static function set scope(_arg1:DisplayObjectContainer):void{ _scope = _arg1; type = getType(); } public static function getType():int{ var _local1:int; var _local2:String; _local2 = _scope.loaderInfo.url.substr(-3); switch (_local2){ case "exe": _local1 = 1; break; case "app": _local1 = 2; break; default: _local1 = 3; }; return (_local1); } } }//package com.blockdot.comm.kewlbox
Section 3
//Ping (com.blockdot.comm.kewlbox.Ping) package com.blockdot.comm.kewlbox { import flash.net.*; import flash.events.*; import flash.utils.*; import com.blockdot.utils.*; public class Ping { private static var _request:URLRequest = new URLRequest(_pingURL); private static var _richTimer:Timer = new Timer(1000); private static var _debug:Boolean = false; private static var _process_gamePlay:String = "ping3"; private static var _process_gameEnd:String = "endSession"; private static var _urlVars:URLVariables = new URLVariables(); private static var _process_richPing:String = "endPlay"; private static var _pingURL:String = "http://updates.kewlbox.com/update/gameRequests.aspx"; private static function setupURLVars():void{ _urlVars.gameId = GameData.gameId; _urlVars.clientId = GameData.clientId; _urlVars.partner = GameData.partner; _urlVars.version = GameData.version; _urlVars.playNum = GameData.playNum; _urlVars.var1 = GameData.var1; _urlVars.agev = GameData.agev; _urlVars.pp = GameData.pp; _urlVars.score = 0; _urlVars.type = GameData.type; _urlVars.time = GameData.getDuration(); _urlVars.ruId = GameData.ruId; _urlVars.rsId = GameData.rsId; } public static function set debug(_arg1:Boolean):void{ _debug = _arg1; if (_arg1){ trace("< PING: DEBUG MODE ON >"); }; } public static function send(_arg1:String):void{ var _local2:URLVariables; GameData.validate(); setupURLVars(); _local2 = new URLVariables(); switch (_arg1){ case "gamePlay": GameData.playNum++; _local2.gameId = _urlVars.gameId; _local2.clientId = _urlVars.clientId; _local2.type = _urlVars.type; _local2.version = _urlVars.version; _local2.uid = int(UniqueNumber.getUniqueNumber()); _local2.process = _process_gamePlay; _request.data = _local2; if (_debug){ trace((((("PING SENT:\r type: \tgamePlay \r url: \t" + _request.url) + "?") + _request.data) + "\r")); }; sendToURL(_request); break; case "gameEnd": stopRichPing(); _local2.gameId = _urlVars.gameId; _local2.clientId = _urlVars.clientId; _local2.type = _urlVars.type; _local2.version = _urlVars.version; _local2.time = GameData.getDuration(); _local2.process = _process_gameEnd; _request.data = _local2; if (_debug){ trace((((("PING SENT:\r type: \tgameEnd \r url: \t" + _request.url) + "?") + _request.data) + "\r")); }; sendToURL(_request); break; default: throw (new Error("Invalid ping type")); }; } private static function sendRichPing(_arg1:TimerEvent):void{ GameData.validate(); setupURLVars(); _urlVars.playNum = GameData.playNum; _urlVars.time = GameData.getDuration(); _urlVars.process = _process_richPing; _request.data = _urlVars; sendToURL(_request); if (_debug){ trace((((("PING SENT:\r type: \tRich Ping \r url: \t" + _request.url) + "?") + _request.data) + "\r")); }; } public static function startRichPing(_arg1:int=60000):void{ _richTimer.addEventListener("timer", sendRichPing); _richTimer.delay = _arg1; _richTimer.start(); } public static function stopRichPing():void{ _richTimer.removeEventListener("timer", sendRichPing); _richTimer.stop(); } } }//package com.blockdot.comm.kewlbox
Section 4
//Score (com.blockdot.comm.kewlbox.Score) package com.blockdot.comm.kewlbox { import flash.net.*; import com.blockdot.utils.encryption.*; import com.blockdot.utils.*; public class Score { private static var _scoreURL:String = "http://www.kewlbox.com/inGameRequests.aspx"; private static var _bestScore:EncryptedNumber = new EncryptedNumber(0); private static var _request:URLRequest = new URLRequest(_scoreURL); private static var _score:EncryptedNumber = new EncryptedNumber(0); private static var _debug:Boolean = false; private static var _urlVars:URLVariables = new URLVariables(); public static function set score(_arg1:Number):void{ _score.value = _arg1; if (_score.value > _bestScore.value){ _bestScore.value = _score.value; }; } private static function setupURLVars():void{ _urlVars.gameId = GameData.gameId; _urlVars.clientId = GameData.clientId; _urlVars.partner = GameData.partner; _urlVars.version = GameData.version; _urlVars.playNum = GameData.playNum; _urlVars.var1 = GameData.var1; _urlVars.agev = GameData.agev; _urlVars.pp = GameData.pp; _urlVars.score = _bestScore; _urlVars.type = GameData.type; _urlVars.time = GameData.getDuration(); _urlVars.ruId = GameData.ruId; _urlVars.rsId = GameData.rsId; _urlVars.dtePost = DateFunctions.getISO_Date(); _urlVars.process = "postScore"; _urlVars.key1 = MD5.hash(((GameData.scoreCode + _urlVars.score) + _urlVars.dtePost)); } public static function set debug(_arg1:Boolean):void{ _debug = _arg1; if (_arg1){ trace("< SCORE: DEBUG MODE ON >"); }; } public static function get bestScore():Number{ return (_bestScore.value); } public static function get score():Number{ return (_score.value); } public static function send():void{ GameData.validate(); if (!_urlVars.gameId){ setupURLVars(); } else { updateURLVars(); }; _request.data = _urlVars; try { if (_debug){ trace((((((("SCORE SENT:\r score: " + _bestScore) + " \r url: \t") + _request.url) + "?") + _request.data) + "\r")); }; navigateToURL(_request); } catch(e:Error) { trace(("SCORE send ERROR : " + e.toString())); }; } private static function updateURLVars():void{ _urlVars.playNum = GameData.playNum; _urlVars.score = _bestScore; _urlVars.time = GameData.getDuration(); } } }//package com.blockdot.comm.kewlbox
Section 5
//UserInfo (com.blockdot.comm.kewlbox.UserInfo) package com.blockdot.comm.kewlbox { import flash.net.*; import com.blockdot.utils.*; public class UserInfo { private static var _userID:int; private static var _sessionID:int; public static function get sessionID():int{ if (_sessionID == 0){ _sessionID = int(UniqueNumber.getUniqueNumber()); }; return (_sessionID); } public static function get userID():int{ if (_userID == 0){ createUserID(); }; return (_userID); } private static function createUserID():void{ var userIDSO:SharedObject; try { userIDSO = SharedObject.getLocal("userData", "/"); } catch(error:Error) { trace("KewlboxCommunication Constructor ERROR : SharedObject retrieval"); }; if (userIDSO.data.ruID){ _userID = userIDSO.data.ruID; } else { _userID = int(UniqueNumber.getUniqueNumber()); userIDSO.data.ruID = _userID; try { userIDSO.flush(10000); } catch(error:Error) { trace("KewlboxCommunication Constructor ERROR : SharedObject"); }; }; } } }//package com.blockdot.comm.kewlbox
Section 6
//ViralChallenge (com.blockdot.comm.kewlbox.ViralChallenge) package com.blockdot.comm.kewlbox { import flash.net.*; import flash.events.*; public class ViralChallenge { protected static var disp:EventDispatcher; private static var _URL:String = "http://www.kewlbox.com/inGameRequests.aspx"; private static var _debug:Boolean = false; private static var _request:URLRequest = new URLRequest(_URL); private static var _urlVars:URLVariables = new URLVariables(); private static function validateEmails(_arg1:Array):Boolean{ var _local2:Boolean; var _local3:RegExp; var _local4:uint; var _local5:String; _local2 = true; _local3 = /^[a-z][\w.-]+@\w[\w.-]+\.[\w.-]*[a-z][a-z]$/; _local4 = 0; while (_local4 < _arg1.length) { _local5 = _arg1[_local4].toLowerCase(); if (_local5.length > 0){ if (!_local3.test(_local5)){ _local2 = false; break; }; }; _local4++; }; return (_local2); } public static function set debug(_arg1:Boolean):void{ _debug = _arg1; if (_arg1){ trace("< VIRAL CHALLENGE: DEBUG MODE ON >"); }; } public static function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{ if (disp == null){ return; }; disp.removeEventListener(_arg1, _arg2, _arg3); } public static function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{ if (disp == null){ disp = new EventDispatcher(); }; disp.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5); } public static function dispatchEvent(_arg1:Event):void{ if (disp == null){ return; }; disp.dispatchEvent(_arg1); } private static function parseEmails(_arg1:Array):void{ var _local2:uint; _local2 = 0; while (_local2 < _arg1.length) { if (_arg1[_local2].length > 0){ _urlVars[("email" + (_local2 + 1))] = _arg1[_local2]; } else { _arg1.splice(_local2, 1); _local2--; }; _local2++; }; } public static function send(... _args):void{ var emails = _args; GameData.validate(); if (validateEmails(emails)){ try { setupURLVars(); parseEmails(emails); _request.data = _urlVars; if (_debug){ trace((((("VIRAL CHALLANGE SENT:\r url: \t" + _request.url) + "?") + _request.data) + "\r")); }; navigateToURL(_request); } catch(e:Error) { trace(("VIRAL CHALLENGE ERROR:" + e.toString())); }; } else { dispatchEvent(new Event("INVALID")); }; } private static function setupURLVars():void{ _urlVars.gameId = GameData.gameId; _urlVars.clientId = GameData.clientId; _urlVars.partner = GameData.partner; _urlVars.version = GameData.version; _urlVars.playNum = GameData.playNum; _urlVars.var1 = GameData.var1; _urlVars.agev = GameData.agev; _urlVars.pp = GameData.pp; _urlVars.type = GameData.type; _urlVars.ruId = GameData.ruId; _urlVars.rsId = GameData.rsId; _urlVars.process = "challenge"; } } }//package com.blockdot.comm.kewlbox
Section 7
//EncryptedNumber (com.blockdot.utils.encryption.EncryptedNumber) package com.blockdot.utils.encryption { public class EncryptedNumber { private var _random:Number; private var _hash:String; private var _value:Number; public function EncryptedNumber(_arg1:Number){ value = _arg1; } public function set value(_arg1:Number){ _value = _arg1; _random = Math.random(); _hash = MD5.hash((_value + _random).toString()); } public function valueOf():Number{ return (value); } public function toString():String{ return (value.toString()); } public function get value():Number{ if (_hash == MD5.hash((_value + _random).toString())){ return (_value); }; throw (new Error("EncryptedNumber does not match encryption pattern.")); } } }//package com.blockdot.utils.encryption
Section 8
//MD5 (com.blockdot.utils.encryption.MD5) package com.blockdot.utils.encryption { public class MD5 { public static const HEX_FORMAT_LOWERCASE:uint = 0; public static const HEX_FORMAT_UPPERCASE:uint = 1; public static const BASE64_PAD_CHARACTER_DEFAULT_COMPLIANCE:String = ""; public static const BASE64_PAD_CHARACTER_RFC_COMPLIANCE:String = "="; public static var hexcase:uint = 0; public static var b64pad:String = ""; public static function md5_cmn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{ return (safe_add(bit_rol(safe_add(safe_add(_arg2, _arg1), safe_add(_arg4, _arg6)), _arg5), _arg3)); } public static function binl_md5(_arg1:Array, _arg2:Number):Array{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; _arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 % 32))); _arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2; _local3 = 1732584193; _local4 = -271733879; _local5 = -1732584194; _local6 = 271733878; _local7 = 0; while (_local7 < _arg1.length) { _local8 = _local3; _local9 = _local4; _local10 = _local5; _local11 = _local6; _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 7, -680876936); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 1)], 12, -389564586); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 17, 606105819); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 3)], 22, -1044525330); _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 7, -176418897); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 5)], 12, 1200080426); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 17, -1473231341); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 7)], 22, -45705983); _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 7, 1770035416); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 9)], 12, -1958414417); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 17, -42063); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 11)], 22, -1990404162); _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 7, 1804603682); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 13)], 12, -40341101); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 17, -1502002290); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 15)], 22, 1236535329); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 5, -165796510); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 6)], 9, -1069501632); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 14, 643717713); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 0)], 20, -373897302); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 5, -701558691); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 10)], 9, 38016083); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 14, -660478335); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 4)], 20, -405537848); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 5, 568446438); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 14)], 9, -1019803690); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 14, -187363961); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 8)], 20, 1163531501); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 5, -1444681467); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 2)], 9, -51403784); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 14, 1735328473); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 12)], 20, -1926607734); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 4, -378558); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 8)], 11, -2022574463); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 16, 1839030562); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 14)], 23, -35309556); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 4, -1530992060); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 4)], 11, 1272893353); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 16, -155497632); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 10)], 23, -1094730640); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 4, 681279174); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 0)], 11, -358537222); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 16, -722521979); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 6)], 23, 76029189); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 4, -640364487); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 12)], 11, -421815835); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 16, 530742520); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 2)], 23, -995338651); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 6, -198630844); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 7)], 10, 1126891415); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 15, -1416354905); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 5)], 21, -57434055); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 6, 1700485571); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 3)], 10, -1894986606); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 15, -1051523); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 1)], 21, -2054922799); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 6, 1873313359); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 15)], 10, -30611744); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 15, -1560198380); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 13)], 21, 1309151649); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 6, -145523070); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 11)], 10, -1120210379); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 15, 718787259); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 9)], 21, -343485551); _local3 = safe_add(_local3, _local8); _local4 = safe_add(_local4, _local9); _local5 = safe_add(_local5, _local10); _local6 = safe_add(_local6, _local11); _local7 = (_local7 + 16); }; return ([_local3, _local4, _local5, _local6]); } public static function md5_gg(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 & _arg4) | (_arg3 & ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function hex_hmac_md5(_arg1:String, _arg2:String):String{ return (rstr2hex(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)))); } public static function binl2rstr(_arg1:Array):String{ var _local2:String; var _local3:Number; _local2 = ""; _local3 = 0; while (_local3 < (_arg1.length * 32)) { _local2 = (_local2 + String.fromCharCode(((_arg1[(_local3 >> 5)] >>> (_local3 % 32)) & 0xFF))); _local3 = (_local3 + 8); }; return (_local2); } public static function hash(_arg1:String):String{ return (hex_md5(_arg1)); } public static function md5_ii(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function md5_hh(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function rstr2binl(_arg1:String):Array{ var _local2:Array; var _local3:Number; _local2 = new Array((_arg1.length >> 2)); _local3 = 0; while (_local3 < _local2.length) { _local2[_local3] = 0; _local3++; }; _local3 = 0; while (_local3 < (_arg1.length * 8)) { _local2[(_local3 >> 5)] = (_local2[(_local3 >> 5)] | ((_arg1.charCodeAt((_local3 / 8)) & 0xFF) << (_local3 % 32))); _local3 = (_local3 + 8); }; return (_local2); } public static function any_hmac_md5(_arg1:String, _arg2:String, _arg3:String):String{ return (rstr2any(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)), _arg3)); } public static function b64_md5(_arg1:String):String{ return (rstr2b64(rstr_md5(str2rstr_utf8(_arg1)))); } public static function hex_md5(_arg1:String):String{ return (rstr2hex(rstr_md5(str2rstr_utf8(_arg1)))); } public static function bit_rol(_arg1:Number, _arg2:Number):Number{ return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2)))); } public static function b64_hmac_md5(_arg1:String, _arg2:String):String{ return (rstr2b64(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)))); } public static function md5_ff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function rstr2hex(_arg1:String):String{ var _local2:String; var _local3:String; var _local4:Number; var _local5:Number; _local2 = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef"; _local3 = ""; _local5 = 0; while (_local5 < _arg1.length) { _local4 = _arg1.charCodeAt(_local5); _local3 = (_local3 + (_local2.charAt(((_local4 >>> 4) & 15)) + _local2.charAt((_local4 & 15)))); _local5++; }; return (_local3); } public static function any_md5(_arg1:String, _arg2:String):String{ return (rstr2any(rstr_md5(str2rstr_utf8(_arg1)), _arg2)); } public static function rstr_hmac_md5(_arg1:String, _arg2:String):String{ var _local3:Array; var _local4:Array; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = rstr2binl(_arg1); if (_local3.length > 16){ _local3 = binl_md5(_local3, (_arg1.length * 8)); }; _local4 = new Array(16); _local5 = new Array(16); _local6 = 0; while (_local6 < 16) { _local4[_local6] = (_local3[_local6] ^ 909522486); _local5[_local6] = (_local3[_local6] ^ 1549556828); _local6++; }; _local7 = binl_md5(_local4.concat(rstr2binl(_arg2)), (0x0200 + (_arg2.length * 8))); return (binl2rstr(binl_md5(_local5.concat(_local7), (0x0200 + 128)))); } public static function safe_add(_arg1:Number, _arg2:Number):Number{ var _local3:Number; var _local4:Number; _local3 = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF)); _local4 = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16)); return (((_local4 << 16) | (_local3 & 0xFFFF))); } public static function str2rstr_utf8(_arg1:String):String{ var _local2:String; var _local3:Number; var _local4:Number; var _local5:Number; _local2 = ""; _local3 = -1; while (++_local3 < _arg1.length) { _local4 = _arg1.charCodeAt(_local3); _local5 = (((_local3 + 1) < _arg1.length)) ? _arg1.charCodeAt((_local3 + 1)) : 0; if ((((((((0xD800 <= _local4)) && ((_local4 <= 56319)))) && ((0xDC00 <= _local5)))) && ((_local5 <= 57343)))){ _local4 = ((65536 + ((_local4 & 1023) << 10)) + (_local5 & 1023)); _local3++; }; if (_local4 <= 127){ _local2 = (_local2 + String.fromCharCode(_local4)); } else { if (_local4 <= 2047){ _local2 = (_local2 + String.fromCharCode((192 | ((_local4 >>> 6) & 31)), (128 | (_local4 & 63)))); } else { if (_local4 <= 0xFFFF){ _local2 = (_local2 + String.fromCharCode((224 | ((_local4 >>> 12) & 15)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63)))); } else { if (_local4 <= 2097151){ _local2 = (_local2 + String.fromCharCode((240 | ((_local4 >>> 18) & 7)), (128 | ((_local4 >>> 12) & 63)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63)))); }; }; }; }; }; return (_local2); } public static function md5_test():Boolean{ return ((hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72")); } public static function rstr2b64(_arg1:String):String{ var _local2:String; var _local3:String; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; _local2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; _local3 = ""; _local4 = _arg1.length; _local5 = 0; while (_local5 < _local4) { _local6 = (((_arg1.charCodeAt(_local5) << 16) | (((_local5 + 1) < _local4)) ? (_arg1.charCodeAt((_local5 + 1)) << 8) : 0) | (((_local5 + 2) < _local4)) ? _arg1.charCodeAt((_local5 + 2)) : 0); _local7 = 0; while (_local7 < 4) { if (((_local5 * 8) + (_local7 * 6)) > (_arg1.length * 8)){ _local3 = (_local3 + b64pad); } else { _local3 = (_local3 + _local2.charAt(((_local6 >>> (6 * (3 - _local7))) & 63))); }; _local7++; }; _local5 = (_local5 + 3); }; return (_local3); } public static function str2rstr_utf16le(_arg1:String):String{ var _local2:String; var _local3:Number; _local2 = ""; _local3 = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + String.fromCharCode((_arg1.charCodeAt(_local3) & 0xFF), ((_arg1.charCodeAt(_local3) >>> 8) & 0xFF))); _local3++; }; return (_local2); } public static function str2rstr_utf16be(_arg1:String):String{ var _local2:String; var _local3:Number; _local2 = ""; _local3 = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + String.fromCharCode(((_arg1.charCodeAt(_local3) >>> 8) & 0xFF), (_arg1.charCodeAt(_local3) & 0xFF))); _local3++; }; return (_local2); } public static function rstr2any(_arg1:String, _arg2:String):String{ var _local3:Number; var _local4:Array; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Array; var _local9:Array; var _local10:String; _local3 = _arg2.length; _local4 = []; _local9 = new Array((_arg1.length / 2)); _local5 = 0; while (_local5 < _local9.length) { _local9[_local5] = ((_arg1.charCodeAt((_local5 * 2)) << 8) | _arg1.charCodeAt(((_local5 * 2) + 1))); _local5++; }; while (_local9.length > 0) { _local8 = []; _local7 = 0; _local5 = 0; while (_local5 < _local9.length) { _local7 = ((_local7 << 16) + _local9[_local5]); _local6 = Math.floor((_local7 / _local3)); _local7 = (_local7 - (_local6 * _local3)); if ((((_local8.length > 0)) || ((_local6 > 0)))){ _local8[_local8.length] = _local6; }; _local5++; }; _local4[_local4.length] = _local7; _local9 = _local8; }; _local10 = ""; _local5 = (_local4.length - 1); while (_local5 >= 0) { _local10 = (_local10 + _arg2.charAt(_local4[_local5])); _local5--; }; return (_local10); } public static function rstr_md5(_arg1:String):String{ return (binl2rstr(binl_md5(rstr2binl(_arg1), (_arg1.length * 8)))); } } }//package com.blockdot.utils.encryption
Section 9
//DateFunctions (com.blockdot.utils.DateFunctions) package com.blockdot.utils { import flash.display.*; public dynamic class DateFunctions extends MovieClip { public static function getISO_Date(){ var _local1:Date; var _local2:String; var _local3:String; var _local4:String; var _local5:String; var _local6:String; var _local7:String; var _local8:String; _local1 = new Date(); _local2 = String((_local1.getMonth() + 1)); _local3 = String(_local1.getDate()); _local4 = String(_local1.getFullYear().toString().substr(2, 2)); _local5 = String(_local1.getMinutes()); _local6 = String(_local1.getHours()); _local7 = String(_local1.getSeconds()); if (_local2.length < 2){ _local2 = ("0" + _local2); }; if (_local3.length < 2){ _local3 = ("0" + _local3); }; if (_local6.length < 2){ _local6 = ("0" + _local6); }; if (_local5.length < 2){ _local5 = ("0" + _local5); }; if (_local7.length < 2){ _local7 = ("0" + _local7); }; _local8 = (((((_local2 + _local3) + _local4) + _local6) + _local5) + _local7); return (_local8); } } }//package com.blockdot.utils
Section 10
//EnumeratedType (com.blockdot.utils.EnumeratedType) package com.blockdot.utils { public dynamic class EnumeratedType { private var mTypeNames:Array; public function EnumeratedType(_arg1:Array){ var _local2:*; super(); mTypeNames = _arg1; _local2 = 0; while (_local2 < _arg1.length) { this[_arg1[_local2]] = _local2; _local2++; }; } public function getName(_arg1:Number){ return (mTypeNames[_arg1]); } } }//package com.blockdot.utils
Section 11
//NewMath (com.blockdot.utils.NewMath) package com.blockdot.utils { import flash.display.*; public class NewMath { public static function getMedian(_arg1:Array):Number{ _arg1.sort(); return (_arg1[Math.floor((_arg1.length / 2))]); } static function d2r(_arg1:Number, _arg2:Boolean):Number{ if (((_arg2) && ((_arg1 < 0)))){ _arg1 = (360 + _arg1); }; if (((_arg2) && ((_arg1 >= 360)))){ _arg1 = (_arg1 - 360); }; return ((_arg1 * (Math.PI / 180))); } public static function r2d(_arg1:Number, _arg2:Boolean):Number{ _arg1 = (_arg1 * (180 / Math.PI)); if (((_arg2) && ((_arg1 < 0)))){ _arg1 = (360 + _arg1); }; if (((_arg2) && ((_arg1 >= 360)))){ _arg1 = (_arg1 - 360); }; return (_arg1); } public static function getAverage(_arg1:Array):Number{ var _local2:Number; var _local3:Number; _local2 = 0; _local3 = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + _arg1[_local3]); _local3++; }; _local2 = (_local2 / _arg1.length); return (_local2); } public static function getMode(_arg1:Array):Number{ var _local2:Array; var _local3:Number; var _local4:Number; _arg1.sort(); _local2 = new Array(); _local3 = 0; _local4 = 0; while (_local4 < _arg1.length) { if (_arg1[_local4] != _arg1[(_local4 - 1)]){ _local3 = (_local2.push(new Array()) - 1); }; _local2[_local3].push(_arg1[_local4]); _local4++; }; _local2.sortOn("length", Array.DESCENDING); return (_local2[0][0]); } public static function getDistance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (Math.sqrt((((_arg2 - _arg1) * (_arg2 - _arg1)) + ((_arg4 - _arg3) * (_arg4 - _arg3))))); } public static function getClipDistance(_arg1:DisplayObject, _arg2:DisplayObject):Number{ return (Math.sqrt((((_arg2.x - _arg1.x) * (_arg2.x - _arg1.x)) + ((_arg2.y - _arg1.y) * (_arg2.y - _arg1.y))))); } public static function getRandomRange(_arg1:Number, _arg2:Number):Number{ if (_arg2 >= _arg1){ if ((_arg2 - _arg1) == 1){ if (Math.random() > 0.5){ return (_arg2); }; return (_arg1); } else { return (Math.floor(((Math.random() * (_arg2 - _arg1)) + _arg1))); }; //unresolved jump }; throw (new ArgumentError("max must be >= min")); } public static function getAngle(_arg1, _arg2, _arg3, _arg4):Number{ return (Math.atan2((_arg4 - _arg3), (_arg2 - _arg1))); } public static function getAngleOfClips(_arg1:DisplayObject, _arg2:DisplayObject):Number{ return (Math.atan2((_arg1.y - _arg2.y), (_arg1.x - _arg2.x))); } } }//package com.blockdot.utils
Section 12
//UniqueNumber (com.blockdot.utils.UniqueNumber) package com.blockdot.utils { import flash.display.*; public dynamic class UniqueNumber extends MovieClip { public static var lastUniqueNumber:Number = 0; public static function padNumber(_arg1, _arg2:Number):String{ var _local3:*; _local3 = new String(_arg1); while (_local3.length < _arg2) { _local3 = ("0" + _local3); }; return (_local3); } public static function getUniqueNumber():Number{ var _local1:Date; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:*; var _local9:String; _local1 = new Date(); _local2 = (Math.max(0, (_local1.getFullYear() - 2005)) % 50); _local3 = _local1.getMonth(); _local4 = (_local1.getDate() - 1); _local5 = _local1.getSeconds(); _local6 = _local2; _local6 = ((_local6 * 12) + _local3); _local6 = ((_local6 * 31) + _local4); _local6 = ((((_local6 * 24) * 60) * 60) + _local5); _local7 = _local1.getMilliseconds(); _local8 = Number((String(_local7) + padNumber(Math.round((Math.random() * 100)), 2))); _local8 = (_local8 % 100000); _local9 = (String(_local6) + _local8); _local6 = Number(_local9); if (_local6 <= lastUniqueNumber){ _local6 = (lastUniqueNumber + 1); }; lastUniqueNumber = _local6; return (_local6); } } }//package com.blockdot.utils
Section 13
//Tween (fl.transitions.Tween) package fl.transitions { import flash.events.*; import flash.display.*; import flash.utils.*; public class Tween extends EventDispatcher { private var _position:Number;// = NAN public var prevTime:Number;// = NAN public var prevPos:Number;// = NAN public var isPlaying:Boolean;// = false public var begin:Number;// = NAN private var _fps:Number;// = NAN private var _time:Number;// = NAN public var change:Number;// = NAN private var _finish:Number;// = NAN public var looping:Boolean;// = false private var _intervalID:uint;// = 0 public var func:Function; private var _timer:Timer;// = null private var _startTime:Number;// = NAN public var prop:String;// = "" private var _duration:Number;// = NAN public var obj:Object;// = null public var useSeconds:Boolean;// = false protected static var _mc:MovieClip = new MovieClip(); public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){ isPlaying = false; obj = null; prop = ""; func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); }; begin = NaN; change = NaN; useSeconds = false; prevTime = NaN; prevPos = NaN; looping = false; _duration = NaN; _time = NaN; _fps = NaN; _position = NaN; _startTime = NaN; _intervalID = 0; _finish = NaN; _timer = null; super(); if (!arguments.length){ return; }; this.obj = _arg1; this.prop = _arg2; this.begin = _arg4; this.position = _arg4; this.duration = _arg6; this.useSeconds = _arg7; if ((_arg3 is Function)){ this.func = _arg3; }; this.finish = _arg5; this._timer = new Timer(100); this.start(); } public function continueTo(_arg1:Number, _arg2:Number):void{ this.begin = this.position; this.finish = _arg1; if (!isNaN(_arg2)){ this.duration = _arg2; }; this.start(); } public function stop():void{ this.stopEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position)); } private function fixTime():void{ if (this.useSeconds){ this._startTime = (getTimer() - (this._time * 1000)); }; } public function set FPS(_arg1:Number):void{ var _local2:Boolean; _local2 = this.isPlaying; this.stopEnterFrame(); this._fps = _arg1; if (_local2){ this.startEnterFrame(); }; } public function get finish():Number{ return ((this.begin + this.change)); } public function get duration():Number{ return (this._duration); } protected function startEnterFrame():void{ var _local1:Number; if (isNaN(this._fps)){ _mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true); } else { _local1 = (1000 / this._fps); this._timer.delay = _local1; this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true); this._timer.start(); }; this.isPlaying = true; } public function set time(_arg1:Number):void{ this.prevTime = this._time; if (_arg1 > this.duration){ if (this.looping){ this.rewind((_arg1 - this._duration)); this.update(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position)); } else { if (this.useSeconds){ this._time = this._duration; this.update(); }; this.stop(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position)); }; } else { if (_arg1 < 0){ this.rewind(); this.update(); } else { this._time = _arg1; this.update(); }; }; } protected function stopEnterFrame():void{ if (isNaN(this._fps)){ _mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame); } else { this._timer.stop(); }; this.isPlaying = false; } public function getPosition(_arg1:Number=NaN):Number{ if (isNaN(_arg1)){ _arg1 = this._time; }; return (this.func(_arg1, this.begin, this.change, this._duration)); } public function set finish(_arg1:Number):void{ this.change = (_arg1 - this.begin); } public function set duration(_arg1:Number):void{ this._duration = ((_arg1)<=0) ? Infinity : _arg1; } public function setPosition(_arg1:Number):void{ this.prevPos = this._position; if (this.prop.length){ this.obj[this.prop] = (this._position = _arg1); }; this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position)); } public function resume():void{ this.fixTime(); this.startEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position)); } public function fforward():void{ this.time = this._duration; this.fixTime(); } protected function onEnterFrame(_arg1:Event):void{ this.nextFrame(); } public function get position():Number{ return (this.getPosition(this._time)); } public function yoyo():void{ this.continueTo(this.begin, this.time); } public function nextFrame():void{ if (this.useSeconds){ this.time = ((getTimer() - this._startTime) / 1000); } else { this.time = (this._time + 1); }; } protected function timerHandler(_arg1:TimerEvent):void{ this.nextFrame(); _arg1.updateAfterEvent(); } public function get FPS():Number{ return (this._fps); } public function rewind(_arg1:Number=0):void{ this._time = _arg1; this.fixTime(); this.update(); } public function set position(_arg1:Number):void{ this.setPosition(_arg1); } public function get time():Number{ return (this._time); } private function update():void{ this.setPosition(this.getPosition(this._time)); } public function start():void{ this.rewind(); this.startEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position)); } public function prevFrame():void{ if (!this.useSeconds){ this.time = (this._time - 1); }; } } }//package fl.transitions
Section 14
//TweenEvent (fl.transitions.TweenEvent) package fl.transitions { import flash.events.*; public class TweenEvent extends Event { public var time:Number;// = NAN public var position:Number;// = NAN public static const MOTION_START:String = "motionStart"; public static const MOTION_STOP:String = "motionStop"; public static const MOTION_LOOP:String = "motionLoop"; public static const MOTION_CHANGE:String = "motionChange"; public static const MOTION_FINISH:String = "motionFinish"; public static const MOTION_RESUME:String = "motionResume"; public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){ time = NaN; position = NaN; super(_arg1, _arg4, _arg5); this.time = _arg2; this.position = _arg3; } override public function clone():Event{ return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable)); } } }//package fl.transitions
Section 15
//AutoLayoutEvent (fl.video.AutoLayoutEvent) package fl.video { import flash.events.*; import flash.geom.*; public class AutoLayoutEvent extends LayoutEvent implements IVPEvent { private var _vp:uint; public static const AUTO_LAYOUT:String = "autoLayout"; public function AutoLayoutEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Rectangle=null, _arg5:Rectangle=null, _arg6:uint=0){ super(_arg1, _arg2, _arg3, _arg4, _arg5); _vp = _arg6; } override public function clone():Event{ return (new AutoLayoutEvent(type, bubbles, cancelable, Rectangle(oldBounds.clone()), Rectangle(oldRegistrationBounds.clone()), vp)); } public function set vp(_arg1:uint):void{ _vp = _arg1; } public function get vp():uint{ return (_vp); } } }//package fl.video
Section 16
//ConnectClient (fl.video.ConnectClient) package fl.video { import flash.net.*; public class ConnectClient { public var connIndex:uint; public var nc:NetConnection; public var pending:Boolean; public var owner:NCManager; public function ConnectClient(_arg1:NCManager, _arg2:NetConnection, _arg3:uint=0){ this.owner = _arg1; this.nc = _arg2; this.connIndex = _arg3; this.pending = false; } public function onBWCheck(... _args):Number{ return (++owner._payload); } public function onBWDone(... _args):void{ var _local2:Number; if (_args.length > 0){ _local2 = _args[0]; }; owner.onConnected(nc, _local2); } public function close():void{ } } }//package fl.video
Section 17
//ControlData (fl.video.ControlData) package fl.video { import flash.display.*; public class ControlData { public var state_mc:Array; public var origWidth:Number; public var handle_mc:Sprite; public var state:uint; public var leftMargin:Number; public var fullness_mc:DisplayObject; public var isDragging:Boolean; public var currentState_mc:DisplayObject; public var percentage:Number; public var owner:DisplayObject; public var origX:Number; public var origY:Number; public var bottomMargin:Number; public var disabled_mc:DisplayObject; public var enabled:Boolean; public var hit_mc:Sprite; public var origHeight:Number; public var index:int; public var mask_mc:DisplayObject; public var avatar:DisplayObject; public var fill_mc:DisplayObject; public var topMargin:Number; public var uiMgr:UIManager; public var progress_mc:DisplayObject; public var rightMargin:Number; public var ctrl:DisplayObject; public var origScaleX:Number; public var origScaleY:Number; public function ControlData(_arg1:UIManager, _arg2:DisplayObject, _arg3:DisplayObject, _arg4:int){ var uiMgr = _arg1; var ctrl = _arg2; var owner = _arg3; var index = _arg4; super(); this.uiMgr = uiMgr; this.index = index; this.ctrl = ctrl; this.owner = owner; try { ctrl["uiMgr"] = uiMgr; } catch(re:ReferenceError) { }; } } }//package fl.video
Section 18
//CuePointManager (fl.video.CuePointManager) package fl.video { public class CuePointManager { flvplayback_internal var _disabledCuePointsByNameOnly:Object; flvplayback_internal var navCuePoints:Array; flvplayback_internal var allCuePoints:Array; flvplayback_internal var _disabledCuePoints:Array; flvplayback_internal var _asCuePointTolerance:Number; flvplayback_internal var _linearSearchTolerance:Number; flvplayback_internal var _asCuePointIndex:int; flvplayback_internal var asCuePoints:Array; flvplayback_internal var flvCuePoints:Array; flvplayback_internal var _metadataLoaded:Boolean; flvplayback_internal var _id:uint; private var _owner:FLVPlayback; flvplayback_internal var eventCuePoints:Array; public static const SHORT_VERSION:String = "2.1"; public static const VERSION:String = "2.1.0.14"; flvplayback_internal static const DEFAULT_LINEAR_SEARCH_TOLERANCE:Number = 50; flvplayback_internal static var cuePointsReplace:Array = ["&quot;", "\"", "&#39;", "'", "&#44;", ",", "&amp;", "&"]; public function CuePointManager(_arg1:FLVPlayback, _arg2:uint){ _owner = _arg1; _id = _arg2; reset(); _asCuePointTolerance = (_owner.getVideoPlayer(_id).playheadUpdateInterval / 2000); _linearSearchTolerance = DEFAULT_LINEAR_SEARCH_TOLERANCE; } flvplayback_internal function getCuePoint(_arg1:Array, _arg2:Boolean, _arg3):Object{ var _local4:Object; var _local5:int; switch (typeof(_arg3)){ case "string": _local4 = {name:_arg3}; break; case "number": _local4 = {time:_arg3}; break; case "object": _local4 = _arg3; break; }; _local5 = getCuePointIndex(_arg1, _arg2, _local4.time, _local4.name); if (_local5 < 0){ return (null); }; _local4 = deepCopyObject(_arg1[_local5]); _local4.array = _arg1; _local4.index = _local5; return (_local4); } public function resetASCuePointIndex(_arg1:Number):void{ var _local2:int; if ((((_arg1 <= 0)) || ((asCuePoints == null)))){ _asCuePointIndex = 0; return; }; _local2 = getCuePointIndex(asCuePoints, true, _arg1); _asCuePointIndex = ((asCuePoints[_local2].time)<_arg1) ? (_local2 + 1) : _local2; } public function set playheadUpdateInterval(_arg1:Number):void{ _asCuePointTolerance = (_arg1 / 2000); } flvplayback_internal function addOrDisable(_arg1:Boolean, _arg2:Object):void{ if (_arg1){ if (_arg2.type == CuePointType.ACTIONSCRIPT){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "Cannot disable actionscript cue points")); }; setFLVCuePointEnabled(false, _arg2); } else { if (_arg2.type == CuePointType.ACTIONSCRIPT){ addASCuePoint(_arg2); }; }; } public function processFLVCuePoints(_arg1:Array):void{ var _local2:int; var _local3:Number; var _local4:Object; var _local5:Array; var _local6:Number; var _local7:int; _metadataLoaded = true; if ((((_arg1 == null)) || ((_arg1.length < 1)))){ flvCuePoints = null; navCuePoints = null; eventCuePoints = null; return; }; flvCuePoints = _arg1; navCuePoints = new Array(); eventCuePoints = new Array(); _local3 = -1; _local5 = _disabledCuePoints; _local6 = 0; _disabledCuePoints = new Array(); _local7 = 0; while ((_local4 = flvCuePoints[_local7++]) != undefined) { if ((((_local3 > 0)) && ((_local3 >= _local4.time)))){ flvCuePoints = null; navCuePoints = null; eventCuePoints = null; _disabledCuePoints = new Array(); _disabledCuePointsByNameOnly = new Object(); throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, ("Unsorted cuePoint found after time: " + _local3))); }; _local3 = _local4.time; while ((((_local6 < _local5.length)) && ((cuePointCompare(_local5[_local6].time, null, _local4) < 0)))) { _local6++; }; if (((!((_disabledCuePointsByNameOnly[_local4.name] == undefined))) || ((((_local6 < _local5.length)) && ((cuePointCompare(_local5[_local6].time, _local5[_local6].name, _local4) == 0)))))){ _disabledCuePoints.push({time:_local4.time, name:_local4.name}); }; if (_local4.type == CuePointType.NAVIGATION){ navCuePoints.push(_local4); } else { if (_local4.type == CuePointType.EVENT){ eventCuePoints.push(_local4); }; }; if ((((allCuePoints == null)) || ((allCuePoints.length < 1)))){ allCuePoints = new Array(); allCuePoints.push(_local4); } else { _local2 = getCuePointIndex(allCuePoints, true, _local4.time); _local2 = ((allCuePoints[_local2].time)>_local4.time) ? 0 : (_local2 + 1); allCuePoints.splice(_local2, 0, _local4); }; }; _disabledCuePointsByNameOnly = new Object(); } public function addASCuePoint(_arg1, _arg2:String=null, _arg3:Object=null):Object{ var _local4:Object; var _local5:Boolean; var _local6:Boolean; var _local7:int; var _local8:Number; var _local9:Object; var _local10:int; if (typeof(_arg1) == "object"){ _local4 = deepCopyObject(_arg1); } else { _local4 = {time:_arg1, name:_arg2, parameters:deepCopyObject(_arg3)}; }; if (_local4.parameters == null){ delete _local4.parameters; }; _local5 = ((isNaN(_local4.time)) || ((_local4.time < 0))); if (_local5){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "time must be number")); }; _local6 = (_local4.name == null); if (_local6){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "name cannot be undefined or null")); }; _local4.type = CuePointType.ACTIONSCRIPT; if ((((asCuePoints == null)) || ((asCuePoints.length < 1)))){ _local7 = 0; asCuePoints = new Array(); asCuePoints.push(_local4); } else { _local7 = getCuePointIndex(asCuePoints, true, _local4.time); _local7 = ((asCuePoints[_local7].time)>_local4.time) ? 0 : (_local7 + 1); asCuePoints.splice(_local7, 0, _local4); }; if ((((allCuePoints == null)) || ((allCuePoints.length < 1)))){ allCuePoints = new Array(); allCuePoints.push(_local4); } else { _local10 = getCuePointIndex(allCuePoints, true, _local4.time); _local10 = ((allCuePoints[_local10].time)>_local4.time) ? 0 : (_local10 + 1); allCuePoints.splice(_local10, 0, _local4); }; _local8 = _owner.getVideoPlayer(_id).playheadTime; if (_local8 > 0){ if (_asCuePointIndex == _local7){ if (_local8 > asCuePoints[_local7].time){ _asCuePointIndex++; }; } else { if (_asCuePointIndex > _local7){ _asCuePointIndex++; }; }; } else { _asCuePointIndex = 0; }; _local9 = deepCopyObject(asCuePoints[_local7]); _local9.array = asCuePoints; _local9.index = _local7; return (_local9); } public function get metadataLoaded():Boolean{ return (_metadataLoaded); } public function reset():void{ _metadataLoaded = false; allCuePoints = null; asCuePoints = null; _disabledCuePoints = new Array(); _disabledCuePointsByNameOnly = new Object(); flvCuePoints = null; navCuePoints = null; eventCuePoints = null; _asCuePointIndex = 0; } public function removeCuePoints(_arg1:Array, _arg2:Object):Number{ var _local3:int; var _local4:Object; var _local5:int; _local5 = 0; _local3 = getCuePointIndex(_arg1, true, -1, _arg2.name); while (_local3 >= 0) { _local4 = _arg1[_local3]; _arg1.splice(_local3, 1); _local3--; _local5++; _local3 = getNextCuePointIndexWithName(_local4.name, _arg1, _local3); }; return (_local5); } flvplayback_internal function unescape(_arg1:String):String{ var _local2:String; var _local3:int; _local2 = _arg1; _local3 = 0; while (_local3 < cuePointsReplace.length) { var _temp1 = _local3; _local3 = (_local3 + 1); var _temp2 = _local3; _local3 = (_local3 + 1); _local2 = _local2.replace(cuePointsReplace[_temp1], cuePointsReplace[_temp2]); }; return (_local2); } public function setFLVCuePointEnabled(_arg1:Boolean, _arg2):int{ var _local3:Object; var _local4:Boolean; var _local5:Boolean; var _local6:uint; var _local7:int; var _local8:int; var _local9:Object; switch (typeof(_arg2)){ case "string": _local3 = {name:_arg2}; break; case "number": _local3 = {time:_arg2}; break; case "object": _local3 = _arg2; break; }; _local4 = ((isNaN(_local3.time)) || ((_local3.time < 0))); _local5 = (_local3.name == null); if (((_local4) && (_local5))){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "time must be number and/or name must not be undefined or null")); }; _local6 = 0; if (_local4){ if (!_metadataLoaded){ if (_disabledCuePointsByNameOnly[_local3.name] == undefined){ if (!_arg1){ _disabledCuePointsByNameOnly[_local3.name] = new Array(); }; } else { if (_arg1){ delete _disabledCuePointsByNameOnly[_local3.name]; }; return (-1); }; removeCuePoints(_disabledCuePoints, _local3); return (-1); }; if (_arg1){ _local6 = removeCuePoints(_disabledCuePoints, _local3); } else { _local7 = getCuePointIndex(flvCuePoints, true, -1, _local3.name); while (_local7 >= 0) { _local9 = flvCuePoints[_local7]; _local8 = getCuePointIndex(_disabledCuePoints, true, _local9.time); if ((((_local8 < 0)) || (!((_disabledCuePoints[_local8].time == _local9.time))))){ _disabledCuePoints = insertCuePoint(_local8, _disabledCuePoints, {name:_local9.name, time:_local9.time}); _local6 = (_local6 + 1); }; _local7 = getNextCuePointIndexWithName(_local9.name, flvCuePoints, _local7); }; }; return (_local6); }; _local7 = getCuePointIndex(_disabledCuePoints, false, _local3.time, _local3.name); if (_local7 < 0){ if (_arg1){ if (!_metadataLoaded){ _local7 = getCuePointIndex(_disabledCuePoints, false, _local3.time); if (_local7 < 0){ _local8 = getCuePointIndex(_disabledCuePointsByNameOnly[_local3.name], true, _local3.time); if (cuePointCompare(_local3.time, null, _disabledCuePointsByNameOnly[_local3.name]) != 0){ _disabledCuePointsByNameOnly[_local3.name] = insertCuePoint(_local8, _disabledCuePointsByNameOnly[_local3.name], _local3); }; } else { _disabledCuePoints.splice(_local7, 1); }; }; return ((_metadataLoaded) ? 0 : -1); }; } else { if (_arg1){ _disabledCuePoints.splice(_local7, 1); _local6 = 1; } else { _local6 = 0; }; return ((_metadataLoaded) ? _local6 : -1); }; if (_metadataLoaded){ _local7 = getCuePointIndex(flvCuePoints, false, _local3.time, _local3.name); if (_local7 < 0){ return (0); }; if (_local5){ _local3.name = flvCuePoints[_local7].name; }; }; _local8 = getCuePointIndex(_disabledCuePoints, true, _local3.time); _disabledCuePoints = insertCuePoint(_local8, _disabledCuePoints, _local3); _local6 = 1; return ((_metadataLoaded) ? _local6 : -1); } public function isFLVCuePointEnabled(_arg1):Boolean{ var _local2:Object; var _local3:Boolean; var _local4:Boolean; var _local5:int; if (!_metadataLoaded){ return (true); }; switch (typeof(_arg1)){ case "string": _local2 = {name:_arg1}; break; case "number": _local2 = {time:_arg1}; break; case "object": _local2 = _arg1; break; }; _local3 = ((isNaN(_local2.time)) || ((_local2.time < 0))); _local4 = (_local2.name == null); if (((_local3) && (_local4))){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "time must be number and/or name must not be undefined or null")); }; if (_local3){ _local5 = getCuePointIndex(flvCuePoints, true, -1, _local2.name); if (_local5 < 0){ return (true); }; while (_local5 >= 0) { if (getCuePointIndex(_disabledCuePoints, false, flvCuePoints[_local5].time, flvCuePoints[_local5].name) < 0){ return (true); }; _local5 = getNextCuePointIndexWithName(_local2.name, flvCuePoints, _local5); }; return (false); }; return ((getCuePointIndex(_disabledCuePoints, false, _local2.time, _local2.name) < 0)); } public function removeASCuePoint(_arg1):Object{ var _local2:Object; var _local3:int; if ((((asCuePoints == null)) || ((asCuePoints.length < 1)))){ return (null); }; switch (typeof(_arg1)){ case "string": _local2 = {name:_arg1}; break; case "number": _local2 = {time:_arg1}; break; case "object": _local2 = _arg1; break; }; _local3 = getCuePointIndex(asCuePoints, false, _local2.time, _local2.name); if (_local3 < 0){ return (null); }; _local2 = asCuePoints[_local3]; asCuePoints.splice(_local3, 1); _local3 = getCuePointIndex(allCuePoints, false, _local2.time, _local2.name); if (_local3 > 0){ allCuePoints.splice(_local3, 1); }; if (_owner.getVideoPlayer(_id).playheadTime > 0){ if (_asCuePointIndex > _local3){ _asCuePointIndex--; }; } else { _asCuePointIndex = 0; }; return (_local2); } public function get id():uint{ return (_id); } public function processCuePointsProperty(_arg1:Array):void{ var _local2:uint; var _local3:uint; var _local4:String; var _local5:String; var _local6:Object; var _local7:Boolean; var _local8:int; if ((((_arg1 == null)) || ((_arg1.length == 0)))){ return; }; _local2 = 0; _local8 = 0; while (_local8 < (_arg1.length - 1)) { switch (_local2){ case 6: addOrDisable(_local7, _local6); _local2 = 0; case 0: var _temp1 = _local8; _local8 = (_local8 + 1); if (_arg1[_temp1] != "t"){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format")); }; if (isNaN(_arg1[_local8])){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "time must be number")); }; _local6 = new Object(); _local6.time = (_arg1[_local8] / 1000); _local2++; break; case 1: var _temp2 = _local8; _local8 = (_local8 + 1); if (_arg1[_temp2] != "n"){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format")); }; if (_arg1[_local8] == undefined){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "name cannot be null or undefined")); }; _local6.name = unescape(_arg1[_local8]); _local2++; break; case 2: var _temp3 = _local8; _local8 = (_local8 + 1); if (_arg1[_temp3] != "t"){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format")); }; if (isNaN(_arg1[_local8])){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "type must be number")); }; switch (_arg1[_local8]){ case 0: _local6.type = CuePointType.EVENT; break; case 1: _local6.type = CuePointType.NAVIGATION; break; case 2: _local6.type = CuePointType.ACTIONSCRIPT; break; default: throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "type must be 0, 1 or 2")); }; _local2++; break; case 3: var _temp4 = _local8; _local8 = (_local8 + 1); if (_arg1[_temp4] != "d"){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format")); }; if (isNaN(_arg1[_local8])){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "disabled must be number")); }; _local7 = !((_arg1[_local8] == 0)); _local2++; break; case 4: var _temp5 = _local8; _local8 = (_local8 + 1); if (_arg1[_temp5] != "p"){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "unexpected cuePoint parameter format")); }; if (isNaN(_arg1[_local8])){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "num params must be number")); }; _local3 = _arg1[_local8]; _local2++; if (_local3 == 0){ _local2++; } else { _local6.parameters = new Object(); }; break; case 5: var _temp6 = _local8; _local8 = (_local8 + 1); _local4 = _arg1[_temp6]; _local5 = _arg1[_local8]; if ((_local4 is String)){ _local4 = unescape(_local4); }; if ((_local5 is String)){ _local5 = unescape(_local5); }; _local6.parameters[_local4] = _local5; _local3--; if (_local3 == 0){ _local2++; }; break; }; _local8++; }; if (_local2 == 6){ addOrDisable(_local7, _local6); } else { throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "unexpected end of cuePoint param string")); }; } flvplayback_internal function getNextCuePointIndexWithName(_arg1:String, _arg2:Array, _arg3:int):int{ var _local4:int; if (_arg1 == null){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "name cannot be undefined or null")); }; if (_arg2 == null){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "cuePoint.array undefined")); }; if (((((isNaN(_arg3)) || ((_arg3 < -1)))) || ((_arg3 >= _arg2.length)))){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "cuePoint.index must be number between -1 and cuePoint.array.length")); }; _local4 = (_arg3 + 1); while (_local4 < _arg2.length) { if (_arg2[_local4].name == _arg1){ break; }; _local4++; }; if (_local4 < _arg2.length){ return (_local4); }; return (-1); } public function dispatchASCuePoints():void{ var _local1:Number; _local1 = _owner.getVideoPlayer(_id).playheadTime; if (((_owner.getVideoPlayer(_id).stateResponsive) && (!((asCuePoints == null))))){ while ((((_asCuePointIndex < asCuePoints.length)) && ((asCuePoints[_asCuePointIndex].time <= (_local1 + _asCuePointTolerance))))) { _owner.dispatchEvent(new MetadataEvent(MetadataEvent.CUE_POINT, false, false, deepCopyObject(asCuePoints[_asCuePointIndex++]), _id)); }; }; } flvplayback_internal function getNextCuePointWithName(_arg1:Object):Object{ var _local2:int; var _local3:Object; if (_arg1 == null){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "cuePoint parameter undefined")); }; if (((isNaN(_arg1.time)) || ((_arg1.time < 0)))){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "time must be number")); }; _local2 = getNextCuePointIndexWithName(_arg1.name, _arg1.array, _arg1.index); if (_local2 < 0){ return (null); }; _local3 = deepCopyObject(_arg1.array[_local2]); _local3.array = _arg1.array; _local3.index = _local2; return (_local3); } public function insertCuePoint(_arg1:int, _arg2:Array, _arg3:Object):Array{ if (_arg1 < 0){ _arg2 = new Array(); _arg2.push(_arg3); } else { if (_arg2[_arg1].time > _arg3.time){ _arg1 = 0; } else { _arg1++; }; _arg2.splice(_arg1, 0, _arg3); }; return (_arg2); } flvplayback_internal function getCuePointIndex(_arg1:Array, _arg2:Boolean, _arg3:Number=NaN, _arg4:String=null, _arg5:int=-1, _arg6:int=-1):int{ var _local7:Boolean; var _local8:Boolean; var _local9:int; var _local10:int; var _local11:int; var _local12:int; var _local13:int; var _local14:int; var _local15:int; if ((((_arg1 == null)) || ((_arg1.length < 1)))){ return (-1); }; _local7 = ((isNaN(_arg3)) || ((_arg3 < 0))); _local8 = (_arg4 == null); if (((_local7) && (_local8))){ throw (new VideoError(VideoError.ILLEGAL_CUE_POINT, "time must be number and/or name must not be undefined or null")); }; if (_arg5 < 0){ _arg5 = 0; }; if (_arg6 < 0){ _arg6 = _arg1.length; }; if (((!(_local8)) && (((_arg2) || (_local7))))){ if (_local7){ _local12 = _arg5; } else { _local12 = getCuePointIndex(_arg1, _arg2, _arg3); }; _local13 = _local12; while (_local13 >= _arg5) { if (_arg1[_local13].name == _arg4){ break; }; _local13--; }; if (_local13 >= _arg5){ return (_local13); }; _local13 = (_local12 + 1); while (_local13 < _arg6) { if (_arg1[_local13].name == _arg4){ break; }; _local13++; }; if (_local13 < _arg6){ return (_local13); }; return (-1); }; if (_arg6 <= _linearSearchTolerance){ _local14 = (_arg5 + _arg6); _local15 = _arg5; while (_local15 < _local14) { _local9 = cuePointCompare(_arg3, _arg4, _arg1[_local15]); if (_local9 == 0){ return (_local15); }; if (_local9 < 0){ break; }; _local15++; }; if (_arg2){ if (_local15 > 0){ return ((_local15 - 1)); }; return (0); }; return (-1); }; _local10 = int((_arg6 / 2)); _local11 = (_arg5 + _local10); _local9 = cuePointCompare(_arg3, _arg4, _arg1[_local11]); if (_local9 < 0){ return (getCuePointIndex(_arg1, _arg2, _arg3, _arg4, _arg5, _local10)); }; if (_local9 > 0){ return (getCuePointIndex(_arg1, _arg2, _arg3, _arg4, (_local11 + 1), ((_local10 - 1) + (_arg6 % 2)))); }; return (_local11); } flvplayback_internal static function deepCopyObject(_arg1:Object, _arg2:uint=0):Object{ var _local3:Object; var _local4:*; if (_arg1 == null){ return (_arg1); }; _local3 = new Object(); for (_local4 in _arg1) { if ((((_arg2 == 0)) && ((((_local4 == "array")) || ((_local4 == "index")))))){ } else { if (typeof(_arg1[_local4]) == "object"){ _local3[_local4] = deepCopyObject(_arg1[_local4], (_arg2 + 1)); } else { _local3[_local4] = _arg1[_local4]; }; }; }; return (_local3); } flvplayback_internal static function cuePointCompare(_arg1:Number, _arg2:String, _arg3:Object):int{ var _local4:Number; var _local5:Number; _local4 = Math.round((_arg1 * 1000)); _local5 = Math.round((_arg3.time * 1000)); if (_local4 < _local5){ return (-1); }; if (_local4 > _local5){ return (1); }; if (_arg2 != null){ if (_arg2 == _arg3.name){ return (0); }; if (_arg2 < _arg3.name){ return (-1); }; return (1); }; return (0); } } }//package fl.video
Section 19
//CuePointType (fl.video.CuePointType) package fl.video { public final class CuePointType { public static const FLV:String = "flv"; public static const ALL:String = "all"; public static const ACTIONSCRIPT:String = "actionscript"; public static const EVENT:String = "event"; public static const NAVIGATION:String = "navigation"; } }//package fl.video
Section 20
//FLVPlayback (fl.video.FLVPlayback) package fl.video { import flash.net.*; import flash.events.*; import flash.display.*; import flash.geom.*; import flash.media.*; import flash.utils.*; public class FLVPlayback extends Sprite { private var _playheadUpdateInterval:Number; private var _align:String; flvplayback_internal var videoPlayerStateDict:Dictionary; flvplayback_internal var cuePointMgrs:Array; private var _volume:Number; private var _origHeight:Number; flvplayback_internal var videoPlayerStates:Array; private var _progressInterval:Number; private var _seekToPrevOffset:Number; private var _origWidth:Number; private var _scaleMode:String; flvplayback_internal var resizingNow:Boolean; flvplayback_internal var videoPlayers:Array; private var _bufferTime:Number; private var _aspectRatio:Boolean; private var _autoRewind:Boolean; flvplayback_internal var uiMgr:UIManager; private var previewImage_mc:Loader; private var _componentInspectorSetting:Boolean; flvplayback_internal var _firstStreamShown:Boolean; private var _visibleVP:uint; private var _idleTimeout:Number; private var _soundTransform:SoundTransform; public var boundingBox_mc:DisplayObject; flvplayback_internal var skinShowTimer:Timer; private var preview_mc:MovieClip; private var livePreviewHeight:Number; flvplayback_internal var _firstStreamReady:Boolean; private var _activeVP:uint; private var isLivePreview:Boolean; private var _topVP:uint; private var livePreviewWidth:Number; private var __forceNCMgr:NCManager; private var previewImageUrl:String; public static const SEEK_TO_PREV_OFFSET_DEFAULT:Number = 1; public static const SHORT_VERSION:String = "2.1"; flvplayback_internal static const skinShowTimerInterval:Number = 2000; public static const VERSION:String = "2.1.0.14"; flvplayback_internal static const DEFAULT_SKIN_SHOW_TIMER_INTERVAL:Number = 2000; public function FLVPlayback(){ var _local1:VideoPlayer; super(); mouseEnabled = false; isLivePreview = ((!((parent == null))) && ((getQualifiedClassName(parent) == "fl.livepreview::LivePreviewParent"))); _componentInspectorSetting = false; _origWidth = super.width; _origHeight = super.height; super.scaleX = 1; super.scaleY = 1; _local1 = new VideoPlayer(0, 0); _local1.setSize(_origWidth, _origHeight); videoPlayers = new Array(); videoPlayers[0] = _local1; _align = _local1.align; _autoRewind = _local1.autoRewind; _scaleMode = _local1.scaleMode; _bufferTime = _local1.bufferTime; _idleTimeout = _local1.idleTimeout; _playheadUpdateInterval = _local1.playheadUpdateInterval; _progressInterval = _local1.progressInterval; _soundTransform = _local1.soundTransform; _volume = _local1.volume; _seekToPrevOffset = SEEK_TO_PREV_OFFSET_DEFAULT; _firstStreamReady = false; _firstStreamShown = false; resizingNow = false; uiMgr = new UIManager(this); if (isLivePreview){ uiMgr.visible = true; }; _activeVP = 0; _visibleVP = 0; _topVP = 0; videoPlayerStates = new Array(); videoPlayerStateDict = new Dictionary(true); cuePointMgrs = new Array(); createVideoPlayer(0); boundingBox_mc.visible = false; removeChild(boundingBox_mc); boundingBox_mc = null; if (isLivePreview){ previewImageUrl = ""; createLivePreviewMovieClip(); setSize(_origWidth, _origHeight); }; } public function set fullScreenTakeOver(_arg1:Boolean):void{ uiMgr.fullScreenTakeOver = _arg1; } public function pause():void{ var _local1:VideoPlayerState; var _local2:VideoPlayer; if (!_firstStreamShown){ _local1 = videoPlayerStates[_activeVP]; queueCmd(_local1, QueuedCommand.PAUSE); } else { _local2 = videoPlayers[_activeVP]; _local2.pause(); }; } public function setScale(_arg1:Number, _arg2:Number):void{ var _local3:Rectangle; var _local4:Rectangle; var _local5:int; var _local6:VideoPlayer; _local3 = new Rectangle(x, y, width, height); _local4 = new Rectangle(registrationX, registrationY, registrationWidth, registrationHeight); resizingNow = true; _local5 = 0; while (_local5 < videoPlayers.length) { _local6 = videoPlayers[_local5]; if (_local6 !== null){ _local6.setSize((_origWidth * _arg1), (_origWidth * _arg2)); }; _local5++; }; resizingNow = false; dispatchEvent(new LayoutEvent(LayoutEvent.LAYOUT, false, false, _local3, _local4)); } public function stop():void{ var _local1:VideoPlayerState; var _local2:VideoPlayer; if (!_firstStreamShown){ _local1 = videoPlayerStates[_activeVP]; queueCmd(_local1, QueuedCommand.STOP); } else { _local2 = videoPlayers[_activeVP]; _local2.stop(); }; } public function set align(_arg1:String):void{ var _local2:VideoPlayer; if (_activeVP == 0){ _align = _arg1; }; _local2 = videoPlayers[_activeVP]; _local2.align = _arg1; } public function getVideoPlayer(_arg1:Number):VideoPlayer{ return (videoPlayers[_arg1]); } public function get playheadTime():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.playheadTime); } public function get progressInterval():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.progressInterval); } public function set skinFadeTime(_arg1:int):void{ uiMgr.skinFadeTime = _arg1; } public function get seekToPrevOffset():Number{ return (_seekToPrevOffset); } public function set playheadTime(_arg1:Number):void{ seek(_arg1); } public function get source():String{ var _local1:VideoPlayerState; var _local2:VideoPlayer; _local1 = videoPlayerStates[_activeVP]; if (_local1.isWaiting){ return (_local1.url); }; _local2 = videoPlayers[_activeVP]; return (_local2.source); } public function get activeVideoPlayerIndex():uint{ return (_activeVP); } public function get skinFadeTime():int{ return (uiMgr.skinFadeTime); } public function set scaleMode(_arg1:String):void{ var _local2:VideoPlayer; if (_activeVP == 0){ _scaleMode = _arg1; }; _local2 = videoPlayers[_activeVP]; _local2.scaleMode = _arg1; } public function set bufferingBar(_arg1:Sprite):void{ uiMgr.setControl(UIManager.BUFFERING_BAR, _arg1); } public function get metadataLoaded():Boolean{ var _local1:CuePointManager; _local1 = cuePointMgrs[_activeVP]; return (_local1.metadataLoaded); } public function closeVideoPlayer(_arg1:uint):void{ var _local2:VideoPlayer; if (_arg1 == 0){ throw (new VideoError(VideoError.DELETE_DEFAULT_PLAYER)); }; if (videoPlayers[_arg1] == undefined){ return; }; _local2 = videoPlayers[_arg1]; if (_visibleVP == _arg1){ visibleVideoPlayerIndex = 0; }; if (_activeVP == _arg1){ activeVideoPlayerIndex = 0; }; removeChild(_local2); _local2.close(); delete videoPlayers[_arg1]; delete videoPlayerStates[_arg1]; delete videoPlayerStateDict[_local2]; } public function get scaleMode():String{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.scaleMode); } public function set progressInterval(_arg1:Number):void{ var _local2:VideoPlayer; if (_activeVP == 0){ _progressInterval = _arg1; }; _local2 = videoPlayers[_activeVP]; _local2.progressInterval = _arg1; } public function get playing():Boolean{ return ((state == VideoState.PLAYING)); } public function get totalTime():Number{ var _local1:VideoPlayerState; var _local2:VideoPlayer; if (isLivePreview){ return (1); }; _local1 = videoPlayerStates[_activeVP]; if (_local1.totalTimeSet){ return (_local1.totalTime); }; _local2 = videoPlayers[_activeVP]; return (_local2.totalTime); } public function get ncMgr():INCManager{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.ncMgr); } public function set volume(_arg1:Number):void{ var _local2:VideoPlayer; if (_volume == _arg1){ return; }; _volume = _arg1; if (!scrubbing){ _local2 = videoPlayers[_visibleVP]; _local2.volume = _volume; }; dispatchEvent(new SoundEvent(SoundEvent.SOUND_UPDATE, false, false, _local2.soundTransform)); } public function get skinAutoHide():Boolean{ return (uiMgr.skinAutoHide); } public function set source(_arg1:String):void{ var _local2:VideoPlayerState; var _local3:CuePointManager; if (isLivePreview){ return; }; if (_arg1 == null){ _arg1 = ""; }; if (_componentInspectorSetting){ _local2 = videoPlayerStates[_activeVP]; _local2.url = _arg1; if (_arg1.length > 0){ _local2.isWaiting = true; addEventListener(Event.ENTER_FRAME, doContentPathConnect); }; } else { if (source == _arg1){ return; }; _local3 = cuePointMgrs[_activeVP]; _local3.reset(); _local2 = videoPlayerStates[_activeVP]; _local2.url = _arg1; _local2.isWaiting = true; doContentPathConnect(_activeVP); }; } public function set activeVideoPlayerIndex(_arg1:uint):void{ if (_activeVP == _arg1){ return; }; _activeVP = _arg1; if (videoPlayers[_activeVP] == undefined){ createVideoPlayer(_activeVP); }; } override public function set soundTransform(_arg1:SoundTransform):void{ var _local2:VideoPlayer; if (_arg1 == null){ return; }; _volume = _arg1.volume; _soundTransform.volume = (scrubbing) ? 0 : _arg1.volume; _soundTransform.leftToLeft = _arg1.leftToLeft; _soundTransform.leftToRight = _arg1.leftToRight; _soundTransform.rightToLeft = _arg1.rightToLeft; _soundTransform.rightToRight = _arg1.rightToRight; _local2 = videoPlayers[_activeVP]; _local2.soundTransform = _soundTransform; dispatchEvent(new SoundEvent(SoundEvent.SOUND_UPDATE, false, false, _local2.soundTransform)); } public function set seekToPrevOffset(_arg1:Number):void{ _seekToPrevOffset = _arg1; } public function set seekBarScrubTolerance(_arg1:Number):void{ uiMgr.seekBarScrubTolerance = _arg1; } override public function get scaleX():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_visibleVP]; return ((_local1.width / _origWidth)); } override public function get scaleY():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_visibleVP]; return ((_local1.height / _origHeight)); } public function get bytesLoaded():uint{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.bytesLoaded); } override public function set height(_arg1:Number):void{ var _local2:Rectangle; var _local3:Rectangle; var _local4:int; var _local5:VideoPlayer; if (isLivePreview){ setSize(this.width, _arg1); return; }; _local2 = new Rectangle(x, y, width, height); _local3 = new Rectangle(registrationX, registrationY, registrationWidth, registrationHeight); resizingNow = true; _local4 = 0; while (_local4 < videoPlayers.length) { _local5 = videoPlayers[_local4]; if (_local5 != null){ _local5.height = _arg1; }; _local4++; }; resizingNow = false; dispatchEvent(new LayoutEvent(LayoutEvent.LAYOUT, false, false, _local2, _local3)); } public function get forwardButton():Sprite{ return (uiMgr.getControl(UIManager.FORWARD_BUTTON)); } public function get seekBarInterval():Number{ return (uiMgr.seekBarInterval); } public function set totalTime(_arg1:Number):void{ var _local2:VideoPlayerState; _local2 = videoPlayerStates[_activeVP]; _local2.totalTime = _arg1; _local2.totalTimeSet = true; } public function set skinAutoHide(_arg1:Boolean):void{ if (isLivePreview){ return; }; uiMgr.skinAutoHide = _arg1; } public function set bufferTime(_arg1:Number):void{ var _local2:VideoPlayer; _local2 = videoPlayers[_activeVP]; _local2.bufferTime = _arg1; } public function get fullScreenSkinDelay():int{ return (uiMgr.fullScreenSkinDelay); } public function seekToNavCuePoint(_arg1):void{ var _local2:Object; var _local3:Object; if ((_arg1 is String)){ _local2 = {name:String(_arg1)}; } else { if ((_arg1 is Number)){ _local2 = {time:Number(_arg1)}; } else { _local2 = _arg1; }; }; if (_local2.name == undefined){ seekToNextNavCuePoint(_local2.time); return; }; if (isNaN(_local2.time)){ _local2.time = 0; }; _local3 = findNearestCuePoint(_arg1, CuePointType.NAVIGATION); while (((!((_local3 == null))) && ((((_local3.time < _local2.time)) || (!(isFLVCuePointEnabled(_local3))))))) { _local3 = findNextCuePointWithName(_local3); }; if (_local3 == null){ throw (new VideoError(VideoError.INVALID_SEEK)); }; seek(_local3.time); } private function onCompletePreview(_arg1:Event):void{ var e = _arg1; try { previewImage_mc.width = livePreviewWidth; previewImage_mc.height = livePreviewHeight; } catch(e:Error) { }; } public function set isLive(_arg1:Boolean):void{ var _local2:VideoPlayerState; _local2 = videoPlayerStates[_activeVP]; _local2.isLive = _arg1; _local2.isLiveSet = true; } flvplayback_internal function showSkinNow(_arg1:TimerEvent):void{ skinShowTimer = null; uiMgr.visible = true; } override public function get x():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_visibleVP]; return ((super.x + _local1.x)); } override public function get y():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_visibleVP]; return ((super.y + _local1.y)); } public function get seekBar():Sprite{ return (uiMgr.getControl(UIManager.SEEK_BAR)); } public function get volumeBarInterval():Number{ return (uiMgr.volumeBarInterval); } public function set registrationHeight(_arg1:Number):void{ height = _arg1; } public function get bufferingBarHidesAndDisablesOthers():Boolean{ return (uiMgr.bufferingBarHidesAndDisablesOthers); } public function seek(_arg1:Number):void{ var _local2:VideoPlayerState; var _local3:VideoPlayer; _local2 = videoPlayerStates[_activeVP]; if (!_firstStreamShown){ _local2.preSeekTime = 0; queueCmd(_local2, QueuedCommand.SEEK, _arg1); } else { _local2.preSeekTime = playheadTime; _local3 = videoPlayers[_activeVP]; _local3.seek(_arg1); }; } public function get state():String{ var _local1:VideoPlayer; var _local2:String; var _local3:VideoPlayerState; if (isLivePreview){ return (VideoState.STOPPED); }; _local1 = videoPlayers[_activeVP]; if ((((_activeVP == _visibleVP)) && (scrubbing))){ return (VideoState.SEEKING); }; _local2 = _local1.state; if (_local2 == VideoState.RESIZING){ return (VideoState.LOADING); }; _local3 = videoPlayerStates[_activeVP]; if ((((((_local3.prevState == VideoState.LOADING)) && (_local3.autoPlay))) && ((_local2 == VideoState.STOPPED)))){ return (VideoState.LOADING); }; return (_local2); } public function set autoRewind(_arg1:Boolean):void{ var _local2:VideoPlayer; if (_activeVP == 0){ _autoRewind = _arg1; }; _local2 = videoPlayers[_activeVP]; _local2.autoRewind = _arg1; } public function get volumeBar():Sprite{ return (uiMgr.getControl(UIManager.VOLUME_BAR)); } flvplayback_internal function skinError(_arg1:String):void{ if (isLivePreview){ return; }; if (((_firstStreamReady) && (!(_firstStreamShown)))){ showFirstStream(); }; dispatchEvent(new SkinErrorEvent(SkinErrorEvent.SKIN_ERROR, false, false, _arg1)); } override public function set scaleX(_arg1:Number):void{ var _local2:Rectangle; var _local3:Rectangle; var _local4:int; var _local5:VideoPlayer; _local2 = new Rectangle(x, y, width, height); _local3 = new Rectangle(registrationX, registrationY, registrationWidth, registrationHeight); resizingNow = true; _local4 = 0; while (_local4 < videoPlayers.length) { _local5 = videoPlayers[_local4]; if (_local5 !== null){ _local5.width = (_origWidth * _arg1); }; _local4++; }; resizingNow = false; dispatchEvent(new LayoutEvent(LayoutEvent.LAYOUT, false, false, _local2, _local3)); } override public function set scaleY(_arg1:Number):void{ var _local2:Rectangle; var _local3:Rectangle; var _local4:int; var _local5:VideoPlayer; _local2 = new Rectangle(x, y, width, height); _local3 = new Rectangle(registrationX, registrationY, registrationWidth, registrationHeight); resizingNow = true; _local4 = 0; while (_local4 < videoPlayers.length) { _local5 = videoPlayers[_local4]; if (_local5 !== null){ _local5.height = (_origHeight * _arg1); }; _local4++; }; resizingNow = false; dispatchEvent(new LayoutEvent(LayoutEvent.LAYOUT, false, false, _local2, _local3)); } flvplayback_internal function createVideoPlayer(_arg1:Number):void{ var vp:VideoPlayer; var added:Boolean; var vpState:VideoPlayerState; var cpMgr:CuePointManager; var skinDepth:int; var index = _arg1; if (isLivePreview){ return; }; vp = videoPlayers[index]; if (vp == null){ var _local3 = new VideoPlayer(0, 0); vp = _local3; videoPlayers[index] = _local3; vp.setSize(registrationWidth, registrationHeight); }; vp.visible = false; vp.volume = 0; vp.name = String(index); added = false; if (uiMgr.skin_mc != null){ try { skinDepth = getChildIndex(uiMgr.skin_mc); if (skinDepth > 0){ addChildAt(vp, skinDepth); added = true; }; } catch(err:Error) { }; }; if (!added){ addChild(vp); }; _topVP = index; vp.autoRewind = _autoRewind; vp.scaleMode = _scaleMode; vp.bufferTime = _bufferTime; vp.idleTimeout = _idleTimeout; vp.playheadUpdateInterval = _playheadUpdateInterval; vp.progressInterval = _progressInterval; vp.soundTransform = _soundTransform; vpState = new VideoPlayerState(vp, index); videoPlayerStates[index] = vpState; videoPlayerStateDict[vp] = vpState; vp.addEventListener(AutoLayoutEvent.AUTO_LAYOUT, handleAutoLayoutEvent); vp.addEventListener(MetadataEvent.CUE_POINT, handleMetadataEvent); vp.addEventListener(MetadataEvent.METADATA_RECEIVED, handleMetadataEvent); vp.addEventListener(VideoProgressEvent.PROGRESS, handleVideoProgressEvent); vp.addEventListener(VideoEvent.AUTO_REWOUND, handleVideoEvent); vp.addEventListener(VideoEvent.CLOSE, handleVideoEvent); vp.addEventListener(VideoEvent.COMPLETE, handleVideoEvent); vp.addEventListener(VideoEvent.PLAYHEAD_UPDATE, handleVideoEvent); vp.addEventListener(VideoEvent.STATE_CHANGE, handleVideoEvent); vp.addEventListener(VideoEvent.READY, handleVideoEvent); cpMgr = new CuePointManager(this, index); cuePointMgrs[index] = cpMgr; cpMgr.playheadUpdateInterval = _playheadUpdateInterval; } public function findNearestCuePoint(_arg1, _arg2:String="all"):Object{ var _local3:CuePointManager; _local3 = cuePointMgrs[_activeVP]; switch (_arg2){ case "event": return (_local3.getCuePoint(_local3.eventCuePoints, true, _arg1)); case "navigation": return (_local3.getCuePoint(_local3.navCuePoints, true, _arg1)); case "flv": return (_local3.getCuePoint(_local3.flvCuePoints, true, _arg1)); case "actionscript": return (_local3.getCuePoint(_local3.asCuePoints, true, _arg1)); case "all": default: return (_local3.getCuePoint(_local3.allCuePoints, true, _arg1)); }; } public function get muteButton():Sprite{ return (uiMgr.getControl(UIManager.MUTE_BUTTON)); } public function seekPercent(_arg1:Number):void{ var _local2:VideoPlayer; _local2 = videoPlayers[_activeVP]; if (((((((((isNaN(_arg1)) || ((_arg1 < 0)))) || ((_arg1 > 100)))) || (isNaN(_local2.totalTime)))) || ((_local2.totalTime <= 0)))){ throw (new VideoError(VideoError.INVALID_SEEK)); }; seek(((_local2.totalTime * _arg1) / 100)); } public function set forwardButton(_arg1:Sprite):void{ uiMgr.setControl(UIManager.FORWARD_BUTTON, _arg1); } public function get registrationWidth():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_visibleVP]; return (_local1.registrationWidth); } flvplayback_internal function queueCmd(_arg1:VideoPlayerState, _arg2:Number, _arg3:Number=NaN):void{ if (_arg1.cmdQueue == null){ _arg1.cmdQueue = new Array(); }; _arg1.cmdQueue.push(new QueuedCommand(_arg2, null, false, _arg3)); } private function doContentPathConnect(_arg1):void{ var _local2:int; var _local3:VideoPlayer; var _local4:VideoPlayerState; if (isLivePreview){ return; }; _local2 = 0; if ((_arg1 is int)){ _local2 = int(_arg1); } else { removeEventListener(Event.ENTER_FRAME, doContentPathConnect); }; _local3 = videoPlayers[_local2]; _local4 = videoPlayerStates[_local2]; if (!_local4.isWaiting){ return; }; if (((_local4.autoPlay) && (_firstStreamShown))){ _local3.play(_local4.url, _local4.totalTime, _local4.isLive); } else { _local3.load(_local4.url, _local4.totalTime, _local4.isLive); }; _local4.isLiveSet = false; _local4.totalTimeSet = false; _local4.isWaiting = false; } public function get registrationX():Number{ return (super.x); } public function bringVideoPlayerToFront(_arg1:uint):void{ var vp:VideoPlayer; var moved:Boolean; var skinDepth:int; var index = _arg1; if (index == _topVP){ return; }; vp = videoPlayers[index]; if (vp == null){ createVideoPlayer(index); vp = videoPlayers[index]; }; moved = false; if (uiMgr.skin_mc != null){ try { skinDepth = getChildIndex(uiMgr.skin_mc); if (skinDepth > 0){ setChildIndex(vp, (skinDepth - 1)); moved = true; }; } catch(err:Error) { }; }; if (!moved){ setChildIndex(vp, (numChildren - 1)); }; _topVP = index; } public function get registrationY():Number{ return (super.y); } public function get pauseButton():Sprite{ return (uiMgr.getControl(UIManager.PAUSE_BUTTON)); } public function set seekBarInterval(_arg1:Number):void{ uiMgr.seekBarInterval = _arg1; } public function addASCuePoint(_arg1, _arg2:String=null, _arg3:Object=null):Object{ var _local4:CuePointManager; _local4 = cuePointMgrs[_activeVP]; return (_local4.addASCuePoint(_arg1, _arg2, _arg3)); } public function get playheadPercentage():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; if (isNaN(_local1.totalTime)){ return (NaN); }; return (((_local1.playheadTime / _local1.totalTime) * 100)); } public function setFLVCuePointEnabled(_arg1:Boolean, _arg2):Number{ var _local3:CuePointManager; _local3 = cuePointMgrs[_activeVP]; return (_local3.setFLVCuePointEnabled(_arg1, _arg2)); } public function set fullScreenSkinDelay(_arg1:int):void{ uiMgr.fullScreenSkinDelay = _arg1; } public function seekToNextNavCuePoint(_arg1:Number=NaN):void{ var _local2:VideoPlayer; var _local3:Object; var _local4:Number; _local2 = videoPlayers[_activeVP]; if (((isNaN(_arg1)) || ((_arg1 < 0)))){ _arg1 = (_local2.playheadTime + 0.001); }; _local3 = findNearestCuePoint(_arg1, CuePointType.NAVIGATION); if (_local3 == null){ seek(_local2.totalTime); return; }; _local4 = _local3.index; if (_local3.time < _arg1){ _local4++; }; while ((((_local4 < _local3.array.length)) && (!(isFLVCuePointEnabled(_local3.array[_local4]))))) { _local4++; }; if (_local4 >= _local3.array.length){ _arg1 = _local2.totalTime; if (_local3.array[(_local3.array.length - 1)].time > _arg1){ _arg1 = _local3.array[(_local3.array.length - 1)]; }; seek(_arg1); } else { seek(_local3.array[_local4].time); }; } public function load(_arg1:String, _arg2:Number=NaN, _arg3:Boolean=false):void{ if ((((_arg1 == null)) || ((_arg1.length == 0)))){ return; }; if (_arg1 == this.source){ return; }; this.autoPlay = false; this.totalTime = _arg2; this.isLive = _arg3; this.source = _arg1; } public function seekSeconds(_arg1:Number):void{ seek(_arg1); } public function get fullScreenButton():Sprite{ return (uiMgr.getControl(UIManager.FULL_SCREEN_BUTTON)); } public function get scrubbing():Boolean{ var _local1:Sprite; var _local2:ControlData; _local1 = seekBar; if (_local1 != null){ _local2 = uiMgr.ctrlDataDict[_local1]; return (_local2.isDragging); }; return (false); } override public function set y(_arg1:Number):void{ var _local2:VideoPlayer; _local2 = videoPlayers[_visibleVP]; super.y = (_arg1 - _local2.y); } public function removeASCuePoint(_arg1):Object{ var _local2:CuePointManager; _local2 = cuePointMgrs[_activeVP]; return (_local2.removeASCuePoint(_arg1)); } public function get fullScreenTakeOver():Boolean{ return (uiMgr.fullScreenTakeOver); } override public function set x(_arg1:Number):void{ var _local2:VideoPlayer; _local2 = videoPlayers[_visibleVP]; super.x = (_arg1 - _local2.x); } public function get backButton():Sprite{ return (uiMgr.getControl(UIManager.BACK_BUTTON)); } public function set seekBar(_arg1:Sprite):void{ uiMgr.setControl(UIManager.SEEK_BAR, _arg1); } public function set skin(_arg1:String):void{ uiMgr.skin = _arg1; } public function set componentInspectorSetting(_arg1:Boolean):void{ _componentInspectorSetting = _arg1; } public function get preferredHeight():int{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.videoHeight); } public function set volumeBarInterval(_arg1:Number):void{ uiMgr.volumeBarInterval = _arg1; } public function set autoPlay(_arg1:Boolean):void{ var _local2:VideoPlayerState; _local2 = videoPlayerStates[_activeVP]; _local2.autoPlay = _arg1; } public function set visibleVideoPlayerIndex(_arg1:uint):void{ var _local2:VideoPlayer; var _local3:VideoPlayer; var _local4:uint; var _local5:Rectangle; var _local6:Rectangle; if (_visibleVP == _arg1){ return; }; if (videoPlayers[_arg1] == undefined){ createVideoPlayer(_arg1); }; _local2 = videoPlayers[_arg1]; _local3 = videoPlayers[_visibleVP]; _local3.visible = false; _local3.volume = 0; _visibleVP = _arg1; if (_firstStreamShown){ uiMgr.setupSkinAutoHide(false); _local2.visible = true; _soundTransform.volume = (scrubbing) ? _volume : 0; _local2.soundTransform = _soundTransform; } else { if (((((((_local2.stateResponsive) || ((_local2.state == VideoState.CONNECTION_ERROR)))) || ((_local2.state == VideoState.DISCONNECTED)))) && (uiMgr.skinReady))){ uiMgr.visible = true; uiMgr.setupSkinAutoHide(false); _firstStreamReady = true; if (uiMgr.skin == ""){ uiMgr.hookUpCustomComponents(); }; showFirstStream(); }; }; if (((!((_local2.height == _local3.height))) || (!((_local2.width == _local3.width))))){ _local5 = new Rectangle((_local3.x + super.x), (_local3.y + super.y), _local3.width, _local3.height); _local6 = new Rectangle((_local3.registrationX + super.x), (_local3.registrationY + super.y), _local3.registrationWidth, _local3.registrationHeight); dispatchEvent(new LayoutEvent(LayoutEvent.LAYOUT, false, false, _local5, _local6)); }; _local4 = _activeVP; _activeVP = _visibleVP; uiMgr.handleIVPEvent(new VideoEvent(VideoEvent.STATE_CHANGE, false, false, state, playheadTime, _visibleVP)); uiMgr.handleIVPEvent(new VideoEvent(VideoEvent.PLAYHEAD_UPDATE, false, false, state, playheadTime, _visibleVP)); if (_local2.isRTMP){ uiMgr.handleIVPEvent(new VideoEvent(VideoEvent.READY, false, false, state, playheadTime, _visibleVP)); } else { uiMgr.handleIVPEvent(new VideoProgressEvent(VideoProgressEvent.PROGRESS, false, false, bytesLoaded, bytesTotal, _visibleVP)); }; _activeVP = _local4; } public function get bufferingBar():Sprite{ return (uiMgr.getControl(UIManager.BUFFERING_BAR)); } flvplayback_internal function _scrubStart():void{ var _local1:Number; var _local2:VideoPlayer; _local1 = playheadTime; _local2 = videoPlayers[_visibleVP]; _volume = _local2.volume; _local2.volume = 0; dispatchEvent(new VideoEvent(VideoEvent.STATE_CHANGE, false, false, VideoState.SEEKING, _local1, _visibleVP)); dispatchEvent(new VideoEvent(VideoEvent.SCRUB_START, false, false, VideoState.SEEKING, _local1, _visibleVP)); } public function get align():String{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.align); } flvplayback_internal function handleAutoLayoutEvent(_arg1:AutoLayoutEvent):void{ var _local2:VideoPlayerState; var _local3:AutoLayoutEvent; var _local4:Rectangle; var _local5:Rectangle; _local2 = videoPlayerStateDict[_arg1.currentTarget]; _local3 = AutoLayoutEvent(_arg1.clone()); _local3.oldBounds.x = (_local3.oldBounds.x + super.x); _local3.oldBounds.y = (_local3.oldBounds.y + super.y); _local3.oldRegistrationBounds.x = (_local3.oldRegistrationBounds.x + super.y); _local3.oldRegistrationBounds.y = (_local3.oldRegistrationBounds.y + super.y); _local3.vp = _local2.index; dispatchEvent(_local3); if (((!(resizingNow)) && ((_local2.index == _visibleVP)))){ _local4 = Rectangle(_arg1.oldBounds.clone()); _local5 = Rectangle(_arg1.oldRegistrationBounds.clone()); _local4.x = (_local4.x + super.x); _local4.y = (_local4.y + super.y); _local5.x = (_local5.x + super.y); _local5.y = (_local5.y + super.y); dispatchEvent(new LayoutEvent(LayoutEvent.LAYOUT, false, false, _local4, _local5)); }; } public function findNextCuePointWithName(_arg1:Object):Object{ var _local2:CuePointManager; _local2 = cuePointMgrs[_activeVP]; return (_local2.getNextCuePointWithName(_arg1)); } public function set playButton(_arg1:Sprite):void{ uiMgr.setControl(UIManager.PLAY_BUTTON, _arg1); } public function set bitrate(_arg1:Number):void{ ncMgr.bitrate = _arg1; } public function set bufferingBarHidesAndDisablesOthers(_arg1:Boolean):void{ uiMgr.bufferingBarHidesAndDisablesOthers = _arg1; } override public function get soundTransform():SoundTransform{ var _local1:VideoPlayer; var _local2:SoundTransform; _local1 = videoPlayers[_visibleVP]; _local2 = _local1.soundTransform; if (scrubbing){ _local2.volume = _volume; }; return (_local2); } public function get stateResponsive():Boolean{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.stateResponsive); } public function get idleTimeout():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.idleTimeout); } override public function get height():Number{ var _local1:VideoPlayer; if (isLivePreview){ return (livePreviewHeight); }; _local1 = videoPlayers[_visibleVP]; return (_local1.height); } public function set registrationWidth(_arg1:Number):void{ width = _arg1; } public function get metadata():Object{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.metadata); } public function set skinBackgroundColor(_arg1:uint):void{ uiMgr.skinBackgroundColor = _arg1; } public function get volume():Number{ return (_volume); } public function play(_arg1:String=null, _arg2:Number=NaN, _arg3:Boolean=false):void{ var _local4:VideoPlayerState; var _local5:VideoPlayer; if (_arg1 == null){ if (!_firstStreamShown){ _local4 = videoPlayerStates[_activeVP]; queueCmd(_local4, QueuedCommand.PLAY); } else { _local5 = videoPlayers[_activeVP]; _local5.play(); }; } else { if (_arg1 == this.source){ return; }; this.autoPlay = true; this.totalTime = _arg2; this.isLive = _arg3; this.source = _arg1; }; } public function get paused():Boolean{ return ((state == VideoState.PAUSED)); } flvplayback_internal function handleVideoEvent(_arg1:VideoEvent):void{ var _local2:VideoPlayerState; var _local3:CuePointManager; var _local4:VideoEvent; var _local5:String; var _local6:Number; _local2 = videoPlayerStateDict[_arg1.currentTarget]; _local3 = cuePointMgrs[_local2.index]; _local4 = VideoEvent(_arg1.clone()); _local4.vp = _local2.index; _local5 = ((((_local2.index == _visibleVP)) && (scrubbing))) ? VideoState.SEEKING : _arg1.state; switch (_arg1.type){ case VideoEvent.AUTO_REWOUND: dispatchEvent(_local4); dispatchEvent(new VideoEvent(VideoEvent.REWIND, false, false, _local5, _arg1.playheadTime, _local2.index)); _local3.resetASCuePointIndex(_arg1.playheadTime); break; case VideoEvent.PLAYHEAD_UPDATE: _local4.state = _local5; dispatchEvent(_local4); if (((!(isNaN(_local2.preSeekTime))) && (!((_arg1.state == VideoState.SEEKING))))){ _local6 = _local2.preSeekTime; _local2.preSeekTime = NaN; _local3.resetASCuePointIndex(_arg1.playheadTime); dispatchEvent(new VideoEvent(VideoEvent.SEEKED, false, false, _arg1.state, _arg1.playheadTime, _local2.index)); if (_local6 < _arg1.playheadTime){ dispatchEvent(new VideoEvent(VideoEvent.FAST_FORWARD, false, false, _arg1.state, _arg1.playheadTime, _local2.index)); } else { if (_local6 > _arg1.playheadTime){ dispatchEvent(new VideoEvent(VideoEvent.REWIND, false, false, _arg1.state, _arg1.playheadTime, _local2.index)); }; }; }; _local3.dispatchASCuePoints(); break; case VideoEvent.STATE_CHANGE: if ((((_local2.index == _visibleVP)) && (scrubbing))){ break; }; if (_arg1.state == VideoState.RESIZING){ break; }; if ((((((_local2.prevState == VideoState.LOADING)) && (_local2.autoPlay))) && ((_arg1.state == VideoState.STOPPED)))){ return; }; if ((((((((_arg1.state == VideoState.CONNECTION_ERROR)) && ((_arg1.vp == _visibleVP)))) && (!(_firstStreamShown)))) && (uiMgr.skinReady))){ showFirstStream(); uiMgr.visible = true; if (uiMgr.skin == ""){ uiMgr.hookUpCustomComponents(); }; if (skinShowTimer != null){ skinShowTimer.reset(); skinShowTimer = null; }; }; _local2.prevState = _arg1.state; _local4.state = _local5; dispatchEvent(_local4); if (_local2.owner.state != _arg1.state){ return; }; switch (_arg1.state){ case VideoState.BUFFERING: dispatchEvent(new VideoEvent(VideoEvent.BUFFERING_STATE_ENTERED, false, false, _local5, _arg1.playheadTime, _local2.index)); break; case VideoState.PAUSED: dispatchEvent(new VideoEvent(VideoEvent.PAUSED_STATE_ENTERED, false, false, _local5, _arg1.playheadTime, _local2.index)); break; case VideoState.PLAYING: dispatchEvent(new VideoEvent(VideoEvent.PLAYING_STATE_ENTERED, false, false, _local5, _arg1.playheadTime, _local2.index)); break; case VideoState.STOPPED: dispatchEvent(new VideoEvent(VideoEvent.STOPPED_STATE_ENTERED, false, false, _local5, _arg1.playheadTime, _local2.index)); break; }; break; case VideoEvent.READY: if (!_firstStreamReady){ if (_local2.index == _visibleVP){ _firstStreamReady = true; if (((uiMgr.skinReady) && (!(_firstStreamShown)))){ uiMgr.visible = true; if (uiMgr.skin == ""){ uiMgr.hookUpCustomComponents(); }; showFirstStream(); }; }; } else { if (((((_firstStreamShown) && ((_arg1.state == VideoState.STOPPED)))) && (_local2.autoPlay))){ if (_local2.owner.isRTMP){ _local2.owner.play(); } else { _local2.prevState = VideoState.STOPPED; _local2.owner.playWhenEnoughDownloaded(); }; }; }; _local4.state = _local5; dispatchEvent(_local4); break; case VideoEvent.CLOSE: case VideoEvent.COMPLETE: _local4.state = _local5; dispatchEvent(_local4); break; }; } public function set volumeBar(_arg1:Sprite):void{ uiMgr.setControl(UIManager.VOLUME_BAR, _arg1); } public function set fullScreenBackgroundColor(_arg1:uint):void{ uiMgr.fullScreenBackgroundColor = _arg1; } public function get isLive():Boolean{ var _local1:VideoPlayerState; var _local2:VideoPlayer; _local1 = videoPlayerStates[_activeVP]; if (_local1.isLiveSet){ return (_local1.isLive); }; _local2 = videoPlayers[_activeVP]; return (_local2.isLive); } public function get bufferTime():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.bufferTime); } public function get registrationHeight():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_visibleVP]; return (_local1.registrationHeight); } public function get playPauseButton():Sprite{ return (uiMgr.getControl(UIManager.PLAY_PAUSE_BUTTON)); } flvplayback_internal function showFirstStream():void{ var _local1:VideoPlayer; var _local2:int; var _local3:VideoPlayerState; var _local4:int; _firstStreamShown = true; _local1 = videoPlayers[_visibleVP]; _local1.visible = true; if (!scrubbing){ _soundTransform.volume = _volume; _local1.soundTransform = _soundTransform; }; _local2 = 0; while (_local2 < videoPlayers.length) { _local1 = videoPlayers[_local2]; if (_local1 != null){ _local3 = videoPlayerStates[_local2]; if ((((_local1.state == VideoState.STOPPED)) && (_local3.autoPlay))){ if (_local1.isRTMP){ _local1.play(); } else { _local3.prevState = VideoState.STOPPED; _local1.playWhenEnoughDownloaded(); }; }; if (_local3.cmdQueue != null){ _local4 = 0; while (_local4 < _local3.cmdQueue.length) { switch (_local3.cmdQueue[_local4].type){ case QueuedCommand.PLAY: _local1.play(); break; case QueuedCommand.PAUSE: _local1.pause(); break; case QueuedCommand.STOP: _local1.stop(); break; case QueuedCommand.SEEK: _local1.seek(_local3.cmdQueue[_local4].time); break; case QueuedCommand.PLAY_WHEN_ENOUGH: _local1.playWhenEnoughDownloaded(); break; }; _local4++; }; _local3.cmdQueue = null; }; }; _local2++; }; } public function set volumeBarScrubTolerance(_arg1:Number):void{ uiMgr.volumeBarScrubTolerance = _arg1; } public function set skinBackgroundAlpha(_arg1:Number):void{ uiMgr.skinBackgroundAlpha = _arg1; } public function get playheadUpdateInterval():Number{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.playheadUpdateInterval); } public function set muteButton(_arg1:Sprite):void{ uiMgr.setControl(UIManager.MUTE_BUTTON, _arg1); } public function set skinScaleMaximum(_arg1:Number){ uiMgr.skinScaleMaximum = _arg1; } public function enterFullScreenDisplayState():void{ uiMgr.enterFullScreenDisplayState(); } flvplayback_internal function handleMetadataEvent(_arg1:MetadataEvent):void{ var _local2:VideoPlayerState; var _local3:CuePointManager; var _local4:MetadataEvent; _local2 = videoPlayerStateDict[_arg1.currentTarget]; _local3 = cuePointMgrs[_local2.index]; switch (_arg1.type){ case MetadataEvent.METADATA_RECEIVED: _local3.processFLVCuePoints(_arg1.info.cuePoints); break; case MetadataEvent.CUE_POINT: if (!_local3.isFLVCuePointEnabled(_arg1.info)){ return; }; break; }; _local4 = MetadataEvent(_arg1.clone()); _local4.vp = _local2.index; dispatchEvent(_local4); } public function playWhenEnoughDownloaded():void{ var _local1:VideoPlayerState; var _local2:VideoPlayer; if (!_firstStreamShown){ _local1 = videoPlayerStates[_activeVP]; queueCmd(_local1, QueuedCommand.PLAY_WHEN_ENOUGH); } else { _local2 = videoPlayers[_activeVP]; _local2.playWhenEnoughDownloaded(); }; } public function get bitrate():Number{ return (ncMgr.bitrate); } public function get autoRewind():Boolean{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.autoRewind); } public function get fullScreenBackgroundColor():uint{ return (uiMgr.fullScreenBackgroundColor); } public function get skin():String{ return (uiMgr.skin); } public function set registrationX(_arg1:Number):void{ super.x = _arg1; } public function set registrationY(_arg1:Number):void{ super.y = _arg1; } public function setSize(_arg1:Number, _arg2:Number):void{ var _local3:Rectangle; var _local4:Rectangle; var _local5:int; var _local6:VideoPlayer; _local3 = new Rectangle(x, y, this.width, this.height); _local4 = new Rectangle(registrationX, registrationY, registrationWidth, registrationHeight); if (isLivePreview){ livePreviewWidth = _arg1; livePreviewHeight = _arg2; if (previewImage_mc != null){ previewImage_mc.width = _arg1; previewImage_mc.height = _arg2; }; preview_mc.box_mc.width = _arg1; preview_mc.box_mc.height = _arg2; 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); }; dispatchEvent(new LayoutEvent(LayoutEvent.LAYOUT, false, false, _local3, _local4)); return; }; resizingNow = true; _local5 = 0; while (_local5 < videoPlayers.length) { _local6 = videoPlayers[_local5]; if (_local6 != null){ _local6.setSize(_arg1, _arg2); }; _local5++; }; resizingNow = false; dispatchEvent(new LayoutEvent(LayoutEvent.LAYOUT, false, false, _local3, _local4)); } public function get isRTMP():Boolean{ var _local1:VideoPlayer; if (isLivePreview){ return (true); }; _local1 = videoPlayers[_activeVP]; return (_local1.isRTMP); } public function set preview(_arg1:String):void{ var filename = _arg1; if (!isLivePreview){ return; }; previewImageUrl = filename; if (previewImage_mc != null){ removeChild(previewImage_mc); }; previewImage_mc = new Loader(); previewImage_mc.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompletePreview); previewImage_mc.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{ }); previewImage_mc.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, function (_arg1:SecurityErrorEvent):void{ }); addChildAt(previewImage_mc, 1); previewImage_mc.load(new URLRequest(previewImageUrl)); } override public function set width(_arg1:Number):void{ var _local2:Rectangle; var _local3:Rectangle; var _local4:int; var _local5:VideoPlayer; if (isLivePreview){ setSize(_arg1, this.height); return; }; _local2 = new Rectangle(x, y, width, height); _local3 = new Rectangle(registrationX, registrationY, registrationWidth, registrationHeight); resizingNow = true; _local4 = 0; while (_local4 < videoPlayers.length) { _local5 = videoPlayers[_local4]; if (_local5 != null){ _local5.width = _arg1; }; _local4++; }; resizingNow = false; dispatchEvent(new LayoutEvent(LayoutEvent.LAYOUT, false, false, _local2, _local3)); } public function get playButton():Sprite{ return (uiMgr.getControl(UIManager.PLAY_BUTTON)); } public function set pauseButton(_arg1:Sprite):void{ uiMgr.setControl(UIManager.PAUSE_BUTTON, _arg1); } public function get bytesTotal():uint{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.bytesTotal); } public function seekToPrevNavCuePoint(_arg1:Number=NaN):void{ var _local2:Object; var _local3:Number; var _local4:VideoPlayer; if (((isNaN(_arg1)) || ((_arg1 < 0)))){ _local4 = videoPlayers[_activeVP]; _arg1 = _local4.playheadTime; }; _local2 = findNearestCuePoint(_arg1, CuePointType.NAVIGATION); if (_local2 == null){ seek(0); return; }; _local3 = _local2.index; while ((((_local3 >= 0)) && (((!(isFLVCuePointEnabled(_local2.array[_local3]))) || ((_local2.array[_local3].time >= (_arg1 - _seekToPrevOffset))))))) { _local3--; }; if (_local3 < 0){ seek(0); } else { seek(_local2.array[_local3].time); }; } public function get autoPlay():Boolean{ var _local1:VideoPlayerState; _local1 = videoPlayerStates[_activeVP]; return (_local1.autoPlay); } public function set playheadPercentage(_arg1:Number):void{ seekPercent(_arg1); } public function isFLVCuePointEnabled(_arg1):Boolean{ var _local2:CuePointManager; _local2 = cuePointMgrs[_activeVP]; return (_local2.isFLVCuePointEnabled(_arg1)); } public function get buffering():Boolean{ return ((state == VideoState.BUFFERING)); } public function get volumeBarScrubTolerance():Number{ return (uiMgr.volumeBarScrubTolerance); } public function get skinBackgroundColor():uint{ return (uiMgr.skinBackgroundColor); } public function get visibleVideoPlayerIndex():uint{ return (_visibleVP); } public function set stopButton(_arg1:Sprite):void{ uiMgr.setControl(UIManager.STOP_BUTTON, _arg1); } public function get skinBackgroundAlpha():Number{ return (uiMgr.skinBackgroundAlpha); } public function get skinScaleMaximum():Number{ return (uiMgr.skinScaleMaximum); } public function get preferredWidth():int{ var _local1:VideoPlayer; _local1 = videoPlayers[_activeVP]; return (_local1.videoWidth); } override public function get width():Number{ var _local1:VideoPlayer; if (isLivePreview){ return (livePreviewWidth); }; _local1 = videoPlayers[_visibleVP]; return (_local1.width); } public function get stopped():Boolean{ return ((state == VideoState.STOPPED)); } public function set fullScreenButton(_arg1:Sprite):void{ uiMgr.setControl(UIManager.FULL_SCREEN_BUTTON, _arg1); } public function get stopButton():Sprite{ return (uiMgr.getControl(UIManager.STOP_BUTTON)); } public function set playheadUpdateInterval(_arg1:Number):void{ var _local2:CuePointManager; var _local3:VideoPlayer; if (_activeVP == 0){ _playheadUpdateInterval = _arg1; }; _local2 = cuePointMgrs[_activeVP]; _local2.playheadUpdateInterval = _arg1; _local3 = videoPlayers[_activeVP]; _local3.playheadUpdateInterval = _arg1; } private function createLivePreviewMovieClip():void{ preview_mc = new MovieClip(); preview_mc.name = "preview_mc"; preview_mc.box_mc = new MovieClip(); preview_mc.box_mc.name = "box_mc"; preview_mc.box_mc.graphics.beginFill(0); preview_mc.box_mc.graphics.moveTo(0, 0); preview_mc.box_mc.graphics.lineTo(0, 100); preview_mc.box_mc.graphics.lineTo(100, 100); preview_mc.box_mc.graphics.lineTo(100, 0); preview_mc.box_mc.graphics.lineTo(0, 0); preview_mc.box_mc.graphics.endFill(); preview_mc.addChild(preview_mc.box_mc); preview_mc.icon_mc = new Icon(); preview_mc.icon_mc.name = "icon_mc"; preview_mc.addChild(preview_mc.icon_mc); addChild(preview_mc); } public function set idleTimeout(_arg1:Number):void{ var _local2:VideoPlayer; if (_activeVP == 0){ _idleTimeout = _arg1; }; _local2 = videoPlayers[_activeVP]; _local2.idleTimeout = _arg1; } flvplayback_internal function skinLoaded():void{ var _local1:VideoPlayer; if (isLivePreview){ return; }; _local1 = videoPlayers[_visibleVP]; if (((((_firstStreamReady) || ((_local1.state == VideoState.CONNECTION_ERROR)))) || ((_local1.state == VideoState.DISCONNECTED)))){ uiMgr.visible = true; if (!_firstStreamShown){ showFirstStream(); }; } else { if (skinShowTimer != null){ skinShowTimer.reset(); skinShowTimer = null; }; skinShowTimer = new Timer(DEFAULT_SKIN_SHOW_TIMER_INTERVAL, 1); skinShowTimer.addEventListener(TimerEvent.TIMER, showSkinNow); skinShowTimer.start(); }; dispatchEvent(new VideoEvent(VideoEvent.SKIN_LOADED, false, false, state, playheadTime, _visibleVP)); } flvplayback_internal function _scrubFinish():void{ var _local1:Number; var _local2:String; var _local3:VideoPlayer; _local1 = playheadTime; _local2 = state; _local3 = videoPlayers[_visibleVP]; _soundTransform.volume = _volume; _local3.soundTransform = _soundTransform; if (_local2 != VideoState.SEEKING){ dispatchEvent(new VideoEvent(VideoEvent.STATE_CHANGE, false, false, _local2, _local1, _visibleVP)); }; dispatchEvent(new VideoEvent(VideoEvent.SCRUB_FINISH, false, false, _local2, _local1, _visibleVP)); } public function set playPauseButton(_arg1:Sprite):void{ uiMgr.setControl(UIManager.PLAY_PAUSE_BUTTON, _arg1); } public function set backButton(_arg1:Sprite):void{ uiMgr.setControl(UIManager.BACK_BUTTON, _arg1); } public function set cuePoints(_arg1:Array):void{ if (!_componentInspectorSetting){ return; }; cuePointMgrs[0].processCuePointsProperty(_arg1); } public function findCuePoint(_arg1, _arg2:String="all"):Object{ var _local3:CuePointManager; _local3 = cuePointMgrs[_activeVP]; switch (_arg2){ case "event": return (_local3.getCuePoint(_local3.eventCuePoints, false, _arg1)); case "navigation": return (_local3.getCuePoint(_local3.navCuePoints, false, _arg1)); case "flv": return (_local3.getCuePoint(_local3.flvCuePoints, false, _arg1)); case "actionscript": return (_local3.getCuePoint(_local3.asCuePoints, false, _arg1)); case "all": default: return (_local3.getCuePoint(_local3.allCuePoints, false, _arg1)); }; } public function get seekBarScrubTolerance():Number{ return (uiMgr.seekBarScrubTolerance); } flvplayback_internal function handleVideoProgressEvent(_arg1:VideoProgressEvent):void{ var _local2:VideoPlayerState; var _local3:VideoProgressEvent; _local2 = videoPlayerStateDict[_arg1.currentTarget]; _local3 = VideoProgressEvent(_arg1.clone()); _local3.vp = _local2.index; dispatchEvent(_local3); } } }//package fl.video
Section 21
//flvplayback_internal (fl.video.flvplayback_internal) package fl.video { public namespace flvplayback_internal = "http://www.adobe.com/2007/flash/flvplayback/internal"; }//package fl.video
Section 22
//FPADManager (fl.video.FPADManager) package fl.video { import flash.net.*; import flash.events.*; public class FPADManager { flvplayback_internal var _parseResults:ParseResults; flvplayback_internal var rtmpURL:String; flvplayback_internal var _url:String; flvplayback_internal var xmlLoader:URLLoader; flvplayback_internal var xml:XML; flvplayback_internal var _uriParam:String; private var _owner:INCManager; public static const VERSION:String = "2.1.0.14"; public static const SHORT_VERSION:String = "2.1"; public function FPADManager(_arg1:INCManager){ _owner = _arg1; } flvplayback_internal function connectXML(_arg1:String, _arg2:String, _arg3:String, _arg4:ParseResults):Boolean{ _uriParam = _arg2; _parseResults = _arg4; _url = ((_arg1 + "uri=") + _parseResults.protocol); if (_parseResults.serverName != null){ _url = (_url + ("/" + _parseResults.serverName)); }; if (_parseResults.portNumber != null){ _url = (_url + (":" + _parseResults.portNumber)); }; if (_parseResults.wrappedURL != null){ _url = (_url + ("/?" + _parseResults.wrappedURL)); }; _url = (_url + ("/" + _parseResults.appName)); _url = (_url + _arg3); xml = new XML(); xmlLoader = new URLLoader(); xmlLoader.addEventListener(Event.COMPLETE, xmlLoadEventHandler); xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, xmlLoadEventHandler); xmlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, xmlLoadEventHandler); xmlLoader.load(new URLRequest(_url)); return (false); } flvplayback_internal function xmlLoadEventHandler(_arg1:Event):void{ var proxy:String; var e = _arg1; try { if (e.type != Event.COMPLETE){ _owner.helperDone(this, false); } else { xml = new XML(xmlLoader.data); if ((((xml == null)) || ((xml.localName() == null)))){ throw (new VideoError(VideoError.INVALID_XML, (("URL: \"" + _url) + "\" No root node found; if url is for an flv it must have .flv extension and take no parameters"))); } else { if (xml.localName() != "fpad"){ throw (new VideoError(VideoError.INVALID_XML, (("URL: \"" + _url) + "\" Root node not fpad"))); }; }; proxy = null; if ((((((xml.proxy.length() > 0)) && (xml.proxy.hasSimpleContent()))) && ((xml.proxy.*[0].nodeKind() == "text")))){ proxy = xml.proxy.*[0].toString(); }; if (proxy == null){ throw (new VideoError(VideoError.INVALID_XML, (("URL: \"" + _url) + "\" fpad xml requires proxy tag."))); }; rtmpURL = ((((_parseResults.protocol + "/") + proxy) + "/?") + _uriParam); _owner.helperDone(this, true); }; } catch(err:Error) { _owner.helperDone(this, false); throw (err); }; } } }//package fl.video
Section 23
//Icon (fl.video.Icon) package fl.video { import flash.display.*; public dynamic class Icon extends MovieClip { } }//package fl.video
Section 24
//INCManager (fl.video.INCManager) package fl.video { import flash.net.*; public interface INCManager { function set timeout(_arg1:uint):void; function get streamLength():Number; function get timeout():uint; function connectToURL(_arg1:String):Boolean; function get streamName():String; function get bitrate():Number; function get streamHeight():int; function helperDone(_arg1:Object, _arg2:Boolean):void; function getProperty(_arg1:String); function get streamWidth():int; function connectAgain():Boolean; function reconnect():void; function set videoPlayer(_arg1:VideoPlayer):void; function setProperty(_arg1:String, _arg2):void; function set bitrate(_arg1:Number):void; function get netConnection():NetConnection; function get videoPlayer():VideoPlayer; function get isRTMP():Boolean; function close():void; } }//package fl.video
Section 25
//IVPEvent (fl.video.IVPEvent) package fl.video { public interface IVPEvent { function set vp(_arg1:uint):void; function get vp():uint; function get type():String; } }//package fl.video
Section 26
//LayoutEvent (fl.video.LayoutEvent) package fl.video { import flash.events.*; import flash.geom.*; public class LayoutEvent extends Event { private var _oldBounds:Rectangle; private var _oldRegistrationBounds:Rectangle; public static const LAYOUT:String = "layout"; public function LayoutEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Rectangle=null, _arg5:Rectangle=null){ super(_arg1, _arg2, _arg3); _oldBounds = _arg4; _oldRegistrationBounds = _arg5; } public function get oldRegistrationBounds():Rectangle{ return (_oldRegistrationBounds); } override public function clone():Event{ return (new LayoutEvent(type, bubbles, cancelable, Rectangle(oldBounds.clone()), Rectangle(oldRegistrationBounds.clone()))); } public function set oldRegistrationBounds(_arg1:Rectangle):void{ _oldRegistrationBounds = _arg1; } public function set oldBounds(_arg1:Rectangle):void{ _oldBounds = _arg1; } public function get oldBounds():Rectangle{ return (_oldBounds); } } }//package fl.video
Section 27
//MetadataEvent (fl.video.MetadataEvent) package fl.video { import flash.events.*; public class MetadataEvent extends Event implements IVPEvent { private var _info:Object; private var _vp:uint; public static const METADATA_RECEIVED:String = "metadataReceived"; public static const CUE_POINT:String = "cuePoint"; public function MetadataEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null, _arg5:uint=0){ super(_arg1, _arg2, _arg3); _info = _arg4; _vp = _arg5; } public function get vp():uint{ return (_vp); } public function set info(_arg1:Object):void{ _info = _arg1; } override public function clone():Event{ return (new MetadataEvent(type, bubbles, cancelable, info, vp)); } public function get info():Object{ return (_info); } public function set vp(_arg1:uint):void{ _vp = _arg1; } } }//package fl.video
Section 28
//NCManager (fl.video.NCManager) package fl.video { import flash.net.*; import flash.events.*; import flash.utils.*; public class NCManager implements INCManager { public const DEFAULT_TIMEOUT:uint = 60000; flvplayback_internal var _serverName:String; flvplayback_internal var _tryNCTimer:Timer; flvplayback_internal var _autoSenseBW:Boolean; flvplayback_internal var _fpadZone:Number; flvplayback_internal var _appName:String; flvplayback_internal var _ncConnected:Boolean; flvplayback_internal var _fpadMgr:FPADManager; flvplayback_internal var _bitrate:Number; flvplayback_internal var _timeoutTimer:Timer; flvplayback_internal var _wrappedURL:String; flvplayback_internal var _payload:Number; flvplayback_internal var _proxyType:String; flvplayback_internal var _nc:NetConnection; flvplayback_internal var _streamLength:Number; flvplayback_internal var _connTypeCounter:uint; flvplayback_internal var _streamWidth:int; flvplayback_internal var _ncUri:String; flvplayback_internal var _contentPath:String; flvplayback_internal var _smilMgr:SMILManager; flvplayback_internal var _streamHeight:int; flvplayback_internal var _isRTMP:Boolean; flvplayback_internal var _tryNC:Array; flvplayback_internal var _owner:VideoPlayer; flvplayback_internal var _streams:Array; flvplayback_internal var _portNumber:String; flvplayback_internal var _streamName:String; flvplayback_internal var _objectEncoding:uint; public var fallbackServerName:String; flvplayback_internal var _protocol:String; public static const VERSION:String = "2.1.0.14"; public static const SHORT_VERSION:String = "2.1"; public function NCManager(){ _fpadZone = NaN; _objectEncoding = ObjectEncoding.AMF0; _proxyType = "best"; _timeoutTimer = new Timer(DEFAULT_TIMEOUT); _timeoutTimer.addEventListener(TimerEvent.TIMER, this._onFMSConnectTimeOut); _tryNCTimer = new Timer(1500, 1); _tryNCTimer.addEventListener(TimerEvent.TIMER, this.nextConnect); initNCInfo(); initOtherInfo(); _nc = null; _ncConnected = false; } flvplayback_internal function initNCInfo():void{ _isRTMP = false; _serverName = null; _wrappedURL = null; _portNumber = null; _appName = null; } flvplayback_internal function cleanConns():void{ var _local1:uint; _tryNCTimer.reset(); if (_tryNC != null){ _local1 = 0; while (_local1 < _tryNC.length) { if (_tryNC[_local1] != null){ _tryNC[_local1].removeEventListener(NetStatusEvent.NET_STATUS, connectOnStatus); if (_tryNC[_local1].client.pending){ _tryNC[_local1].addEventListener(NetStatusEvent.NET_STATUS, disconnectOnStatus); } else { _tryNC[_local1].close(); }; }; _tryNC[_local1] = null; _local1++; }; _tryNC = null; }; } public function get streamWidth():int{ return (_streamWidth); } public function connectToURL(_arg1:String):Boolean{ var parseResults:ParseResults; var canReuse:Boolean; var name:String; var url = _arg1; initOtherInfo(); _contentPath = url; if ((((_contentPath == null)) || ((_contentPath == "")))){ throw (new VideoError(VideoError.INVALID_SOURCE)); }; parseResults = parseURL(_contentPath); if ((((parseResults.streamName == null)) || ((parseResults.streamName == "")))){ throw (new VideoError(VideoError.INVALID_SOURCE, url)); }; if (parseResults.isRTMP){ canReuse = canReuseOldConnection(parseResults); _isRTMP = true; _protocol = parseResults.protocol; _streamName = parseResults.streamName; _serverName = parseResults.serverName; _wrappedURL = parseResults.wrappedURL; _portNumber = parseResults.portNumber; _appName = parseResults.appName; if ((((((((_appName == null)) || ((_appName == "")))) || ((_streamName == null)))) || ((_streamName == "")))){ throw (new VideoError(VideoError.INVALID_SOURCE, url)); }; _autoSenseBW = (_streamName.indexOf(",") >= 0); return (((canReuse) || (connectRTMP()))); //unresolved jump }; name = parseResults.streamName; if ((((((((name.indexOf("?") < 0)) && ((((name.length < 4)) || (!((name.slice(-4).toLowerCase() == ".txt"))))))) && ((((name.length < 4)) || (!((name.slice(-4).toLowerCase() == ".xml"))))))) && ((((name.length < 5)) || (!((name.slice(-5).toLowerCase() == ".smil"))))))){ canReuse = canReuseOldConnection(parseResults); _isRTMP = false; _streamName = name; return (((canReuse) || (connectHTTP()))); }; if (name.indexOf("/fms/fpad") >= 0){ try { return (connectFPAD(name)); } catch(err:Error) { }; }; _smilMgr = new SMILManager(this); return (_smilMgr.connectXML(name)); } public function get streamName():String{ return (_streamName); } flvplayback_internal function reconnectOnStatus(_arg1:NetStatusEvent):void{ if ((((_arg1.info.code == "NetConnection.Connect.Failed")) || ((_arg1.info.code == "NetConnection.Connect.Rejected")))){ _nc = null; _ncConnected = false; _owner.ncReconnected(); }; } public function get videoPlayer():VideoPlayer{ return (_owner); } flvplayback_internal function getStreamLengthResult(_arg1:Number):void{ if (_arg1 > 0){ _streamLength = _arg1; }; _owner.ncConnected(); } flvplayback_internal function canReuseOldConnection(_arg1:ParseResults):Boolean{ if ((((_nc == null)) || (!(_ncConnected)))){ return (false); }; if (!_arg1.isRTMP){ if (!_isRTMP){ return (true); }; _owner.close(); _nc = null; _ncConnected = false; initNCInfo(); return (false); }; if (_isRTMP){ if ((((((((((_arg1.serverName == _serverName)) && ((_arg1.appName == _appName)))) && ((_arg1.protocol == _protocol)))) && ((_arg1.portNumber == _portNumber)))) && ((_arg1.wrappedURL == _wrappedURL)))){ return (true); }; _owner.close(); _nc = null; _ncConnected = false; }; initNCInfo(); return (false); } public function getProperty(_arg1:String){ switch (_arg1){ case "fallbackServerName": return (fallbackServerName); case "fpadZone": return (_fpadZone); case "objectEncoding": return (_objectEncoding); case "proxyType": return (_proxyType); default: throw (new VideoError(VideoError.UNSUPPORTED_PROPERTY, _arg1)); }; } flvplayback_internal function connectRTMP():Boolean{ var _local1:int; var _local2:uint; _timeoutTimer.stop(); _timeoutTimer.start(); _tryNC = new Array(); _local1 = ((((_protocol == "rtmp:/")) || ((_protocol == "rtmpe:/")))) ? 2 : 1; _local2 = 0; while (_local2 < _local1) { _tryNC[_local2] = new NetConnection(); _tryNC[_local2].objectEncoding = _objectEncoding; _tryNC[_local2].proxyType = _proxyType; if (!isNaN(_fpadZone)){ _tryNC[_local2].fpadZone = _fpadZone; }; _tryNC[_local2].client = new ConnectClient(this, _tryNC[_local2], _local2); _tryNC[_local2].addEventListener(NetStatusEvent.NET_STATUS, connectOnStatus); _local2++; }; nextConnect(); return (false); } public function reconnect():void{ if (!_isRTMP){ throw (new Error("Cannot call reconnect on an http connection")); }; _nc.client = new ReconnectClient(this); _nc.addEventListener(NetStatusEvent.NET_STATUS, reconnectOnStatus); _nc.connect(_ncUri, false); } public function helperDone(_arg1:Object, _arg2:Boolean):void{ var _local3:ParseResults; var _local4:String; var _local5:Boolean; var _local6:uint; var _local7:Number; if (!_arg2){ _nc = null; _ncConnected = false; _owner.ncConnected(); _smilMgr = null; _fpadMgr = null; return; }; _local5 = false; if (_arg1 == _fpadMgr){ _local4 = _fpadMgr.rtmpURL; _fpadMgr = null; _local3 = parseURL(_local4); _isRTMP = _local3.isRTMP; _protocol = _local3.protocol; _serverName = _local3.serverName; _portNumber = _local3.portNumber; _wrappedURL = _local3.wrappedURL; _appName = _local3.appName; _streamName = _local3.streamName; _local7 = _fpadZone; _fpadZone = NaN; connectRTMP(); _fpadZone = _local7; return; }; if (_arg1 != _smilMgr){ return; }; _streamWidth = _smilMgr.width; _streamHeight = _smilMgr.height; _local4 = _smilMgr.baseURLAttr[0]; if (((!((_local4 == null))) && (!((_local4 == ""))))){ if (_local4.charAt((_local4.length - 1)) != "/"){ _local4 = (_local4 + "/"); }; _local3 = parseURL(_local4); _isRTMP = _local3.isRTMP; _local5 = true; _streamName = _local3.streamName; if (_isRTMP){ _protocol = _local3.protocol; _serverName = _local3.serverName; _portNumber = _local3.portNumber; _wrappedURL = _local3.wrappedURL; _appName = _local3.appName; if ((((_appName == null)) || ((_appName == "")))){ _smilMgr = null; throw (new VideoError(VideoError.INVALID_XML, ("Base RTMP URL must include application name: " + _local4))); }; if (_smilMgr.baseURLAttr.length > 1){ _local3 = parseURL(_smilMgr.baseURLAttr[1]); if (_local3.serverName != null){ fallbackServerName = _local3.serverName; }; }; }; }; _streams = _smilMgr.videoTags; _smilMgr = null; _local6 = 0; while (_local6 < _streams.length) { _local4 = _streams[_local6].src; _local3 = parseURL(_local4); if (!_local5){ _isRTMP = _local3.isRTMP; _local5 = true; if (_isRTMP){ _protocol = _local3.protocol; if (_streams.length > 1){ throw (new VideoError(VideoError.INVALID_XML, "Cannot switch between multiple absolute RTMP URLs, must use meta tag base attribute.")); }; _serverName = _local3.serverName; _portNumber = _local3.portNumber; _wrappedURL = _local3.wrappedURL; _appName = _local3.appName; if ((((_appName == null)) || ((_appName == "")))){ throw (new VideoError(VideoError.INVALID_XML, ("Base RTMP URL must include application name: " + _local4))); }; } else { if ((((_local3.streamName.indexOf("/fms/fpad") >= 0)) && ((_streams.length > 1)))){ throw (new VideoError(VideoError.INVALID_XML, "Cannot switch between multiple absolute fpad URLs, must use meta tag base attribute.")); }; }; } else { if (((((((!((_streamName == null))) && (!((_streamName == ""))))) && (!(_local3.isRelative)))) && ((_streams.length > 1)))){ throw (new VideoError(VideoError.INVALID_XML, "When using meta tag base attribute, cannot use absolute URLs for video or ref tag src attributes.")); }; }; _streams[_local6].parseResults = _local3; _local6++; }; _autoSenseBW = (_streams.length > 1); if (!_autoSenseBW){ if (_streamName != null){ _streamName = (_streamName + _streams[0].parseResults.streamName); } else { _streamName = _streams[0].parseResults.streamName; }; if (((_isRTMP) && ((_streamName.substr(-4).toLowerCase() == ".flv")))){ _streamName = _streamName.substr(0, (_streamName.length - 4)); }; _streamLength = _streams[0].dur; }; if (_isRTMP){ connectRTMP(); } else { if (((!((_streamName == null))) && ((_streamName.indexOf("/fms/fpad") >= 0)))){ connectFPAD(_streamName); } else { if (_autoSenseBW){ bitrateMatch(); }; connectHTTP(); _owner.ncConnected(); }; }; } public function get netConnection():NetConnection{ return (_nc); } public function get bitrate():Number{ return (_bitrate); } public function setProperty(_arg1:String, _arg2):void{ switch (_arg1){ case "fallbackServerName": fallbackServerName = String(_arg2); break; case "fpadZone": _fpadZone = Number(_arg2); break; case "objectEncoding": _objectEncoding = uint(_arg2); break; case "proxyType": _proxyType = String(_arg2); break; default: throw (new VideoError(VideoError.UNSUPPORTED_PROPERTY, _arg1)); }; } public function get timeout():uint{ return (_timeoutTimer.delay); } public function set videoPlayer(_arg1:VideoPlayer):void{ _owner = _arg1; } flvplayback_internal function bitrateMatch():void{ var _local1:Number; var _local2:uint; var _local3:uint; _local1 = _bitrate; if (isNaN(_local1)){ _local1 = 0; }; _local2 = _streams.length; _local3 = 0; while (_local3 < _streams.length) { if (((isNaN(_streams[_local3].bitrate)) || ((_local1 >= _streams[_local3].bitrate)))){ _local2 = _local3; break; }; _local3++; }; if (_local2 == _streams.length){ throw (new VideoError(VideoError.NO_BITRATE_MATCH)); }; if (_streamName != null){ _streamName = (_streamName + _streams[_local2].src); } else { _streamName = _streams[_local2].src; }; if (((_isRTMP) && ((_streamName.substr(-4).toLowerCase() == ".flv")))){ _streamName = _streamName.substr(0, (_streamName.length - 4)); }; _streamLength = _streams[_local2].dur; } flvplayback_internal function disconnectOnStatus(_arg1:NetStatusEvent):void{ if (_arg1.info.code == "NetConnection.Connect.Success"){ _arg1.target.removeEventListener(NetStatusEvent.NET_STATUS, disconnectOnStatus); _arg1.target.close(); }; } flvplayback_internal function nextConnect(_arg1:TimerEvent=null):void{ var _local2:String; var _local3:String; var _local4:String; if (_connTypeCounter == 0){ _local2 = _protocol; _local3 = _portNumber; } else { _local3 = null; if (_protocol == "rtmp:/"){ _local2 = "rtmpt:/"; } else { if (_protocol == "rtmpe:/"){ _local2 = "rtmpte:/"; } else { _tryNC.pop(); return; }; }; }; _local4 = (((_local2 + ((_serverName)==null) ? "" : ((("/" + _serverName) + ((_local3)==null) ? "" : (":" + _local3)) + "/")) + ((_wrappedURL)==null) ? "" : (_wrappedURL + "/")) + _appName); _tryNC[_connTypeCounter].client.pending = true; _tryNC[_connTypeCounter].connect(_local4, _autoSenseBW); if (_connTypeCounter < (_tryNC.length - 1)){ _connTypeCounter++; _tryNCTimer.reset(); _tryNCTimer.start(); }; } flvplayback_internal function connectFPAD(_arg1:String):Boolean{ var _local2:Object; var _local3:String; var _local4:String; var _local5:String; var _local6:ParseResults; _local2 = /^(.+)(\?|\&)(uri=)([^&]+)(\&.*)?$/.exec(_arg1); if (_local2 == null){ throw (new VideoError(VideoError.INVALID_SOURCE, ("fpad url must include uri parameter: " + _arg1))); }; _local3 = (_local2[1] + _local2[2]); _local4 = _local2[4]; _local5 = ((_local2[5])==undefined) ? "" : _local2[5]; _local6 = parseURL(_local4); if (!_local6.isRTMP){ throw (new VideoError(VideoError.INVALID_SOURCE, ("fpad url uri parameter must be rtmp url: " + _arg1))); }; _fpadMgr = new FPADManager(this); return (_fpadMgr.connectXML(_local3, _local4, _local5, _local6)); } flvplayback_internal function connectHTTP():Boolean{ _nc = new NetConnection(); _nc.connect(null); _ncConnected = true; return (true); } public function get isRTMP():Boolean{ return (_isRTMP); } public function get streamLength():Number{ return (_streamLength); } public function connectAgain():Boolean{ var _local1:int; var _local2:String; _local1 = _appName.indexOf("/"); if (_local1 < 0){ _local1 = _streamName.indexOf("/"); if (_local1 >= 0){ _appName = (_appName + "/"); _appName = (_appName + _streamName.slice(0, _local1)); _streamName = _streamName.slice((_local1 + 1)); }; return (false); }; _local2 = _appName.slice((_local1 + 1)); _local2 = (_local2 + "/"); _local2 = (_local2 + _streamName); _streamName = _local2; _appName = _appName.slice(0, _local1); close(); _payload = 0; _connTypeCounter = 0; cleanConns(); connectRTMP(); return (true); } flvplayback_internal function parseURL(_arg1:String):ParseResults{ var _local2:ParseResults; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:String; var _local8:ParseResults; _local2 = new ParseResults(); _local3 = 0; _local4 = _arg1.indexOf(":/", _local3); if (_local4 >= 0){ _local4 = (_local4 + 2); _local2.protocol = _arg1.slice(_local3, _local4).toLowerCase(); _local2.isRelative = false; } else { _local2.isRelative = true; }; if (((!((_local2.protocol == null))) && ((((((((((_local2.protocol == "rtmp:/")) || ((_local2.protocol == "rtmpt:/")))) || ((_local2.protocol == "rtmps:/")))) || ((_local2.protocol == "rtmpe:/")))) || ((_local2.protocol == "rtmpte:/")))))){ _local2.isRTMP = true; _local3 = _local4; if (_arg1.charAt(_local3) == "/"){ _local3++; _local5 = _arg1.indexOf(":", _local3); _local6 = _arg1.indexOf("/", _local3); if (_local6 < 0){ if (_local5 < 0){ _local2.serverName = _arg1.slice(_local3); } else { _local4 = _local5; _local2.portNumber = _arg1.slice(_local3, _local4); _local3 = (_local4 + 1); _local2.serverName = _arg1.slice(_local3); }; return (_local2); }; if ((((_local5 >= 0)) && ((_local5 < _local6)))){ _local4 = _local5; _local2.serverName = _arg1.slice(_local3, _local4); _local3 = (_local4 + 1); _local4 = _local6; _local2.portNumber = _arg1.slice(_local3, _local4); } else { _local4 = _local6; _local2.serverName = _arg1.slice(_local3, _local4); }; _local3 = (_local4 + 1); }; if (_arg1.charAt(_local3) == "?"){ _local7 = _arg1.slice((_local3 + 1)); _local8 = parseURL(_local7); if ((((_local8.protocol == null)) || (!(_local8.isRTMP)))){ throw (new VideoError(VideoError.INVALID_SOURCE, _arg1)); }; _local2.wrappedURL = "?"; _local2.wrappedURL = (_local2.wrappedURL + _local8.protocol); if (_local8.serverName != null){ _local2.wrappedURL = (_local2.wrappedURL + "/"); _local2.wrappedURL = (_local2.wrappedURL + _local8.serverName); }; if (_local8.portNumber != null){ _local2.wrappedURL = (_local2.wrappedURL + (":" + _local8.portNumber)); }; if (_local8.wrappedURL != null){ _local2.wrappedURL = (_local2.wrappedURL + "/"); _local2.wrappedURL = (_local2.wrappedURL + _local8.wrappedURL); }; _local2.appName = _local8.appName; _local2.streamName = _local8.streamName; return (_local2); }; _local4 = _arg1.indexOf("/", _local3); if (_local4 < 0){ _local2.appName = _arg1.slice(_local3); return (_local2); }; _local2.appName = _arg1.slice(_local3, _local4); _local3 = (_local4 + 1); _local4 = _arg1.indexOf("/", _local3); if (_local4 < 0){ _local2.streamName = _arg1.slice(_local3); if (_local2.streamName.slice(-4).toLowerCase() == ".flv"){ _local2.streamName = _local2.streamName.slice(0, -4); }; return (_local2); }; _local2.appName = (_local2.appName + "/"); _local2.appName = (_local2.appName + _arg1.slice(_local3, _local4)); _local3 = (_local4 + 1); _local2.streamName = _arg1.slice(_local3); if (_local2.streamName.slice(-4).toLowerCase() == ".flv"){ _local2.streamName = _local2.streamName.slice(0, -4); }; } else { _local2.isRTMP = false; _local2.streamName = _arg1; }; return (_local2); } flvplayback_internal function initOtherInfo():void{ _contentPath = null; _streamName = null; _streamWidth = -1; _streamHeight = -1; _streamLength = NaN; _streams = null; _autoSenseBW = false; _payload = 0; _connTypeCounter = 0; cleanConns(); } public function set timeout(_arg1:uint):void{ _timeoutTimer.delay = _arg1; } flvplayback_internal function _onFMSConnectTimeOut(_arg1:TimerEvent=null):void{ cleanConns(); _nc = null; _ncConnected = false; if (!connectAgain()){ _owner.ncConnected(); }; } public function get streamHeight():int{ return (_streamHeight); } flvplayback_internal function connectOnStatus(_arg1:NetStatusEvent):void{ var _local2:ParseResults; _arg1.target.client.pending = false; if (_arg1.info.code == "NetConnection.Connect.Success"){ _nc = _tryNC[_arg1.target.client.connIndex]; cleanConns(); } else { if ((((((_arg1.info.code == "NetConnection.Connect.Rejected")) && (!((_arg1.info.ex == null))))) && ((_arg1.info.ex.code == 302)))){ _connTypeCounter = 0; cleanConns(); _local2 = parseURL(_arg1.info.ex.redirect); if (_local2.isRTMP){ _protocol = _local2.protocol; _serverName = _local2.serverName; _wrappedURL = _local2.wrappedURL; _portNumber = _local2.portNumber; _appName = _local2.appName; if (_local2.streamName != null){ _appName = (_appName + ("/" + _local2.streamName)); }; connectRTMP(); } else { tryFallBack(); }; } else { if ((((((_arg1.info.code == "NetConnection.Connect.Failed")) || ((_arg1.info.code == "NetConnection.Connect.Rejected")))) && ((_arg1.target.client.connIndex == (_tryNC.length - 1))))){ if (!connectAgain()){ tryFallBack(); }; }; }; }; } flvplayback_internal function onReconnected():void{ _ncConnected = true; _owner.ncReconnected(); } flvplayback_internal function tryFallBack():void{ if ((((_serverName == fallbackServerName)) || ((fallbackServerName == null)))){ _nc = null; _ncConnected = false; _owner.ncConnected(); } else { _connTypeCounter = 0; cleanConns(); _serverName = fallbackServerName; connectRTMP(); }; } public function set bitrate(_arg1:Number):void{ if (!_isRTMP){ _bitrate = _arg1; }; } flvplayback_internal function onConnected(_arg1:NetConnection, _arg2:Number):void{ var _local3:Array; var _local4:uint; var _local5:String; _timeoutTimer.stop(); _arg1.removeEventListener(NetStatusEvent.NET_STATUS, connectOnStatus); _nc = _arg1; _ncUri = _nc.uri; _ncConnected = true; if (_autoSenseBW){ _bitrate = (_arg2 * 0x0400); if (_streams != null){ bitrateMatch(); } else { _local3 = _streamName.split(","); _local4 = 0; while (_local4 < _local3.length) { _local5 = stripFrontAndBackWhiteSpace(_local3[_local4]); if ((_local4 + 1) < _local3.length){ if (_arg2 <= Number(_local3[(_local4 + 1)])){ _streamName = _local5; break; }; } else { _streamName = _local5; break; }; _local4 = (_local4 + 2); }; if (_streamName.slice(-4).toLowerCase() == ".flv"){ _streamName = _streamName.slice(0, -4); }; }; }; if (((!(_owner.isLive)) && (isNaN(_streamLength)))){ _nc.call("getStreamLength", new Responder(getStreamLengthResult), _streamName); } else { _owner.ncConnected(); }; } public function close():void{ if (_nc){ _nc.close(); _ncConnected = false; }; } flvplayback_internal static function stripFrontAndBackWhiteSpace(_arg1:String):String{ var _local2:uint; var _local3:uint; var _local4:int; var _local5:int; _local3 = _arg1.length; _local4 = 0; _local5 = _local3; _local2 = 0; for (;_local2 < _local3;_local2++) { switch (_arg1.charCodeAt(_local2)){ case 9: case 10: case 13: case 32: continue; }; _local4 = _local2; break; }; _local2 = _local3; for (;_local2 >= 0;_local2--) { switch (_arg1.charCodeAt(_local2)){ case 9: case 10: case 13: case 32: continue; }; _local5 = (_local2 + 1); break; }; if (_local5 <= _local4){ return (""); }; return (_arg1.slice(_local4, _local5)); } } }//package fl.video
Section 29
//ParseResults (fl.video.ParseResults) package fl.video { public class ParseResults { public var portNumber:String; public var streamName:String; public var serverName:String; public var isRTMP:Boolean; public var appName:String; public var isRelative:Boolean; public var protocol:String; public var wrappedURL:String; } }//package fl.video
Section 30
//QueuedCommand (fl.video.QueuedCommand) package fl.video { public class QueuedCommand { public var type:uint; public var time:Number; public var url:String; public var isLive:Boolean; public static const LOAD:uint = 1; public static const STOP:uint = 3; public static const PLAY_WHEN_ENOUGH:uint = 5; public static const PLAY:uint = 0; public static const PAUSE:uint = 2; public static const SEEK:uint = 4; public function QueuedCommand(_arg1:uint, _arg2:String, _arg3:Boolean, _arg4:Number){ this.type = _arg1; this.url = _arg2; this.isLive = _arg3; this.time = _arg4; } } }//package fl.video
Section 31
//ReconnectClient (fl.video.ReconnectClient) package fl.video { public class ReconnectClient { public var owner:NCManager; public function ReconnectClient(_arg1:NCManager){ this.owner = _arg1; } public function close():void{ } public function onBWDone(... _args):void{ owner.onReconnected(); } } }//package fl.video
Section 32
//SkinErrorEvent (fl.video.SkinErrorEvent) package fl.video { import flash.events.*; public class SkinErrorEvent extends ErrorEvent { public static const SKIN_ERROR:String = "skinError"; public function SkinErrorEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=""){ super(_arg1, _arg2, _arg3, _arg4); } override public function clone():Event{ return (new SkinErrorEvent(type, bubbles, cancelable, text)); } } }//package fl.video
Section 33
//SMILManager (fl.video.SMILManager) package fl.video { import flash.net.*; import flash.events.*; public class SMILManager { flvplayback_internal var width:int; flvplayback_internal var xmlLoader:URLLoader; flvplayback_internal var xml:XML; flvplayback_internal var height:int; private var _url:String; flvplayback_internal var videoTags:Array; flvplayback_internal var baseURLAttr:Array; private var _owner:INCManager; public static const VERSION:String = "2.1.0.14"; public static const SHORT_VERSION:String = "2.1"; public function SMILManager(_arg1:INCManager){ _owner = _arg1; width = -1; height = -1; } flvplayback_internal function parseVideo(_arg1:XML):Object{ var _local2:Object; _local2 = new Object(); if (_arg1.@src.length() > 0){ _local2.src = _arg1.@src.toString(); }; if (_arg1.@["system-bitrate"].length() > 0){ _local2.bitrate = int(_arg1.@["system-bitrate"].toString()); }; if (_arg1.@dur.length() > 0){ _local2.dur = parseTime(_arg1.@dur.toString()); }; return (_local2); } flvplayback_internal function connectXML(_arg1:String):Boolean{ _url = fixURL(_arg1); xmlLoader = new URLLoader(); xmlLoader.addEventListener(Event.COMPLETE, xmlLoadEventHandler); xmlLoader.addEventListener(IOErrorEvent.IO_ERROR, xmlLoadEventHandler); xmlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, xmlLoadEventHandler); xmlLoader.load(new URLRequest(_url)); return (false); } flvplayback_internal function parseSwitch(_arg1:XML):void{ var _local2:String; var _local3:XML; for (_local2 in _arg1.*) { _local3 = _arg1.*[_local2]; if (_local3.nodeKind() != "element"){ } else { switch (_local3.localName()){ case "video": case "ref": videoTags.push(parseVideo(_local3)); break; default: break; }; }; }; } flvplayback_internal function fixURL(_arg1:String):String{ var _local2:String; if (/^(http:|https:)/i.test(_arg1)){ _local2 = ((_arg1.indexOf("?"))>=0) ? "&" : "?"; return ((((_arg1 + _local2) + "FLVPlaybackVersion=") + SHORT_VERSION)); }; return (_arg1); } flvplayback_internal function xmlLoadEventHandler(_arg1:Event):void{ var e = _arg1; try { if (e.type != Event.COMPLETE){ _owner.helperDone(this, false); } else { baseURLAttr = new Array(); videoTags = new Array(); xml = new XML(xmlLoader.data); if ((((xml == null)) || ((xml.localName() == null)))){ throw (new VideoError(VideoError.INVALID_XML, (("URL: \"" + _url) + "\" No root node found; if url is for an flv it must have .flv extension and take no parameters"))); } else { if (xml.localName() != "smil"){ throw (new VideoError(VideoError.INVALID_XML, (("URL: \"" + _url) + "\" Root node not smil"))); }; }; checkForIllegalNodes(xml, "element", ["head", "body"]); if (xml.head.length() > 0){ parseHead(xml.head[0]); }; if (xml.body.length() < 1){ throw (new VideoError(VideoError.INVALID_XML, (("URL: \"" + _url) + "\" Tag body is required."))); } else { parseBody(xml.body[0]); }; _owner.helperDone(this, true); }; } catch(err:Error) { _owner.helperDone(this, false); throw (err); } finally { xmlLoader.removeEventListener(Event.COMPLETE, xmlLoadEventHandler); xmlLoader.removeEventListener(IOErrorEvent.IO_ERROR, xmlLoadEventHandler); xmlLoader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, xmlLoadEventHandler); xmlLoader = null; }; } flvplayback_internal function checkForIllegalNodes(_arg1:XML, _arg2:String, _arg3:Array):void{ var _local4:String; var _local5:Boolean; var _local6:XML; var _local7:String; var _local8:String; for (_local4 in _arg1.*) { _local5 = false; _local6 = _arg1.*[_local4]; if (_local6.nodeKind() != _arg2){ } else { _local7 = _local6.localName(); for (_local8 in _arg3) { if (_arg3[_local8] == _local7){ _local5 = true; break; }; }; if (!_local5){ throw (new VideoError(VideoError.INVALID_XML, (((((((("URL: \"" + _url) + "\" ") + _arg2) + " ") + _local7) + " not supported in ") + _arg1.localName()) + " tag."))); }; }; }; } flvplayback_internal function parseHead(_arg1:XML):void{ checkForIllegalNodes(_arg1, "element", ["meta", "layout"]); if (_arg1.meta.length() > 0){ checkForIllegalNodes(_arg1.meta[0], "element", []); checkForIllegalNodes(_arg1.meta[0], "attribute", ["base"]); if (_arg1.meta.@base.length() > 0){ baseURLAttr.push(_arg1.meta.@base.toString()); }; }; if (_arg1.layout.length() > 0){ parseLayout(_arg1.layout[0]); }; } flvplayback_internal function parseBody(_arg1:XML):void{ var _local2:XML; var _local3:String; var _local4:Object; if (((!((_arg1.*.length() == 1))) || (!((_arg1.*[0].nodeKind() == "element"))))){ throw (new VideoError(VideoError.INVALID_XML, (((("URL: \"" + _url) + "\" Tag ") + _arg1.localName()) + " is required to contain exactly one tag."))); }; _local2 = _arg1.*[0]; _local3 = _local2.localName(); switch (_local3){ case "switch": parseSwitch(_local2); break; case "video": case "ref": _local4 = parseVideo(_local2); videoTags.push(_local4); break; default: throw (new VideoError(VideoError.INVALID_XML, (((((("URL: \"" + _url) + "\" Tag ") + _local3) + " not supported in ") + _arg1.localName()) + " tag."))); }; if (videoTags.length < 1){ throw (new VideoError(VideoError.INVALID_XML, (("URL: \"" + _url) + "\" At least one video of ref tag is required."))); }; } flvplayback_internal function parseTime(_arg1:String):Number{ var _local2:Object; var _local3:Number; var _local4:Number; _local2 = /^((\d+):)?(\d+):((\d+)(.\d+)?)$/.exec(_arg1); if (_local2 == null){ _local3 = Number(_arg1); if (((isNaN(_local3)) || ((_local3 < 0)))){ throw (new VideoError(VideoError.INVALID_XML, ("Invalid dur value: " + _arg1))); }; return (_local3); //unresolved jump }; _local4 = 0; _local4 = (_local4 + ((uint(_local2[2]) * 60) * 60)); _local4 = (_local4 + (uint(_local2[3]) * 60)); _local4 = (_local4 + Number(_local2[4])); return (_local4); } flvplayback_internal function parseLayout(_arg1:XML):void{ var _local2:XML; var _local3:Number; var _local4:Number; checkForIllegalNodes(_arg1, "element", ["root-layout"]); if (_arg1["root-layout"].length() > 1){ throw (new VideoError(VideoError.INVALID_XML, (("URL: \"" + _url) + "\" Only one base attribute supported in meta tag."))); }; if (_arg1["root-layout"].length() > 0){ _local2 = _arg1["root-layout"][0]; if (_local2.@width.length() > 0){ _local3 = Number(_local2.@width[0]); }; if (_local2.@height.length() > 0){ _local4 = Number(_local2.@height[0]); }; if (((((((isNaN(_local3)) || ((_local3 < 0)))) || (isNaN(_local4)))) || ((_local4 < 0)))){ throw (new VideoError(VideoError.INVALID_XML, (((("URL: \"" + _url) + "\" Tag ") + _arg1.localName()) + " requires attributes width and height. Width and height must be numbers greater than or equal to 0."))); }; width = Math.round(_local3); height = Math.round(_local4); }; } } }//package fl.video
Section 34
//SoundEvent (fl.video.SoundEvent) package fl.video { import flash.events.*; import flash.media.*; public class SoundEvent extends Event { private var _soundTransform:SoundTransform; public static const SOUND_UPDATE:String = "soundUpdate"; public function SoundEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:SoundTransform=null){ super(_arg1, _arg2, _arg3); _soundTransform = _arg4; } public function get soundTransform():SoundTransform{ return (_soundTransform); } override public function clone():Event{ return (new SoundEvent(type, bubbles, cancelable, soundTransform)); } } }//package fl.video
Section 35
//UIManager (fl.video.UIManager) package fl.video { import flash.net.*; import flash.events.*; import flash.display.*; import flash.geom.*; import flash.utils.*; public class UIManager { flvplayback_internal var cacheStageBGColor:uint; flvplayback_internal var _bufferingDelayTimer:Timer; public var ctrlDataDict:Dictionary; flvplayback_internal var _skinAutoHide:Boolean; flvplayback_internal var placeholderLeft:Number; flvplayback_internal var _playAfterScrub:Boolean; public var customClips:Array; flvplayback_internal var _skinFadeStartTime:int; flvplayback_internal var delayedControls:Array; flvplayback_internal var _lastScrubPos:Number; flvplayback_internal var _skinAutoHideLastMotionTime:int; flvplayback_internal var _volumeBarTimer:Timer; flvplayback_internal var cacheFLVPlaybackScaleMode:Array; flvplayback_internal var borderScale9Rects:Array; flvplayback_internal var _volumeBarScrubTolerance:Number; flvplayback_internal var fullScreenSourceRectMinAspectRatio:Number; flvplayback_internal var _skin:String; flvplayback_internal var fullScreenSourceRectMinHeight:uint; flvplayback_internal var videoRight:Number; flvplayback_internal var _bufferingBarHides:Boolean; flvplayback_internal var placeholderRight:Number; flvplayback_internal var cachedSoundLevel:Number; flvplayback_internal var videoBottom:Number; flvplayback_internal var border_mc:DisplayObject; flvplayback_internal var borderAlpha:Number; flvplayback_internal var borderColorTransform:ColorTransform; flvplayback_internal var _skinFadingTimer:Timer; flvplayback_internal var __visible:Boolean; flvplayback_internal var borderColor:uint; flvplayback_internal var cacheFLVPlaybackIndex:int; flvplayback_internal var cacheFLVPlaybackLocation:Rectangle; flvplayback_internal var _skinReady:Boolean; flvplayback_internal var controls:Array; flvplayback_internal var cacheFLVPlaybackAlign:Array; flvplayback_internal var _skinAutoHideMouseX:Number; flvplayback_internal var _skinAutoHideMouseY:Number; flvplayback_internal var layout_mc:Sprite; flvplayback_internal var cacheSkinAutoHide:Boolean; flvplayback_internal var cacheStageScaleMode:String; flvplayback_internal var videoTop:Number; flvplayback_internal var _skinFadingMaxTime:int; flvplayback_internal var placeholderTop:Number; flvplayback_internal var _lastVolumePos:Number; flvplayback_internal var mouseCaptureCtrl:int; flvplayback_internal var _seekBarScrubTolerance:Number; flvplayback_internal var borderPrevRect:Rectangle; flvplayback_internal var skinTemplate:Sprite; flvplayback_internal var _progressPercent:Number; flvplayback_internal var videoLeft:Number; flvplayback_internal var _fullScreenVideoWidth:Number; flvplayback_internal var _isMuted:Boolean; flvplayback_internal var _skinAutoHideTimer:Timer; flvplayback_internal var _fullScreenBgColor:uint; flvplayback_internal var _vc:FLVPlayback; flvplayback_internal var _bufferingOn:Boolean; flvplayback_internal var _seekBarTimer:Timer; flvplayback_internal var _controlsEnabled:Boolean; flvplayback_internal var _fullScreen:Boolean; flvplayback_internal var placeholderBottom:Number; flvplayback_internal var fullScreenSourceRectMinWidth:uint; flvplayback_internal var _fullScreenTakeOver:Boolean; flvplayback_internal var skin_mc:Sprite; flvplayback_internal var _fullScreenAccel:Boolean; flvplayback_internal var _fullScreenVideoHeight:Number; flvplayback_internal var skinLoadDelayCount:uint; flvplayback_internal var _skinFadingIn:Boolean; flvplayback_internal var _skinAutoHideMotionTimeout:int; flvplayback_internal var borderCopy:Sprite; flvplayback_internal var cacheStageAlign:String; flvplayback_internal var cacheFLVPlaybackParent:DisplayObjectContainer; flvplayback_internal var skinLoader:Loader; flvplayback_internal var _skinScaleMaximum:Number; public static const VOLUME_BAR_HIT:int = 12; public static const MUTE_OFF_BUTTON:int = 10; public static const BACK_BUTTON:int = 5; public static const FORWARD_BUTTON:int = 6; public static const STOP_BUTTON:int = 2; public static const NUM_BUTTONS:int = 13; public static const NORMAL_STATE:uint = 0; public static const SEEK_BAR_HANDLE:int = 3; public static const PLAY_BUTTON:int = 1; public static const MUTE_BUTTON:int = 15; public static const DOWN_STATE:uint = 2; public static const SEEK_BAR_SCRUB_TOLERANCE_DEFAULT:Number = 5; public static const FULL_SCREEN_OFF_BUTTON:int = 8; flvplayback_internal static const SKIN_AUTO_HIDE_MOTION_TIMEOUT_DEFAULT:Number = 3000; public static const SEEK_BAR:int = 17; public static const VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT:Number = 0; public static const FULL_SCREEN_ON_BUTTON:int = 7; public static const FULL_SCREEN_BUTTON:int = 14; public static const BUFFERING_BAR:int = 16; public static const VERSION:String = "2.1.0.14"; public static const VOLUME_BAR_HANDLE:int = 11; public static const PAUSE_BUTTON:int = 0; flvplayback_internal static const SKIN_AUTO_HIDE_INTERVAL:Number = 200; public static const OVER_STATE:uint = 1; flvplayback_internal static const SKIN_FADING_INTERVAL:Number = 100; public static const VOLUME_BAR:int = 18; public static const SHORT_VERSION:String = "2.1"; public static const SEEK_BAR_INTERVAL_DEFAULT:Number = 250; flvplayback_internal static const SKIN_FADING_MAX_TIME_DEFAULT:Number = 500; public static const SEEK_BAR_HIT:int = 4; public static const PLAY_PAUSE_BUTTON:int = 13; public static const BUFFERING_DELAY_INTERVAL_DEFAULT:Number = 1000; public static const MUTE_ON_BUTTON:int = 9; public static const FULL_SCREEN_SOURCE_RECT_MIN_HEIGHT:uint = 240; public static const NUM_CONTROLS:int = 19; public static const VOLUME_BAR_INTERVAL_DEFAULT:Number = 250; public static const FULL_SCREEN_SOURCE_RECT_MIN_WIDTH:uint = 320; flvplayback_internal static var layoutNameToIndexMappings:Object = null; flvplayback_internal static var buttonSkinLinkageIDs:Array = ["upLinkageID", "overLinkageID", "downLinkageID"]; flvplayback_internal static var layoutNameArray:Array = ["pause_mc", "play_mc", "stop_mc", null, null, "back_mc", "forward_mc", null, null, null, null, null, null, "playpause_mc", "fullScreenToggle_mc", "volumeMute_mc", "bufferingBar_mc", "seekBar_mc", "volumeBar_mc", "seekBarHandle_mc", "seekBarHit_mc", "seekBarProgress_mc", "seekBarFullness_mc", "volumeBarHandle_mc", "volumeBarHit_mc", "volumeBarProgress_mc", "volumeBarFullness_mc", "progressFill_mc"]; flvplayback_internal static var skinClassPrefixes:Array = ["pauseButton", "playButton", "stopButton", null, null, "backButton", "forwardButton", "fullScreenButtonOn", "fullScreenButtonOff", "muteButtonOn", "muteButtonOff", null, null, null, null, null, "bufferingBar", "seekBar", "volumeBar"]; flvplayback_internal static var customComponentClassNames:Array = ["PauseButton", "PlayButton", "StopButton", null, null, "BackButton", "ForwardButton", null, null, null, null, null, null, "PlayPauseButton", "FullScreenButton", "MuteButton", "BufferingBar", "SeekBar", "VolumeBar"]; public function UIManager(_arg1:FLVPlayback){ var vc = _arg1; super(); _vc = vc; _skin = null; _skinAutoHide = false; cacheSkinAutoHide = _skinAutoHide; _skinFadingMaxTime = SKIN_FADING_MAX_TIME_DEFAULT; _skinAutoHideMotionTimeout = SKIN_AUTO_HIDE_MOTION_TIMEOUT_DEFAULT; _skinReady = true; __visible = false; _bufferingBarHides = false; _controlsEnabled = true; _lastScrubPos = 0; _lastVolumePos = 0; cachedSoundLevel = _vc.volume; _isMuted = false; controls = new Array(); customClips = null; ctrlDataDict = new Dictionary(true); skin_mc = null; skinLoader = null; skinTemplate = null; layout_mc = null; border_mc = null; borderCopy = null; borderPrevRect = null; borderScale9Rects = null; borderAlpha = 0.85; borderColor = 4697035; borderColorTransform = new ColorTransform(0, 0, 0, 0, 71, 171, 203, (0xFF * borderAlpha)); _seekBarScrubTolerance = SEEK_BAR_SCRUB_TOLERANCE_DEFAULT; _volumeBarScrubTolerance = VOLUME_BAR_SCRUB_TOLERANCE_DEFAULT; _bufferingOn = false; mouseCaptureCtrl = -1; _seekBarTimer = new Timer(SEEK_BAR_INTERVAL_DEFAULT); _seekBarTimer.addEventListener(TimerEvent.TIMER, seekBarListener); _volumeBarTimer = new Timer(VOLUME_BAR_INTERVAL_DEFAULT); _volumeBarTimer.addEventListener(TimerEvent.TIMER, volumeBarListener); _bufferingDelayTimer = new Timer(BUFFERING_DELAY_INTERVAL_DEFAULT, 1); _bufferingDelayTimer.addEventListener(TimerEvent.TIMER, doBufferingDelay); _skinAutoHideTimer = new Timer(SKIN_AUTO_HIDE_INTERVAL); _skinAutoHideTimer.addEventListener(TimerEvent.TIMER, skinAutoHideHitTest); _skinFadingTimer = new Timer(SKIN_FADING_INTERVAL); _skinFadingTimer.addEventListener(TimerEvent.TIMER, skinFadeMore); _vc.addEventListener(MetadataEvent.METADATA_RECEIVED, handleIVPEvent); _vc.addEventListener(VideoEvent.PLAYHEAD_UPDATE, handleIVPEvent); _vc.addEventListener(VideoProgressEvent.PROGRESS, handleIVPEvent); _vc.addEventListener(VideoEvent.STATE_CHANGE, handleIVPEvent); _vc.addEventListener(VideoEvent.READY, handleIVPEvent); _vc.addEventListener(LayoutEvent.LAYOUT, handleLayoutEvent); _vc.addEventListener(AutoLayoutEvent.AUTO_LAYOUT, handleLayoutEvent); _vc.addEventListener(SoundEvent.SOUND_UPDATE, handleSoundEvent); _vc.addEventListener(Event.ADDED_TO_STAGE, handleEvent); _vc.addEventListener(Event.REMOVED_FROM_STAGE, handleEvent); fullScreenSourceRectMinWidth = FULL_SCREEN_SOURCE_RECT_MIN_WIDTH; fullScreenSourceRectMinHeight = FULL_SCREEN_SOURCE_RECT_MIN_HEIGHT; fullScreenSourceRectMinAspectRatio = (FULL_SCREEN_SOURCE_RECT_MIN_WIDTH / FULL_SCREEN_SOURCE_RECT_MIN_HEIGHT); _fullScreen = false; _fullScreenTakeOver = true; _fullScreenBgColor = 0; _fullScreenAccel = false; if (_vc.stage != null){ try { _fullScreen = (_vc.stage.displayState == StageDisplayState.FULL_SCREEN); _vc.stage.addEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreenEvent); } catch(se:SecurityError) { }; }; if (layoutNameToIndexMappings == null){ initLayoutNameToIndexMappings(); }; } public function get seekBarScrubTolerance():Number{ return (_seekBarScrubTolerance); } flvplayback_internal function removeButtonListeners(_arg1:Sprite):void{ if (_arg1 == null){ return; }; _arg1.removeEventListener(MouseEvent.ROLL_OVER, handleButtonEvent); _arg1.removeEventListener(MouseEvent.ROLL_OUT, handleButtonEvent); _arg1.removeEventListener(MouseEvent.MOUSE_DOWN, handleButtonEvent); _arg1.removeEventListener(MouseEvent.CLICK, handleButtonEvent); _arg1.removeEventListener(Event.ENTER_FRAME, skinButtonControl); } public function set skinFadeTime(_arg1:int):void{ _skinFadingMaxTime = _arg1; } public function get skinFadeTime():int{ return (_skinFadingMaxTime); } flvplayback_internal function finishLoad(_arg1:Event):void{ var i:int; var cachedActivePlayerIndex:int; var state:String; var j:int; var e = _arg1; try { skinLoadDelayCount++; if (skinLoadDelayCount < 2){ return; } else { _vc.removeEventListener(Event.ENTER_FRAME, finishLoad); }; i = 0; while (i < NUM_CONTROLS) { if (delayedControls[i] != undefined){ setControl(i, delayedControls[i]); }; i = (i + 1); }; if (_fullScreenTakeOver){ enterFullScreenTakeOver(); } else { exitFullScreenTakeOver(); }; layoutSkin(); setupSkinAutoHide(false); skin_mc.visible = __visible; _vc.addChild(skin_mc); _skinReady = true; _vc.skinLoaded(); cachedActivePlayerIndex = _vc.activeVideoPlayerIndex; _vc.activeVideoPlayerIndex = _vc.visibleVideoPlayerIndex; state = _vc.state; j = 0; while (j < NUM_CONTROLS) { if (controls[j] == undefined){ } else { setEnabledAndVisibleForState(j, state); if (j < NUM_BUTTONS){ skinButtonControl(controls[j]); }; }; j = (j + 1); }; _vc.activeVideoPlayerIndex = cachedActivePlayerIndex; } catch(err:Error) { _vc.skinError(err.message); removeSkin(); }; } flvplayback_internal function downloadSkin():void{ if (skinLoader == null){ skinLoader = new Loader(); skinLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, handleLoad); skinLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, handleLoadErrorEvent); skinLoader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, handleLoadErrorEvent); }; skinLoader.load(new URLRequest(_skin)); } flvplayback_internal function removeSkin():void{ var i:int; if (skinLoader != null){ try { skinLoader.close(); } catch(e1:Error) { }; skinLoader = null; }; if (skin_mc != null){ i = 0; while (i < NUM_CONTROLS) { if (controls[i] == undefined){ } else { if (i < NUM_BUTTONS){ removeButtonListeners(controls[i]); }; delete ctrlDataDict[controls[i]]; delete controls[i]; }; i = (i + 1); }; try { skin_mc.parent.removeChild(skin_mc); } catch(e2:Error) { }; skin_mc = null; }; skinTemplate = null; layout_mc = null; border_mc = null; borderCopy = null; borderPrevRect = null; borderScale9Rects = null; } flvplayback_internal function positionBar(_arg1:Sprite, _arg2:String, _arg3:Number):void{ var ctrlData:ControlData; var bar:DisplayObject; var barData:ControlData; var ctrl = _arg1; var type = _arg2; var percent = _arg3; try { if ((((ctrl["positionBar"] is Function)) && (ctrl["positionBar"](type, percent)))){ return; }; } catch(re2:ReferenceError) { }; ctrlData = ctrlDataDict[ctrl]; bar = ctrlData[(type + "_mc")]; if (bar == null){ return; }; barData = ctrlDataDict[bar]; if (bar.parent == ctrl){ if (barData.fill_mc == null){ bar.scaleX = ((barData.origScaleX * percent) / 100); } else { positionMaskedFill(bar, percent); }; } else { bar.x = (ctrl.x + barData.leftMargin); bar.y = (ctrl.y + barData.origY); if (barData.fill_mc == null){ bar.width = ((((ctrl.width - barData.leftMargin) - barData.rightMargin) * percent) / 100); } else { positionMaskedFill(bar, percent); }; }; } flvplayback_internal function setupButtonSkin(_arg1:int):Sprite{ var _local2:String; var _local3:Sprite; var _local4:ControlData; _local2 = skinClassPrefixes[_arg1]; if (_local2 == null){ return (null); }; _local3 = new Sprite(); _local4 = new ControlData(this, _local3, null, _arg1); ctrlDataDict[_local3] = _local4; _local4.state_mc = new Array(); _local4.state_mc[NORMAL_STATE] = setupButtonSkinState(_local3, skinTemplate, (_local2 + "NormalState")); _local4.state_mc[NORMAL_STATE].visible = true; _local4.state_mc[OVER_STATE] = setupButtonSkinState(_local3, skinTemplate, (_local2 + "OverState"), _local4.state_mc[NORMAL_STATE]); _local4.state_mc[DOWN_STATE] = setupButtonSkinState(_local3, skinTemplate, (_local2 + "DownState"), _local4.state_mc[NORMAL_STATE]); _local4.disabled_mc = setupButtonSkinState(_local3, skinTemplate, (_local2 + "DisabledState"), _local4.state_mc[NORMAL_STATE]); return (_local3); } public function get skinReady():Boolean{ return (_skinReady); } public function get skinAutoHide():Boolean{ return (_skinAutoHide); } flvplayback_internal function dispatchMessage(_arg1:int):void{ var cachedActivePlayerIndex:int; var ctrl:Sprite; var ctrlData:ControlData; var handle:Sprite; var index = _arg1; if ((((index == SEEK_BAR_HANDLE)) || ((index == SEEK_BAR_HIT)))){ _vc._scrubStart(); }; cachedActivePlayerIndex = _vc.activeVideoPlayerIndex; _vc.activeVideoPlayerIndex = _vc.visibleVideoPlayerIndex; switch (index){ case PAUSE_BUTTON: _vc.pause(); break; case PLAY_BUTTON: _vc.play(); break; case STOP_BUTTON: _vc.stop(); break; case SEEK_BAR_HIT: case SEEK_BAR_HANDLE: ctrl = controls[SEEK_BAR]; ctrlData = ctrlDataDict[ctrl]; calcPercentageFromHandle(ctrl); _lastScrubPos = ctrlData.percentage; if (index == SEEK_BAR_HIT){ handle = controls[SEEK_BAR_HANDLE]; handle.x = handle.parent.mouseX; handle.y = handle.parent.mouseY; }; _vc.removeEventListener(VideoEvent.PLAYHEAD_UPDATE, handleIVPEvent); if (((_vc.playing) || (_vc.buffering))){ _playAfterScrub = true; } else { if (_vc.state != VideoState.SEEKING){ _playAfterScrub = false; }; }; _seekBarTimer.start(); startHandleDrag(ctrl); _vc.pause(); break; case VOLUME_BAR_HIT: case VOLUME_BAR_HANDLE: ctrl = controls[VOLUME_BAR]; ctrlData = ctrlDataDict[ctrl]; calcPercentageFromHandle(ctrl); _lastVolumePos = ctrlData.percentage; if (index == VOLUME_BAR_HIT){ handle = controls[VOLUME_BAR_HANDLE]; handle.x = handle.parent.mouseX; handle.y = handle.parent.mouseY; }; _vc.removeEventListener(SoundEvent.SOUND_UPDATE, handleSoundEvent); _volumeBarTimer.start(); startHandleDrag(ctrl); break; case BACK_BUTTON: _vc.seekToPrevNavCuePoint(); break; case FORWARD_BUTTON: _vc.seekToNextNavCuePoint(); break; case MUTE_ON_BUTTON: if (!_isMuted){ _isMuted = true; cachedSoundLevel = _vc.volume; _vc.volume = 0; setEnabledAndVisibleForState(MUTE_OFF_BUTTON, VideoState.PLAYING); skinButtonControl(controls[MUTE_OFF_BUTTON]); setEnabledAndVisibleForState(MUTE_ON_BUTTON, VideoState.PLAYING); skinButtonControl(controls[MUTE_ON_BUTTON]); }; break; case MUTE_OFF_BUTTON: if (_isMuted){ _isMuted = false; _vc.volume = cachedSoundLevel; setEnabledAndVisibleForState(MUTE_OFF_BUTTON, VideoState.PLAYING); skinButtonControl(controls[MUTE_OFF_BUTTON]); setEnabledAndVisibleForState(MUTE_ON_BUTTON, VideoState.PLAYING); skinButtonControl(controls[MUTE_ON_BUTTON]); }; break; case FULL_SCREEN_ON_BUTTON: if (((!(_fullScreen)) && (!((_vc.stage == null))))){ enterFullScreenDisplayState(); setEnabledAndVisibleForState(FULL_SCREEN_OFF_BUTTON, VideoState.PLAYING); skinButtonControl(controls[FULL_SCREEN_OFF_BUTTON]); setEnabledAndVisibleForState(FULL_SCREEN_ON_BUTTON, VideoState.PLAYING); skinButtonControl(controls[FULL_SCREEN_ON_BUTTON]); }; break; case FULL_SCREEN_OFF_BUTTON: if (((_fullScreen) && (!((_vc.stage == null))))){ try { _vc.stage.displayState = StageDisplayState.NORMAL; } catch(se:SecurityError) { }; setEnabledAndVisibleForState(FULL_SCREEN_OFF_BUTTON, VideoState.PLAYING); skinButtonControl(controls[FULL_SCREEN_OFF_BUTTON]); setEnabledAndVisibleForState(FULL_SCREEN_ON_BUTTON, VideoState.PLAYING); skinButtonControl(controls[FULL_SCREEN_ON_BUTTON]); }; break; default: throw (new Error("Unknown ButtonControl")); }; _vc.activeVideoPlayerIndex = cachedActivePlayerIndex; } flvplayback_internal function handleFullScreenEvent(_arg1:FullScreenEvent):void{ _fullScreen = _arg1.fullScreen; setEnabledAndVisibleForState(FULL_SCREEN_OFF_BUTTON, VideoState.PLAYING); skinButtonControl(controls[FULL_SCREEN_OFF_BUTTON]); setEnabledAndVisibleForState(FULL_SCREEN_ON_BUTTON, VideoState.PLAYING); skinButtonControl(controls[FULL_SCREEN_ON_BUTTON]); if (((_fullScreen) && (_fullScreenTakeOver))){ enterFullScreenTakeOver(); } else { if (!_fullScreen){ exitFullScreenTakeOver(); }; }; } flvplayback_internal function handleLayoutEvent(_arg1:LayoutEvent):void{ var _local2:int; if (((((((_fullScreen) && (_fullScreenTakeOver))) && (_fullScreenAccel))) && (!((_vc.stage == null))))){ if (((((((((!((_vc.registrationX == 0))) || (!((_vc.registrationY == 0))))) || (!((_vc.parent == _vc.stage))))) || (!((_vc.registrationWidth == _vc.stage.stageWidth))))) || (!((_vc.registrationHeight == _vc.stage.stageHeight))))){ _vc.stage.displayState = StageDisplayState.NORMAL; return; }; _local2 = _vc.activeVideoPlayerIndex; _vc.activeVideoPlayerIndex = _vc.visibleVideoPlayerIndex; if (_vc.align != VideoAlign.CENTER){ cacheFLVPlaybackAlign[_vc.visibleVideoPlayerIndex] = _vc.align; _vc.align = VideoAlign.CENTER; }; if (_vc.scaleMode != VideoScaleMode.MAINTAIN_ASPECT_RATIO){ cacheFLVPlaybackScaleMode[_vc.visibleVideoPlayerIndex] = _vc.scaleMode; _vc.scaleMode = VideoScaleMode.MAINTAIN_ASPECT_RATIO; _vc.activeVideoPlayerIndex = _local2; return; }; _vc.activeVideoPlayerIndex = _local2; }; layoutSkin(); setupSkinAutoHide(false); } flvplayback_internal function seekBarListener(_arg1:TimerEvent):void{ var _local2:int; var _local3:Sprite; var _local4:ControlData; var _local5:Number; _local2 = _vc.activeVideoPlayerIndex; _vc.activeVideoPlayerIndex = _vc.visibleVideoPlayerIndex; _local3 = controls[SEEK_BAR]; if (_local3 == null){ return; }; _local4 = ctrlDataDict[_local3]; calcPercentageFromHandle(_local3); _local5 = _local4.percentage; if (_arg1 == null){ _seekBarTimer.stop(); if (_local5 != _lastScrubPos){ _vc.seekPercent(_local5); }; _vc.addEventListener(VideoEvent.PLAYHEAD_UPDATE, handleIVPEvent); if (_playAfterScrub){ _vc.play(); }; } else { if (_vc.getVideoPlayer(_vc.visibleVideoPlayerIndex).state == VideoState.SEEKING){ } else { if ((((((((_seekBarScrubTolerance <= 0)) || ((Math.abs((_local5 - _lastScrubPos)) > _seekBarScrubTolerance)))) || ((_local5 < _seekBarScrubTolerance)))) || ((_local5 > (100 - _seekBarScrubTolerance))))){ if (_local5 != _lastScrubPos){ _lastScrubPos = _local5; _vc.seekPercent(_local5); }; }; }; }; _vc.activeVideoPlayerIndex = _local2; } public function get seekBarInterval():Number{ return (_seekBarTimer.delay); } public function set skinAutoHide(_arg1:Boolean):void{ if (_arg1 == _skinAutoHide){ return; }; _skinAutoHide = _arg1; cacheSkinAutoHide = _arg1; setupSkinAutoHide(true); } flvplayback_internal function setCustomClip(_arg1:DisplayObject):void{ var dCopy:DisplayObject; var ctrlData:ControlData; var scale9Grid:Rectangle; var diff:Number; var numBorderBitmaps:int; var i:int; var lastXDim:Number; var floorLastXDim:Number; var lastYDim:Number; var floorLastYDim:Number; var newRect:Rectangle; var dispObj = _arg1; dCopy = new (dispObj["constructor"]); skin_mc.addChild(dCopy); ctrlData = new ControlData(this, dCopy, null, -1); ctrlDataDict[dCopy] = ctrlData; ctrlData.avatar = dispObj; customClips.push(dCopy); if (dispObj.name == "border_mc"){ border_mc = dCopy; try { borderCopy = (ctrlData.avatar["colorMe"]) ? new Sprite() : null; } catch(re:ReferenceError) { borderCopy = null; }; if (borderCopy != null){ border_mc.visible = false; scale9Grid = border_mc.scale9Grid; scale9Grid.x = Math.round(scale9Grid.x); scale9Grid.y = Math.round(scale9Grid.y); scale9Grid.width = Math.round(scale9Grid.width); diff = ((scale9Grid.x + scale9Grid.width) - border_mc.scale9Grid.right); if (diff > 0.5){ scale9Grid.width--; } else { if (diff < -0.5){ scale9Grid.width++; }; }; scale9Grid.height = Math.round(scale9Grid.height); diff = ((scale9Grid.y + scale9Grid.height) - border_mc.scale9Grid.bottom); if (diff > 0.5){ scale9Grid.height--; } else { if (diff < -0.5){ scale9Grid.height++; }; }; if (scale9Grid != null){ borderScale9Rects = new Array(); lastXDim = (border_mc.width - (scale9Grid.x + scale9Grid.width)); floorLastXDim = Math.floor(lastXDim); if ((lastXDim - floorLastXDim) < 0.05){ lastXDim = floorLastXDim; } else { lastXDim = (floorLastXDim + 1); }; lastYDim = (border_mc.height - (scale9Grid.y + scale9Grid.height)); floorLastYDim = Math.floor(lastYDim); if ((lastYDim - floorLastYDim) < 0.05){ lastYDim = floorLastYDim; } else { lastYDim = (floorLastYDim + 1); }; newRect = new Rectangle(0, 0, scale9Grid.x, scale9Grid.y); borderScale9Rects.push(((((newRect.width < 1)) || ((newRect.height < 1)))) ? null : newRect); newRect = new Rectangle(scale9Grid.x, 0, scale9Grid.width, scale9Grid.y); borderScale9Rects.push(((((newRect.width < 1)) || ((newRect.height < 1)))) ? null : newRect); newRect = new Rectangle((scale9Grid.x + scale9Grid.width), 0, lastXDim, scale9Grid.y); borderScale9Rects.push(((((newRect.width < 1)) || ((newRect.height < 1)))) ? null : newRect); newRect = new Rectangle(0, scale9Grid.y, scale9Grid.x, scale9Grid.height); borderScale9Rects.push(((((newRect.width < 1)) || ((newRect.height < 1)))) ? null : newRect); newRect = new Rectangle(scale9Grid.x, scale9Grid.y, scale9Grid.width, scale9Grid.height); borderScale9Rects.push(((((newRect.width < 1)) || ((newRect.height < 1)))) ? null : newRect); newRect = new Rectangle((scale9Grid.x + scale9Grid.width), scale9Grid.y, lastXDim, scale9Grid.height); borderScale9Rects.push(((((newRect.width < 1)) || ((newRect.height < 1)))) ? null : newRect); newRect = new Rectangle(0, (scale9Grid.y + scale9Grid.height), scale9Grid.x, lastYDim); borderScale9Rects.push(((((newRect.width < 1)) || ((newRect.height < 1)))) ? null : newRect); newRect = new Rectangle(scale9Grid.x, (scale9Grid.y + scale9Grid.height), scale9Grid.width, lastYDim); borderScale9Rects.push(((((newRect.width < 1)) || ((newRect.height < 1)))) ? null : newRect); newRect = new Rectangle((scale9Grid.x + scale9Grid.width), (scale9Grid.y + scale9Grid.height), lastXDim, lastYDim); borderScale9Rects.push(((((newRect.width < 1)) || ((newRect.height < 1)))) ? null : newRect); i = 0; while (i < borderScale9Rects.length) { if (borderScale9Rects[i] != null){ break; }; i = (i + 1); }; if (i >= borderScale9Rects.length){ borderScale9Rects = null; }; }; numBorderBitmaps = ((borderScale9Rects)==null) ? 1 : 9; i = 0; while (i < numBorderBitmaps) { if ((((borderScale9Rects == null)) || (!((borderScale9Rects[i] == null))))){ borderCopy.addChild(new Bitmap()); }; i = (i + 1); }; skin_mc.addChild(borderCopy); borderPrevRect = null; }; }; } public function get fullScreenSkinDelay():int{ return (_skinAutoHideMotionTimeout); } flvplayback_internal function doBufferingDelay(_arg1:TimerEvent):void{ var _local2:int; _bufferingDelayTimer.reset(); _local2 = _vc.activeVideoPlayerIndex; _vc.activeVideoPlayerIndex = _vc.visibleVideoPlayerIndex; if (_vc.state == VideoState.BUFFERING){ _bufferingOn = true; handleIVPEvent(new VideoEvent(VideoEvent.STATE_CHANGE, false, false, VideoState.BUFFERING, NaN, _vc.visibleVideoPlayerIndex)); }; _vc.activeVideoPlayerIndex = _local2; } flvplayback_internal function volumeBarListener(_arg1:TimerEvent):void{ var _local2:Sprite; var _local3:ControlData; var _local4:Number; var _local5:Boolean; _local2 = controls[VOLUME_BAR]; if (_local2 == null){ return; }; _local3 = ctrlDataDict[_local2]; calcPercentageFromHandle(_local2); _local4 = _local3.percentage; _local5 = (_arg1 == null); if (_local5){ _volumeBarTimer.stop(); _vc.addEventListener(SoundEvent.SOUND_UPDATE, handleSoundEvent); }; if (((((((((_local5) || ((_volumeBarScrubTolerance <= 0)))) || ((Math.abs((_local4 - _lastVolumePos)) > _volumeBarScrubTolerance)))) || ((_local4 < _volumeBarScrubTolerance)))) || ((_local4 > (100 - _volumeBarScrubTolerance))))){ if (_local4 != _lastVolumePos){ if (_isMuted){ cachedSoundLevel = (_local4 / 100); } else { _vc.volume = (_local4 / 100); }; _lastVolumePos = _local4; }; }; } public function get visible():Boolean{ return (__visible); } flvplayback_internal function fixUpBar(_arg1:DisplayObject, _arg2:String, _arg3:DisplayObject, _arg4:String):void{ var ctrlData:ControlData; var bar:DisplayObject; var barData:ControlData; var definitionHolder = _arg1; var propPrefix = _arg2; var ctrl = _arg3; var name = _arg4; ctrlData = ctrlDataDict[ctrl]; if (ctrlData[name] != null){ return; }; try { bar = ctrl[name]; } catch(re:ReferenceError) { bar = null; }; if (bar == null){ try { bar = createSkin(definitionHolder, (propPrefix + "LinkageID")); } catch(ve:VideoError) { bar = null; }; if (bar == null){ return; }; if (ctrl.parent != null){ if (getBooleanPropSafe(ctrl, (propPrefix + "Below"))){ ctrl.parent.addChildAt(bar, ctrl.parent.getChildIndex(ctrl)); } else { ctrl.parent.addChild(bar); }; }; }; ctrlData[name] = bar; barData = ctrlDataDict[bar]; if (barData == null){ barData = new ControlData(this, bar, ctrl, -1); ctrlDataDict[bar] = barData; }; } public function get volumeBarInterval():Number{ return (_volumeBarTimer.delay); } public function get bufferingBarHidesAndDisablesOthers():Boolean{ return (_bufferingBarHides); } flvplayback_internal function calcLayoutControl(_arg1:DisplayObject):Rectangle{ var rect:Rectangle; var ctrlData:ControlData; var anchorRight:Boolean; var anchorLeft:Boolean; var anchorTop:Boolean; var anchorBottom:Boolean; var ctrl = _arg1; rect = new Rectangle(); if (ctrl == null){ return (rect); }; ctrlData = ctrlDataDict[ctrl]; if (ctrlData == null){ return (rect); }; if (ctrlData.avatar == null){ return (rect); }; anchorRight = false; anchorLeft = true; anchorTop = false; anchorBottom = true; try { anchorRight = ctrlData.avatar["anchorRight"]; } catch(re1:ReferenceError) { anchorRight = false; }; try { anchorLeft = ctrlData.avatar["anchorLeft"]; } catch(re1:ReferenceError) { anchorLeft = true; }; try { anchorTop = ctrlData.avatar["anchorTop"]; } catch(re1:ReferenceError) { anchorTop = false; }; try { anchorBottom = ctrlData.avatar["anchorBottom"]; } catch(re1:ReferenceError) { anchorBottom = true; }; if (anchorRight){ if (anchorLeft){ rect.x = ((ctrlData.avatar.x - placeholderLeft) + videoLeft); rect.width = ((((ctrlData.avatar.x + ctrlData.avatar.width) - placeholderRight) + videoRight) - rect.x); ctrlData.origWidth = NaN; } else { rect.x = ((ctrlData.avatar.x - placeholderRight) + videoRight); rect.width = ctrl.width; }; } else { rect.x = ((ctrlData.avatar.x - placeholderLeft) + videoLeft); rect.width = ctrl.width; }; if (anchorTop){ if (anchorBottom){ rect.y = ((ctrlData.avatar.y - placeholderTop) + videoTop); rect.height = ((((ctrlData.avatar.y + ctrlData.avatar.height) - placeholderBottom) + videoBottom) - rect.y); ctrlData.origHeight = NaN; } else { rect.y = ((ctrlData.avatar.y - placeholderTop) + videoTop); rect.height = ctrl.height; }; } else { rect.y = ((ctrlData.avatar.y - placeholderBottom) + videoBottom); rect.height = ctrl.height; }; try { if ((ctrl["layoutSelf"] is Function)){ rect = ctrl["layoutSelf"](rect); }; } catch(re3:ReferenceError) { }; return (rect); } flvplayback_internal function skinFadeMore(_arg1:TimerEvent):void{ var _local2:Number; if (((((!(_skinFadingIn)) && ((skin_mc.alpha <= 0.5)))) || (((_skinFadingIn) && ((skin_mc.alpha >= 0.95)))))){ skin_mc.visible = _skinFadingIn; skin_mc.alpha = 1; _skinFadingTimer.stop(); } else { _local2 = ((getTimer() - _skinFadeStartTime) / _skinFadingMaxTime); if (!_skinFadingIn){ _local2 = (1 - _local2); }; if (_local2 < 0){ _local2 = 0; } else { if (_local2 > 1){ _local2 = 1; }; }; skin_mc.alpha = _local2; }; } flvplayback_internal function bitmapCopyBorder():void{ var _local1:Rectangle; var _local2:BitmapData; var _local3:Matrix; var _local4:Number; var _local5:Number; var _local6:Rectangle; var _local7:int; var _local8:Number; var _local9:Number; var _local10:int; var _local11:Bitmap; var _local12:Number; var _local13:Number; if ((((border_mc == null)) || ((borderCopy == null)))){ return; }; _local1 = border_mc.getBounds(skin_mc); if ((((borderPrevRect == null)) || (!(borderPrevRect.equals(_local1))))){ borderCopy.x = _local1.x; borderCopy.y = _local1.y; _local3 = new Matrix(border_mc.scaleX, 0, 0, border_mc.scaleY, 0, 0); if (borderScale9Rects == null){ _local2 = new BitmapData(_local1.width, _local1.height, true, 0); _local2.draw(border_mc, _local3, borderColorTransform); Bitmap(borderCopy.getChildAt(0)).bitmapData = _local2; } else { _local4 = 0; _local5 = 0; _local6 = new Rectangle(0, 0, 0, 0); _local7 = 0; _local8 = 0; if (borderScale9Rects[3] != null){ _local8 = (_local8 + borderScale9Rects[3].width); }; if (borderScale9Rects[5] != null){ _local8 = (_local8 + borderScale9Rects[5].width); }; _local9 = 0; if (borderScale9Rects[1] != null){ _local9 = (_local9 + borderScale9Rects[1].height); }; if (borderScale9Rects[7] != null){ _local9 = (_local9 + borderScale9Rects[7].height); }; _local10 = 0; while (_local10 < borderScale9Rects.length) { if ((_local10 % 3) == 0){ _local4 = 0; _local5 = (_local5 + _local6.height); }; if (borderScale9Rects[_local10] == null){ } else { _local6 = Rectangle(borderScale9Rects[_local10]).clone(); _local3.a = 1; if ((((((_local10 == 1)) || ((_local10 == 4)))) || ((_local10 == 7)))){ _local12 = ((_local1.width - _local8) / _local6.width); _local6.x = (_local6.x * _local12); _local6.width = (_local6.width * _local12); _local6.width = Math.round(_local6.width); _local3.a = (_local3.a * _local12); }; _local3.tx = -(_local6.x); _local6.x = 0; _local3.d = 1; if ((((_local10 >= 3)) && ((_local10 <= 5)))){ _local13 = ((_local1.height - _local9) / _local6.height); _local6.y = (_local6.y * _local13); _local6.height = (_local6.height * _local13); _local6.height = Math.round(_local6.height); _local3.d = (_local3.d * _local13); }; _local3.ty = -(_local6.y); _local6.y = 0; _local2 = new BitmapData(_local6.width, _local6.height, true, 0); _local2.draw(border_mc, _local3, borderColorTransform, null, _local6, false); _local11 = Bitmap(borderCopy.getChildAt(_local7)); _local7++; _local11.bitmapData = _local2; _local11.x = _local4; _local11.y = _local5; _local4 = (_local4 + _local6.width); }; _local10++; }; }; borderPrevRect = _local1; }; } flvplayback_internal function resetPlayPause():void{ var _local1:int; if (controls[PLAY_PAUSE_BUTTON] == undefined){ return; }; _local1 = PAUSE_BUTTON; while (_local1 <= PLAY_BUTTON) { removeButtonListeners(controls[_local1]); delete ctrlDataDict[controls[_local1]]; delete controls[_local1]; _local1++; }; delete ctrlDataDict[controls[PLAY_PAUSE_BUTTON]]; delete controls[PLAY_PAUSE_BUTTON]; } public function setControl(_arg1:int, _arg2:Sprite):void{ var ctrlData:ControlData; var index = _arg1; var ctrl = _arg2; if (ctrl == controls[index]){ return; }; switch (index){ case PAUSE_BUTTON: case PLAY_BUTTON: resetPlayPause(); break; case PLAY_PAUSE_BUTTON: if ((((ctrl == null)) || (!((ctrl.parent == skin_mc))))){ resetPlayPause(); }; if (ctrl != null){ setControl(PAUSE_BUTTON, Sprite(ctrl.getChildByName("pause_mc"))); setControl(PLAY_BUTTON, Sprite(ctrl.getChildByName("play_mc"))); }; break; case FULL_SCREEN_BUTTON: if (ctrl != null){ setControl(FULL_SCREEN_ON_BUTTON, Sprite(ctrl.getChildByName("on_mc"))); setControl(FULL_SCREEN_OFF_BUTTON, Sprite(ctrl.getChildByName("off_mc"))); }; break; case MUTE_BUTTON: if (ctrl != null){ setControl(MUTE_ON_BUTTON, Sprite(ctrl.getChildByName("on_mc"))); setControl(MUTE_OFF_BUTTON, Sprite(ctrl.getChildByName("off_mc"))); }; break; }; if (controls[index] != null){ try { delete controls[index]["uiMgr"]; } catch(re:ReferenceError) { }; if (index < NUM_BUTTONS){ removeButtonListeners(controls[index]); }; delete ctrlDataDict[controls[index]]; delete controls[index]; }; if (ctrl == null){ return; }; ctrlData = ctrlDataDict[ctrl]; if (ctrlData == null){ ctrlData = new ControlData(this, ctrl, null, index); ctrlDataDict[ctrl] = ctrlData; } else { ctrlData.index = index; }; if (index >= NUM_BUTTONS){ controls[index] = ctrl; switch (index){ case SEEK_BAR: addBarControl(ctrl); break; case VOLUME_BAR: addBarControl(ctrl); ctrlData.percentage = (_vc.volume * 100); break; case BUFFERING_BAR: if (ctrl.parent == skin_mc){ finishAddBufferingBar(); } else { ctrl.addEventListener(Event.ENTER_FRAME, finishAddBufferingBar); }; break; }; setEnabledAndVisibleForState(index, _vc.state); } else { controls[index] = ctrl; addButtonControl(ctrl); }; } flvplayback_internal function createSkin(_arg1:DisplayObject, _arg2:String):DisplayObject{ var stateSkinDesc:*; var theClass:Class; var definitionHolder = _arg1; var skinName = _arg2; try { stateSkinDesc = definitionHolder[skinName]; if ((stateSkinDesc is String)){ try { theClass = Class(definitionHolder.loaderInfo.applicationDomain.getDefinition(stateSkinDesc)); } catch(err1:Error) { theClass = Class(getDefinitionByName(stateSkinDesc)); }; return (DisplayObject(new (theClass))); } else { if ((stateSkinDesc is Class)){ return (new (stateSkinDesc)); } else { if ((stateSkinDesc is DisplayObject)){ return (stateSkinDesc); }; }; }; } catch(err2:Error) { throw (new VideoError(VideoError.MISSING_SKIN_STYLE, skinName)); }; return (null); } flvplayback_internal function addButtonControl(_arg1:Sprite):void{ var _local2:ControlData; var _local3:int; if (_arg1 == null){ return; }; _local2 = ctrlDataDict[_arg1]; _arg1.mouseChildren = false; _local3 = _vc.activeVideoPlayerIndex; _vc.activeVideoPlayerIndex = _vc.visibleVideoPlayerIndex; _local2.state = NORMAL_STATE; setEnabledAndVisibleForState(_local2.index, _vc.state); _arg1.addEventListener(MouseEvent.ROLL_OVER, handleButtonEvent); _arg1.addEventListener(MouseEvent.ROLL_OUT, handleButtonEvent); _arg1.addEventListener(MouseEvent.MOUSE_DOWN, handleButtonEvent); _arg1.addEventListener(MouseEvent.CLICK, handleButtonEvent); if (_arg1.parent == skin_mc){ skinButtonControl(_arg1); } else { _arg1.addEventListener(Event.ENTER_FRAME, skinButtonControl); }; _vc.activeVideoPlayerIndex = _local3; } flvplayback_internal function hookUpCustomComponents():void{ var searchHash:Object; var doTheSearch:Boolean; var i:int; var dispObj:DisplayObject; var name:String; var index:int; var ctrl:Sprite; searchHash = new Object(); doTheSearch = false; i = 0; while (i < NUM_CONTROLS) { if (controls[i] == null){ searchHash[customComponentClassNames[i]] = i; doTheSearch = true; }; i = (i + 1); }; if (!doTheSearch){ return; }; i = 0; while (i < _vc.parent.numChildren) { dispObj = _vc.parent.getChildAt(i); name = getQualifiedClassName(dispObj); if (searchHash[name] != undefined){ if (typeof(searchHash[name]) == "number"){ index = int(searchHash[name]); try { ctrl = Sprite(dispObj); if ((((((index >= NUM_BUTTONS)) || ((ctrl["placeholder_mc"] is DisplayObject)))) && ((ctrl["uiMgr"] == null)))){ setControl(index, ctrl); searchHash[name] = ctrl; }; } catch(err:Error) { }; }; }; i = (i + 1); }; } flvplayback_internal function positionHandle(_arg1:Sprite):void{ var _local2:ControlData; var _local3:Sprite; var _local4:ControlData; var _local5:Number; var _local6:Number; if (_arg1 == null){ return; }; if ((((_arg1["positionHandle"] is Function)) && (_arg1["positionHandle"]()))){ return; }; _local2 = ctrlDataDict[_arg1]; _local3 = _local2.handle_mc; if (_local3 == null){ return; }; _local4 = ctrlDataDict[_local3]; _local5 = (isNaN(_local2.origWidth)) ? _arg1.width : _local2.origWidth; _local6 = ((_local5 - _local4.rightMargin) - _local4.leftMargin); _local3.x = ((_arg1.x + _local4.leftMargin) + ((_local6 * _local2.percentage) / 100)); _local3.y = (_arg1.y + _local4.origY); if (_local2.fullness_mc != null){ positionBar(_arg1, "fullness", _local2.percentage); }; } flvplayback_internal function exitFullScreenTakeOver():void{ var fullScreenBG:Sprite; var cacheActiveIndex:int; var i:int; var vp:VideoPlayer; if (cacheFLVPlaybackParent == null){ return; }; _vc.removeEventListener(Event.ADDED_TO_STAGE, handleEvent); _vc.stage.removeEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreenEvent); try { if (_fullScreenAccel){ _vc.stage.fullScreenSourceRect = new Rectangle(0, 0, -1, -1); } else { _vc.stage.align = cacheStageAlign; _vc.stage.scaleMode = cacheStageScaleMode; }; fullScreenBG = Sprite(_vc.getChildByName("fullScreenBG")); if (fullScreenBG != null){ _vc.removeChild(fullScreenBG); }; if (_vc.parent != cacheFLVPlaybackParent){ cacheFLVPlaybackParent.addChildAt(_vc, cacheFLVPlaybackIndex); } else { cacheFLVPlaybackParent.setChildIndex(_vc, cacheFLVPlaybackIndex); }; cacheActiveIndex = _vc.activeVideoPlayerIndex; i = 0; while (i < _vc.videoPlayers.length) { vp = (_vc.videoPlayers[i] as VideoPlayer); if (vp != null){ _vc.activeVideoPlayerIndex = i; if (cacheFLVPlaybackScaleMode[i] != undefined){ _vc.scaleMode = cacheFLVPlaybackScaleMode[i]; }; if (cacheFLVPlaybackAlign[i]){ _vc.align = cacheFLVPlaybackAlign[i]; }; }; i = (i + 1); }; _vc.activeVideoPlayerIndex = cacheActiveIndex; _vc.registrationX = cacheFLVPlaybackLocation.x; _vc.registrationY = cacheFLVPlaybackLocation.y; _vc.setSize(cacheFLVPlaybackLocation.width, cacheFLVPlaybackLocation.height); } catch(err:Error) { }; _vc.addEventListener(Event.ADDED_TO_STAGE, handleEvent); _vc.stage.addEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreenEvent); _fullScreen = false; _fullScreenAccel = false; cacheStageAlign = null; cacheStageScaleMode = null; cacheFLVPlaybackParent = null; cacheFLVPlaybackIndex = 0; cacheFLVPlaybackLocation = null; cacheFLVPlaybackScaleMode = null; cacheFLVPlaybackAlign = null; if (_skinAutoHide != cacheSkinAutoHide){ _skinAutoHide = cacheSkinAutoHide; setupSkinAutoHide(false); }; } flvplayback_internal function positionMaskedFill(_arg1:DisplayObject, _arg2:Number):void{ var ctrlData:ControlData; var fill:DisplayObject; var mask:DisplayObject; var fillData:ControlData; var maskData:ControlData; var slideReveal:Boolean; var maskSprite:Sprite; var barData:ControlData; var ctrl = _arg1; var percent = _arg2; if (ctrl == null){ return; }; ctrlData = ctrlDataDict[ctrl]; fill = ctrlData.fill_mc; if (fill == null){ return; }; mask = ctrlData.mask_mc; if (ctrlData.mask_mc == null){ try { var _local4 = ctrl["mask_mc"]; mask = _local4; ctrlData.mask_mc = _local4; } catch(re:ReferenceError) { ctrlData.mask_mc = null; }; if (ctrlData.mask_mc == null){ maskSprite = new Sprite(); _local4 = maskSprite; mask = _local4; ctrlData.mask_mc = _local4; maskSprite.graphics.beginFill(0xFFFFFF); maskSprite.graphics.drawRect(0, 0, 1, 1); maskSprite.graphics.endFill(); barData = ctrlDataDict[fill]; maskSprite.x = barData.origX; maskSprite.y = barData.origY; maskSprite.width = barData.origWidth; maskSprite.height = barData.origHeight; maskSprite.visible = false; fill.parent.addChild(maskSprite); fill.mask = maskSprite; }; if (ctrlData.mask_mc != null){ calcBarMargins(ctrl, "mask", true); }; }; fillData = ctrlDataDict[fill]; maskData = ctrlDataDict[mask]; try { slideReveal = fill["slideReveal"]; } catch(re:ReferenceError) { slideReveal = false; }; if (fill.parent == ctrl){ if (slideReveal){ fill.x = ((maskData.origX - fillData.origWidth) + ((fillData.origWidth * percent) / 100)); } else { mask.width = ((fillData.origWidth * percent) / 100); }; } else { if (fill.parent == ctrl.parent){ if (slideReveal){ mask.x = (ctrl.x + maskData.leftMargin); mask.y = (ctrl.y + maskData.topMargin); mask.width = ((ctrl.width - maskData.rightMargin) - maskData.leftMargin); mask.height = ((ctrl.height - maskData.topMargin) - maskData.bottomMargin); fill.x = ((mask.x - fillData.origWidth) + ((maskData.origWidth * percent) / 100)); fill.y = (ctrl.y + fillData.topMargin); } else { fill.x = (ctrl.x + fillData.leftMargin); fill.y = (ctrl.y + fillData.topMargin); mask.x = fill.x; mask.y = fill.y; mask.width = ((((ctrl.width - fillData.rightMargin) - fillData.leftMargin) * percent) / 100); mask.height = ((ctrl.height - fillData.topMargin) - fillData.bottomMargin); }; }; }; } flvplayback_internal function calcPercentageFromHandle(_arg1:Sprite):void{ var _local2:ControlData; var _local3:Sprite; var _local4:ControlData; var _local5:Number; var _local6:Number; var _local7:Number; if (_arg1 == null){ return; }; _local2 = ctrlDataDict[_arg1]; if ((((_arg1["calcPercentageFromHandle"] is Function)) && (_arg1["calcPercentageFromHandle"]()))){ if (_local2.percentage < 0){ _local2.percentage = 0; }; if (_local2.percentage > 100){ _local2.percentage = 100; }; return; }; _local3 = _local2.handle_mc; if (_local3 == null){ return; }; _local4 = ctrlDataDict[_local3]; _local5 = (isNaN(_local2.origWidth)) ? _arg1.width : _local2.origWidth; _local6 = ((_local5 - _local4.rightMargin) - _local4.leftMargin); _local7 = (_local3.x - (_arg1.x + _local4.leftMargin)); _local2.percentage = ((_local7 / _local6) * 100); if (_local2.percentage < 0){ _local2.percentage = 0; }; if (_local2.percentage > 100){ _local2.percentage = 100; }; if (_local2.fullness_mc != null){ positionBar(_arg1, "fullness", _local2.percentage); }; } flvplayback_internal function handleRelease(_arg1:int):void{ var _local2:int; _local2 = _vc.activeVideoPlayerIndex; _vc.activeVideoPlayerIndex = _vc.visibleVideoPlayerIndex; if (_arg1 == SEEK_BAR){ seekBarListener(null); } else { if (_arg1 == VOLUME_BAR){ volumeBarListener(null); }; }; stopHandleDrag(controls[_arg1]); _vc.activeVideoPlayerIndex = _local2; if (_arg1 == SEEK_BAR){ _vc._scrubFinish(); }; } flvplayback_internal function setTwoButtonHolderSkin(_arg1:int, _arg2:int, _arg3:String, _arg4:int, _arg5:String):Sprite{ var _local6:Sprite; var _local7:Sprite; var _local8:ControlData; _local7 = new Sprite(); _local8 = new ControlData(this, _local7, null, _arg1); ctrlDataDict[_local7] = _local8; skin_mc.addChild(_local7); _local6 = setupButtonSkin(_arg2); _local6.name = _arg3; _local6.visible = true; _local7.addChild(_local6); _local6 = setupButtonSkin(_arg4); _local6.name = _arg5; _local6.visible = false; _local7.addChild(_local6); return (_local7); } flvplayback_internal function skinAutoHideHitTest(_arg1:TimerEvent, _arg2:Boolean=true):void{ var visibleVP:VideoPlayer; var hit:Boolean; var e = _arg1; var doFade = _arg2; try { if (!__visible){ skin_mc.visible = false; } else { if (_vc.stage != null){ visibleVP = _vc.getVideoPlayer(_vc.visibleVideoPlayerIndex); hit = visibleVP.hitTestPoint(_vc.stage.mouseX, _vc.stage.mouseY, true); if (((((_fullScreen) && (_fullScreenTakeOver))) && (!((e == null))))){ if ((((_vc.stage.mouseX == _skinAutoHideMouseX)) && ((_vc.stage.mouseY == _skinAutoHideMouseY)))){ if ((getTimer() - _skinAutoHideLastMotionTime) > _skinAutoHideMotionTimeout){ hit = false; }; } else { _skinAutoHideLastMotionTime = getTimer(); _skinAutoHideMouseX = _vc.stage.mouseX; _skinAutoHideMouseY = _vc.stage.mouseY; }; }; if (((!(hit)) && (!((border_mc == null))))){ hit = border_mc.hitTestPoint(_vc.stage.mouseX, _vc.stage.mouseY, true); if (((((hit) && (_fullScreen))) && (_fullScreenTakeOver))){ _skinAutoHideLastMotionTime = getTimer(); }; }; if (((!(doFade)) || ((_skinFadingMaxTime <= 0)))){ _skinFadingTimer.stop(); skin_mc.visible = hit; skin_mc.alpha = 1; } else { if (((((((hit) && (skin_mc.visible))) && (((!(_skinFadingTimer.running)) || (_skinFadingIn))))) || (((!(hit)) && (((!(skin_mc.visible)) || (((_skinFadingTimer.running) && (!(_skinFadingIn)))))))))){ } else { _skinFadingTimer.stop(); _skinFadingIn = hit; if (((_skinFadingIn) && ((skin_mc.alpha == 1)))){ skin_mc.alpha = 0; }; _skinFadeStartTime = getTimer(); _skinFadingTimer.start(); skin_mc.visible = true; }; }; }; }; } catch(se:SecurityError) { _skinAutoHideTimer.stop(); _skinFadingTimer.stop(); skin_mc.visible = __visible; skin_mc.alpha = 1; }; } public function set seekBarInterval(_arg1:Number):void{ if (_seekBarTimer.delay == _arg1){ return; }; _seekBarTimer.delay = _arg1; } flvplayback_internal function layoutControl(_arg1:DisplayObject):void{ var _local2:ControlData; var _local3:Rectangle; var _local4:Sprite; var _local5:Rectangle; if (_arg1 == null){ return; }; _local2 = ctrlDataDict[_arg1]; if (_local2 == null){ return; }; if (_local2.avatar == null){ return; }; _local3 = calcLayoutControl(_arg1); _arg1.x = _local3.x; _arg1.y = _local3.y; _arg1.width = _local3.width; _arg1.height = _local3.height; switch (_local2.index){ case SEEK_BAR: case VOLUME_BAR: if (((!((_local2.hit_mc == null))) && ((_local2.hit_mc.parent == skin_mc)))){ _local4 = _local2.hit_mc; _local5 = calcLayoutControl(_local4); _local4.x = _local5.x; _local4.y = _local5.y; _local4.width = _local5.width; _local4.height = _local5.height; }; if (_local2.progress_mc != null){ if (isNaN(_progressPercent)){ _progressPercent = (_vc.isRTMP) ? 100 : 0; }; positionBar(Sprite(_arg1), "progress", _progressPercent); }; positionHandle(Sprite(_arg1)); break; case BUFFERING_BAR: positionMaskedFill(_arg1, 100); break; }; } public function set fullScreenSkinDelay(_arg1:int):void{ _skinAutoHideMotionTimeout = _arg1; } flvplayback_internal function captureMouseEvent(_arg1:MouseEvent):void{ _arg1.stopPropagation(); } flvplayback_internal function handleMouseUp(_arg1:MouseEvent):void{ var _local2:Sprite; var _local3:ControlData; _local2 = controls[mouseCaptureCtrl]; if (_local2 != null){ _local3 = ctrlDataDict[_local2]; _local3.state = (_local2.hitTestPoint(_arg1.stageX, _arg1.stageY, true)) ? OVER_STATE : NORMAL_STATE; skinButtonControl(_local2); switch (mouseCaptureCtrl){ case SEEK_BAR_HANDLE: case SEEK_BAR_HIT: handleRelease(SEEK_BAR); break; case VOLUME_BAR_HANDLE: case VOLUME_BAR_HIT: handleRelease(VOLUME_BAR); break; }; }; _arg1.currentTarget.removeEventListener(MouseEvent.MOUSE_DOWN, captureMouseEvent, true); _arg1.currentTarget.removeEventListener(MouseEvent.MOUSE_OUT, captureMouseEvent, true); _arg1.currentTarget.removeEventListener(MouseEvent.MOUSE_OVER, captureMouseEvent, true); _arg1.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp); _arg1.currentTarget.removeEventListener(MouseEvent.ROLL_OUT, captureMouseEvent, true); _arg1.currentTarget.removeEventListener(MouseEvent.ROLL_OVER, captureMouseEvent, true); } public function set visible(_arg1:Boolean):void{ if (__visible == _arg1){ return; }; __visible = _arg1; if (!__visible){ skin_mc.visible = false; } else { setupSkinAutoHide(false); }; } public function get bufferingDelayInterval():Number{ return (_bufferingDelayTimer.delay); } public function set fullScreenBackgroundColor(_arg1:uint):void{ if (_fullScreenBgColor != _arg1){ _fullScreenBgColor = _arg1; if (_vc){ }; }; } public function get fullScreenTakeOver():Boolean{ return (_fullScreenTakeOver); } public function set skin(_arg1:String):void{ var _local2:String; if (_arg1 == null){ removeSkin(); _skin = null; _skinReady = true; } else { _local2 = String(_arg1); if (_arg1 == _skin){ return; }; removeSkin(); _skin = String(_arg1); _skinReady = (_skin == ""); if (!_skinReady){ downloadSkin(); }; }; } public function set volumeBarInterval(_arg1:Number):void{ if (_volumeBarTimer.delay == _arg1){ return; }; _volumeBarTimer.delay = _arg1; } flvplayback_internal function setSkin(_arg1:int, _arg2:DisplayObject):void{ var _local3:Sprite; var _local4:ControlData; var _local5:String; if (_arg1 >= NUM_CONTROLS){ return; }; if (_arg1 < NUM_BUTTONS){ _local3 = setupButtonSkin(_arg1); skin_mc.addChild(_local3); _local4 = ctrlDataDict[_local3]; } else { switch (_arg1){ case PLAY_PAUSE_BUTTON: _local3 = setTwoButtonHolderSkin(_arg1, PLAY_BUTTON, "play_mc", PAUSE_BUTTON, "pause_mc"); _local4 = ctrlDataDict[_local3]; break; case FULL_SCREEN_BUTTON: _local3 = setTwoButtonHolderSkin(_arg1, FULL_SCREEN_ON_BUTTON, "on_mc", FULL_SCREEN_OFF_BUTTON, "off_mc"); _local4 = ctrlDataDict[_local3]; break; case MUTE_BUTTON: _local3 = setTwoButtonHolderSkin(_arg1, MUTE_ON_BUTTON, "on_mc", MUTE_OFF_BUTTON, "off_mc"); _local4 = ctrlDataDict[_local3]; break; case SEEK_BAR: case VOLUME_BAR: _local5 = skinClassPrefixes[_arg1]; _local3 = Sprite(createSkin(skinTemplate, _local5)); if (_local3 != null){ skin_mc.addChild(_local3); _local4 = new ControlData(this, _local3, null, _arg1); ctrlDataDict[_local3] = _local4; _local4.progress_mc = setupBarSkinPart(_local3, _arg2, skinTemplate, (_local5 + "Progress"), "progress_mc"); _local4.fullness_mc = setupBarSkinPart(_local3, _arg2, skinTemplate, (_local5 + "Fullness"), "fullness_mc"); _local4.hit_mc = Sprite(setupBarSkinPart(_local3, _arg2, skinTemplate, (_local5 + "Hit"), "hit_mc")); _local4.handle_mc = Sprite(setupBarSkinPart(_local3, _arg2, skinTemplate, (_local5 + "Handle"), "handle_mc", true)); _local3.width = _arg2.width; _local3.height = _arg2.height; }; break; case BUFFERING_BAR: _local5 = skinClassPrefixes[_arg1]; _local3 = Sprite(createSkin(skinTemplate, _local5)); if (_local3 != null){ skin_mc.addChild(_local3); _local4 = new ControlData(this, _local3, null, _arg1); ctrlDataDict[_local3] = _local4; _local4.fill_mc = setupBarSkinPart(_local3, _arg2, skinTemplate, (_local5 + "Fill"), "fill_mc"); _local3.width = _arg2.width; _local3.height = _arg2.height; }; break; }; }; _local4.avatar = _arg2; ctrlDataDict[_local3] = _local4; delayedControls[_arg1] = _local3; } public function set bufferingBarHidesAndDisablesOthers(_arg1:Boolean):void{ _bufferingBarHides = _arg1; } flvplayback_internal function handleSoundEvent(_arg1:SoundEvent):void{ var _local2:Sprite; var _local3:ControlData; if (((_isMuted) && ((_arg1.soundTransform.volume > 0)))){ _isMuted = false; setEnabledAndVisibleForState(MUTE_OFF_BUTTON, VideoState.PLAYING); skinButtonControl(controls[MUTE_OFF_BUTTON]); setEnabledAndVisibleForState(MUTE_ON_BUTTON, VideoState.PLAYING); skinButtonControl(controls[MUTE_ON_BUTTON]); }; _local2 = controls[VOLUME_BAR]; if (_local2 != null){ _local3 = ctrlDataDict[_local2]; _local3.percentage = ((_isMuted) ? cachedSoundLevel : _arg1.soundTransform.volume * 100); if (_local3.percentage < 0){ _local3.percentage = 0; } else { if (_local3.percentage > 100){ _local3.percentage = 100; }; }; positionHandle(_local2); }; } flvplayback_internal function stopHandleDrag(_arg1:Sprite):void{ var ctrlData:ControlData; var handle:Sprite; var ctrl = _arg1; if (ctrl == null){ return; }; ctrlData = ctrlDataDict[ctrl]; try { if ((((ctrl["stopHandleDrag"] is Function)) && (ctrl["stopHandleDrag"]()))){ ctrlData.isDragging = false; return; }; } catch(re:ReferenceError) { }; handle = ctrlData.handle_mc; if (handle == null){ return; }; handle.stopDrag(); ctrlData.isDragging = false; } public function set skinBackgroundAlpha(_arg1:Number):void{ if (borderAlpha != _arg1){ borderAlpha = _arg1; borderColorTransform.alphaOffset = (0xFF * _arg1); borderPrevRect = null; layoutSkin(); }; } public function getControl(_arg1:int):Sprite{ return (controls[_arg1]); } public function set skinScaleMaximum(_arg1:Number):void{ _skinScaleMaximum = _arg1; } flvplayback_internal function handleLoad(_arg1:Event):void{ var i:int; var dispObj:DisplayObject; var index:Number; var e = _arg1; try { skin_mc = new Sprite(); if (e != null){ skinTemplate = Sprite(skinLoader.content); }; layout_mc = skinTemplate; customClips = new Array(); delayedControls = new Array(); i = 0; while (i < layout_mc.numChildren) { dispObj = layout_mc.getChildAt(i); index = layoutNameToIndexMappings[dispObj.name]; if (!isNaN(index)){ setSkin(int(index), dispObj); } else { if (dispObj.name != "video_mc"){ setCustomClip(dispObj); }; }; i = (i + 1); }; skinLoadDelayCount = 0; _vc.addEventListener(Event.ENTER_FRAME, finishLoad); } catch(err:Error) { _vc.skinError(err.message); removeSkin(); }; } flvplayback_internal function calcBarMargins(_arg1:DisplayObject, _arg2:String, _arg3:Boolean):void{ var ctrlData:ControlData; var bar:DisplayObject; var barData:ControlData; var ctrl = _arg1; var type = _arg2; var symmetricMargins = _arg3; if (ctrl == null){ return; }; ctrlData = ctrlDataDict[ctrl]; bar = ctrlData[(type + "_mc")]; if (bar == null){ try { bar = ctrl[(type + "_mc")]; } catch(re:ReferenceError) { bar = null; }; if (bar == null){ return; }; ctrlData[(type + "_mc")] = bar; }; barData = ctrlDataDict[bar]; if (barData == null){ barData = new ControlData(this, bar, ctrl, -1); ctrlDataDict[bar] = barData; }; barData.leftMargin = getNumberPropSafe(ctrl, (type + "LeftMargin")); if (((isNaN(barData.leftMargin)) && ((bar.parent == ctrl.parent)))){ barData.leftMargin = (bar.x - ctrl.x); }; barData.rightMargin = getNumberPropSafe(ctrl, (type + "RightMargin")); if (isNaN(barData.rightMargin)){ if (symmetricMargins){ barData.rightMargin = barData.leftMargin; } else { if (bar.parent == ctrl.parent){ barData.rightMargin = (((ctrl.width - bar.width) - bar.x) + ctrl.x); }; }; }; barData.topMargin = getNumberPropSafe(ctrl, (type + "TopMargin")); if (((isNaN(barData.topMargin)) && ((bar.parent == ctrl.parent)))){ barData.topMargin = (bar.y - ctrl.y); }; barData.bottomMargin = getNumberPropSafe(ctrl, (type + "BottomMargin")); if (isNaN(barData.bottomMargin)){ if (symmetricMargins){ barData.bottomMargin = barData.topMargin; } else { if (bar.parent == ctrl.parent){ barData.bottomMargin = (((ctrl.height - bar.height) - bar.y) + ctrl.y); }; }; }; barData.origX = getNumberPropSafe(ctrl, (type + "X")); if (isNaN(barData.origX)){ if (bar.parent == ctrl.parent){ barData.origX = (bar.x - ctrl.x); } else { if (bar.parent == ctrl){ barData.origX = bar.x; }; }; }; barData.origY = getNumberPropSafe(ctrl, (type + "Y")); if (isNaN(barData.origY)){ if (bar.parent == ctrl.parent){ barData.origY = (bar.y - ctrl.y); } else { if (bar.parent == ctrl){ barData.origY = bar.y; }; }; }; barData.origWidth = bar.width; barData.origHeight = bar.height; barData.origScaleX = bar.scaleX; barData.origScaleY = bar.scaleY; } public function set skinBackgroundColor(_arg1:uint):void{ if (borderColor != _arg1){ borderColor = _arg1; borderColorTransform.redOffset = ((borderColor >> 16) & 0xFF); borderColorTransform.greenOffset = ((borderColor >> 8) & 0xFF); borderColorTransform.blueOffset = (borderColor & 0xFF); borderPrevRect = null; layoutSkin(); }; } public function set volumeBarScrubTolerance(_arg1:Number):void{ _volumeBarScrubTolerance = _arg1; } flvplayback_internal function finishAddBufferingBar(_arg1:Event=null):void{ var _local2:Sprite; if (_arg1 != null){ _arg1.currentTarget.removeEventListener(Event.ENTER_FRAME, finishAddBufferingBar); }; _local2 = controls[BUFFERING_BAR]; calcBarMargins(_local2, "fill", true); fixUpBar(_local2, "fill", _local2, "fill_mc"); positionMaskedFill(_local2, 100); } flvplayback_internal function handleButtonEvent(_arg1:MouseEvent):void{ var ctrlData:ControlData; var topLevel:DisplayObject; var e = _arg1; ctrlData = ctrlDataDict[e.currentTarget]; switch (e.type){ case MouseEvent.ROLL_OVER: ctrlData.state = OVER_STATE; break; case MouseEvent.ROLL_OUT: ctrlData.state = NORMAL_STATE; break; case MouseEvent.MOUSE_DOWN: ctrlData.state = DOWN_STATE; mouseCaptureCtrl = ctrlData.index; switch (mouseCaptureCtrl){ case SEEK_BAR_HANDLE: case SEEK_BAR_HIT: case VOLUME_BAR_HANDLE: case VOLUME_BAR_HIT: dispatchMessage(ctrlData.index); break; }; topLevel = _vc.stage; try { topLevel.addEventListener(MouseEvent.MOUSE_DOWN, captureMouseEvent, true); } catch(se:SecurityError) { topLevel = _vc.root; topLevel.addEventListener(MouseEvent.MOUSE_DOWN, captureMouseEvent, true); }; topLevel.addEventListener(MouseEvent.MOUSE_OUT, captureMouseEvent, true); topLevel.addEventListener(MouseEvent.MOUSE_OVER, captureMouseEvent, true); topLevel.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp); topLevel.addEventListener(MouseEvent.ROLL_OUT, captureMouseEvent, true); topLevel.addEventListener(MouseEvent.ROLL_OVER, captureMouseEvent, true); break; case MouseEvent.CLICK: switch (mouseCaptureCtrl){ case SEEK_BAR_HANDLE: case SEEK_BAR_HIT: case VOLUME_BAR_HANDLE: case VOLUME_BAR_HIT: break; default: dispatchMessage(ctrlData.index); break; }; return; }; skinButtonControl(e.currentTarget); } flvplayback_internal function applySkinState(_arg1:ControlData, _arg2:DisplayObject):void{ if (_arg2 != _arg1.currentState_mc){ if (_arg1.currentState_mc != null){ _arg1.currentState_mc.visible = false; }; _arg1.currentState_mc = _arg2; _arg1.currentState_mc.visible = true; }; } flvplayback_internal function handleLoadErrorEvent(_arg1:ErrorEvent):void{ _skinReady = true; _vc.skinError(_arg1.toString()); } flvplayback_internal function addBarControl(_arg1:Sprite):void{ var _local2:ControlData; _local2 = ctrlDataDict[_arg1]; _local2.isDragging = false; _local2.percentage = 0; if ((((_arg1.parent == skin_mc)) && (!((skin_mc == null))))){ finishAddBarControl(_arg1); } else { _arg1.addEventListener(Event.REMOVED_FROM_STAGE, cleanupHandle); _arg1.addEventListener(Event.ENTER_FRAME, finishAddBarControl); }; } flvplayback_internal function handleEvent(_arg1:Event):void{ var e = _arg1; switch (e.type){ case Event.ADDED_TO_STAGE: _fullScreen = false; if (_vc.stage != null){ try { _fullScreen = (_vc.stage.displayState == StageDisplayState.FULL_SCREEN); _vc.stage.addEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreenEvent); } catch(se:SecurityError) { }; }; if (!_fullScreen){ _fullScreenAccel = false; }; setEnabledAndVisibleForState(FULL_SCREEN_OFF_BUTTON, VideoState.PLAYING); skinButtonControl(controls[FULL_SCREEN_OFF_BUTTON]); setEnabledAndVisibleForState(FULL_SCREEN_ON_BUTTON, VideoState.PLAYING); skinButtonControl(controls[FULL_SCREEN_ON_BUTTON]); if (((_fullScreen) && (_fullScreenTakeOver))){ enterFullScreenTakeOver(); } else { if (!_fullScreen){ exitFullScreenTakeOver(); }; }; layoutSkin(); setupSkinAutoHide(false); break; case Event.REMOVED_FROM_STAGE: _vc.stage.removeEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreenEvent); break; }; } flvplayback_internal function skinButtonControl(_arg1:Object):void{ var ctrl:Sprite; var ctrlData:ControlData; var e:Event; var ctrlOrEvent = _arg1; if (ctrlOrEvent == null){ return; }; if ((ctrlOrEvent is Event)){ e = Event(ctrlOrEvent); ctrl = Sprite(e.currentTarget); ctrl.removeEventListener(Event.ENTER_FRAME, skinButtonControl); } else { ctrl = Sprite(ctrlOrEvent); }; ctrlData = ctrlDataDict[ctrl]; if (ctrlData == null){ return; }; try { if (ctrl["placeholder_mc"] != undefined){ ctrl.removeChild(ctrl["placeholder_mc"]); ctrl["placeholder_mc"] = null; }; } catch(re:ReferenceError) { }; if (ctrlData.state_mc == null){ ctrlData.state_mc = new Array(); }; if (ctrlData.state_mc[NORMAL_STATE] == undefined){ ctrlData.state_mc[NORMAL_STATE] = setupButtonSkinState(ctrl, ctrl, buttonSkinLinkageIDs[NORMAL_STATE], null); }; if (((ctrlData.enabled) && (_controlsEnabled))){ if (ctrlData.state_mc[ctrlData.state] == undefined){ ctrlData.state_mc[ctrlData.state] = setupButtonSkinState(ctrl, ctrl, buttonSkinLinkageIDs[ctrlData.state], ctrlData.state_mc[NORMAL_STATE]); }; if (ctrlData.state_mc[ctrlData.state] != ctrlData.currentState_mc){ if (ctrlData.currentState_mc != null){ ctrlData.currentState_mc.visible = false; }; ctrlData.currentState_mc = ctrlData.state_mc[ctrlData.state]; ctrlData.currentState_mc.visible = true; }; applySkinState(ctrlData, ctrlData.state_mc[ctrlData.state]); } else { ctrlData.state = NORMAL_STATE; if (ctrlData.disabled_mc == null){ ctrlData.disabled_mc = setupButtonSkinState(ctrl, ctrl, "disabledLinkageID", ctrlData.state_mc[NORMAL_STATE]); }; applySkinState(ctrlData, ctrlData.disabled_mc); }; } public function set controlsEnabled(_arg1:Boolean):void{ var _local2:int; if (_controlsEnabled == _arg1){ return; }; _controlsEnabled = _arg1; _local2 = 0; while (_local2 < NUM_BUTTONS) { skinButtonControl(controls[_local2]); _local2++; }; } flvplayback_internal function setupSkinAutoHide(_arg1:Boolean):void{ if (((_skinAutoHide) && (!((skin_mc == null))))){ skinAutoHideHitTest(null, _arg1); _skinAutoHideTimer.start(); } else { if (skin_mc != null){ if (((((((_arg1) && ((_skinFadingMaxTime > 0)))) && (((!(skin_mc.visible)) || ((skin_mc.alpha < 1)))))) && (__visible))){ _skinFadingTimer.stop(); _skinFadeStartTime = getTimer(); _skinFadingIn = true; if (skin_mc.alpha == 1){ skin_mc.alpha = 0; }; _skinFadingTimer.start(); } else { if (_skinFadingMaxTime <= 0){ _skinFadingTimer.stop(); skin_mc.alpha = 1; }; }; skin_mc.visible = __visible; }; _skinAutoHideTimer.stop(); }; } public function enterFullScreenDisplayState():void{ var theRect:Rectangle; var vp:VideoPlayer; var effectiveWidth:int; var effectiveHeight:int; var videoAspectRatio:Number; var screenAspectRatio:Number; var effectiveMinWidth:int; var effectiveMinHeight:int; var skinScaleMinWidth:int; var skinScaleMinHeight:int; if (((!(_fullScreen)) && (!((_vc.stage == null))))){ if (_fullScreenTakeOver){ try { theRect = _vc.stage.fullScreenSourceRect; _fullScreenAccel = true; vp = _vc.getVideoPlayer(_vc.visibleVideoPlayerIndex); effectiveWidth = vp.videoWidth; effectiveHeight = vp.videoHeight; videoAspectRatio = (effectiveWidth / effectiveHeight); screenAspectRatio = (_vc.stage.fullScreenWidth / _vc.stage.fullScreenHeight); if (videoAspectRatio > screenAspectRatio){ effectiveHeight = (effectiveWidth / screenAspectRatio); } else { if (videoAspectRatio < screenAspectRatio){ effectiveWidth = (effectiveHeight * screenAspectRatio); }; }; effectiveMinWidth = fullScreenSourceRectMinWidth; effectiveMinHeight = fullScreenSourceRectMinHeight; if (fullScreenSourceRectMinAspectRatio > screenAspectRatio){ effectiveMinHeight = (effectiveMinWidth / screenAspectRatio); } else { if (fullScreenSourceRectMinAspectRatio < screenAspectRatio){ effectiveMinWidth = (effectiveMinHeight * screenAspectRatio); }; }; skinScaleMinWidth = (_vc.stage.fullScreenWidth / _skinScaleMaximum); skinScaleMinHeight = (_vc.stage.fullScreenHeight / _skinScaleMaximum); if ((((effectiveMinWidth < skinScaleMinWidth)) || ((effectiveMinHeight < skinScaleMinHeight)))){ effectiveMinWidth = skinScaleMinWidth; effectiveMinHeight = skinScaleMinHeight; }; if ((((effectiveWidth < effectiveMinWidth)) || ((effectiveHeight < effectiveMinHeight)))){ effectiveWidth = effectiveMinWidth; effectiveHeight = effectiveMinHeight; }; _vc.stage.fullScreenSourceRect = new Rectangle(0, 0, effectiveWidth, effectiveHeight); _vc.stage.displayState = StageDisplayState.FULL_SCREEN; } catch(re:ReferenceError) { _fullScreenAccel = false; } catch(re:SecurityError) { _fullScreenAccel = false; }; }; try { _vc.stage.displayState = StageDisplayState.FULL_SCREEN; } catch(se:SecurityError) { }; }; } public function get skin():String{ return (_skin); } flvplayback_internal function finishAddBarControl(_arg1:Object):void{ var ctrl:Sprite; var ctrlData:ControlData; var e:Event; var ctrlOrEvent = _arg1; if (ctrlOrEvent == null){ return; }; if ((ctrlOrEvent is Event)){ e = Event(ctrlOrEvent); ctrl = Sprite(e.currentTarget); ctrl.removeEventListener(Event.ENTER_FRAME, finishAddBarControl); } else { ctrl = Sprite(ctrlOrEvent); }; ctrlData = ctrlDataDict[ctrl]; try { if ((ctrl["addBarControl"] is Function)){ var _local3 = ctrl; _local3["addBarControl"](); }; } catch(re:ReferenceError) { }; ctrlData.origWidth = ctrl.width; ctrlData.origHeight = ctrl.height; fixUpBar(ctrl, "progress", ctrl, "progress_mc"); calcBarMargins(ctrl, "progress", false); if (ctrlData.progress_mc != null){ fixUpBar(ctrl, "progressBarFill", ctrlData.progress_mc, "fill_mc"); calcBarMargins(ctrlData.progress_mc, "fill", false); calcBarMargins(ctrlData.progress_mc, "mask", false); if (isNaN(_progressPercent)){ _progressPercent = (_vc.isRTMP) ? 100 : 0; }; positionBar(ctrl, "progress", _progressPercent); }; fixUpBar(ctrl, "fullness", ctrl, "fullness_mc"); calcBarMargins(ctrl, "fullness", false); if (ctrlData.fullness_mc != null){ fixUpBar(ctrl, "fullnessBarFill", ctrlData.fullness_mc, "fill_mc"); calcBarMargins(ctrlData.fullness_mc, "fill", false); calcBarMargins(ctrlData.fullness_mc, "mask", false); }; fixUpBar(ctrl, "hit", ctrl, "hit_mc"); fixUpBar(ctrl, "handle", ctrl, "handle_mc"); calcBarMargins(ctrl, "handle", true); switch (ctrlData.index){ case SEEK_BAR: setControl(SEEK_BAR_HANDLE, ctrlData.handle_mc); if (ctrlData.hit_mc != null){ setControl(SEEK_BAR_HIT, ctrlData.hit_mc); }; break; case VOLUME_BAR: setControl(VOLUME_BAR_HANDLE, ctrlData.handle_mc); if (ctrlData.hit_mc != null){ setControl(VOLUME_BAR_HIT, ctrlData.hit_mc); }; break; }; positionHandle(ctrl); } public function get fullScreenBackgroundColor():uint{ return (_fullScreenBgColor); } flvplayback_internal function startHandleDrag(_arg1:Sprite):void{ var ctrlData:ControlData; var handle:Sprite; var handleData:ControlData; var theY:Number; var theWidth:Number; var bounds:Rectangle; var ctrl = _arg1; if (ctrl == null){ return; }; ctrlData = ctrlDataDict[ctrl]; try { if ((((ctrl["startHandleDrag"] is Function)) && (ctrl["startHandleDrag"]()))){ ctrlData.isDragging = true; return; }; } catch(re:ReferenceError) { }; handle = ctrlData.handle_mc; if (handle == null){ return; }; handleData = ctrlDataDict[handle]; theY = (ctrl.y + handleData.origY); theWidth = (isNaN(ctrlData.origWidth)) ? ctrl.width : ctrlData.origWidth; bounds = new Rectangle((ctrl.x + handleData.leftMargin), theY, (theWidth - handleData.rightMargin), 0); handle.startDrag(false, bounds); ctrlData.isDragging = true; } flvplayback_internal function setupBarSkinPart(_arg1:Sprite, _arg2:DisplayObject, _arg3:Sprite, _arg4:String, _arg5:String, _arg6:Boolean=false):DisplayObject{ var part:DisplayObject; var partAvatar:DisplayObject; var ctrlData:ControlData; var partData:ControlData; var ctrl = _arg1; var avatar = _arg2; var definitionHolder = _arg3; var skinName = _arg4; var partName = _arg5; var required = _arg6; try { part = ctrl[partName]; } catch(re:ReferenceError) { part = null; }; if (part == null){ try { part = createSkin(definitionHolder, skinName); } catch(ve:VideoError) { if (required){ throw (ve); }; }; if (part != null){ skin_mc.addChild(part); part.x = ctrl.x; part.y = ctrl.y; partAvatar = layout_mc.getChildByName((skinName + "_mc")); if (partAvatar != null){ if (partName == "hit_mc"){ ctrlData = ctrlDataDict[ctrl]; partData = new ControlData(this, part, controls[ctrlData.index], -1); partData.avatar = partAvatar; ctrlDataDict[part] = partData; } else { part.x = (part.x + (partAvatar.x - avatar.x)); part.y = (part.y + (partAvatar.y - avatar.y)); part.width = partAvatar.width; part.height = partAvatar.height; }; }; }; }; if (((required) && ((part == null)))){ throw (new VideoError(VideoError.MISSING_SKIN_STYLE, skinName)); }; return (part); } public function get skinBackgroundAlpha():Number{ return (borderAlpha); } public function get volumeBarScrubTolerance():Number{ return (_volumeBarScrubTolerance); } public function get skinScaleMaximum():Number{ return (_skinScaleMaximum); } public function get skinBackgroundColor():uint{ return (borderColor); } public function get controlsEnabled():Boolean{ return (_controlsEnabled); } flvplayback_internal function handleIVPEvent(_arg1:IVPEvent):void{ var _local2:uint; var _local3:int; var _local4:VideoEvent; var _local5:Sprite; var _local6:ControlData; var _local7:VideoProgressEvent; var _local8:VideoPlayerState; var _local9:Number; var _local10:Number; var _local11:Number; if (_arg1.vp != _vc.visibleVideoPlayerIndex){ return; }; _local2 = _vc.activeVideoPlayerIndex; _vc.activeVideoPlayerIndex = _vc.visibleVideoPlayerIndex; switch (_arg1.type){ case VideoEvent.STATE_CHANGE: _local4 = VideoEvent(_arg1); if (_local4.state == VideoState.BUFFERING){ if (!_bufferingOn){ _bufferingDelayTimer.reset(); _bufferingDelayTimer.start(); }; } else { _bufferingDelayTimer.reset(); _bufferingOn = false; }; if (_local4.state == VideoState.LOADING){ _progressPercent = (_vc.getVideoPlayer(_arg1.vp).isRTMP) ? 100 : 0; _local3 = SEEK_BAR; while (_local3 <= VOLUME_BAR) { _local5 = controls[_local3]; if (controls[_local3] == null){ } else { _local6 = ctrlDataDict[_local5]; if (_local6.progress_mc != null){ positionBar(_local5, "progress", _progressPercent); }; }; _local3++; }; }; _local3 = 0; while (_local3 < NUM_CONTROLS) { if (controls[_local3] == undefined){ } else { setEnabledAndVisibleForState(_local3, _local4.state); if (_local3 < NUM_BUTTONS){ skinButtonControl(controls[_local3]); }; }; _local3++; }; break; case VideoEvent.READY: case MetadataEvent.METADATA_RECEIVED: _local3 = 0; while (_local3 < NUM_CONTROLS) { if (controls[_local3] == undefined){ } else { setEnabledAndVisibleForState(_local3, _vc.state); if (_local3 < NUM_BUTTONS){ skinButtonControl(controls[_local3]); }; }; _local3++; }; if (_vc.getVideoPlayer(_arg1.vp).isRTMP){ _progressPercent = 100; _local3 = SEEK_BAR; while (_local3 <= VOLUME_BAR) { _local5 = controls[_local3]; if (_local5 == null){ } else { _local6 = ctrlDataDict[_local5]; if (_local6.progress_mc != null){ positionBar(_local5, "progress", _progressPercent); }; }; _local3++; }; }; break; case VideoEvent.PLAYHEAD_UPDATE: if (((((((!((controls[SEEK_BAR] == undefined))) && (!(_vc.isLive)))) && (!(isNaN(_vc.totalTime))))) && (!((_vc.getVideoPlayer(_vc.visibleVideoPlayerIndex).state == VideoState.SEEKING))))){ _local4 = VideoEvent(_arg1); _local10 = ((_local4.playheadTime / _vc.totalTime) * 100); if (_local10 < 0){ _local10 = 0; } else { if (_local10 > 100){ _local10 = 100; }; }; _local5 = controls[SEEK_BAR]; _local6 = ctrlDataDict[_local5]; _local6.percentage = _local10; positionHandle(_local5); }; break; case VideoProgressEvent.PROGRESS: _local7 = VideoProgressEvent(_arg1); _progressPercent = ((_local7.bytesTotal)<=0) ? 100 : ((_local7.bytesLoaded / _local7.bytesTotal) * 100); _local8 = _vc.videoPlayerStates[_arg1.vp]; _local9 = _local8.minProgressPercent; if (((!(isNaN(_local9))) && ((_local9 > _progressPercent)))){ _progressPercent = _local9; }; if (!isNaN(_vc.totalTime)){ _local11 = ((_vc.playheadTime / _vc.totalTime) * 100); if (_local11 > _progressPercent){ _progressPercent = _local11; _local8.minProgressPercent = _progressPercent; }; }; _local3 = SEEK_BAR; while (_local3 <= VOLUME_BAR) { _local5 = controls[_local3]; if (_local5 == null){ } else { _local6 = ctrlDataDict[_local5]; if (_local6.progress_mc != null){ positionBar(_local5, "progress", _progressPercent); }; }; _local3++; }; break; }; _vc.activeVideoPlayerIndex = _local2; } flvplayback_internal function setupButtonSkinState(_arg1:Sprite, _arg2:Sprite, _arg3:String, _arg4:DisplayObject=null):DisplayObject{ var stateSkin:DisplayObject; var ctrl = _arg1; var definitionHolder = _arg2; var skinName = _arg3; var defaultSkin = _arg4; try { stateSkin = createSkin(definitionHolder, skinName); } catch(ve:VideoError) { if (defaultSkin != null){ stateSkin = null; } else { throw (ve); }; }; if (stateSkin != null){ stateSkin.visible = false; ctrl.addChild(stateSkin); } else { if (defaultSkin != null){ stateSkin = defaultSkin; }; }; return (stateSkin); } flvplayback_internal function layoutSkin():void{ var video_mc:DisplayObject; var i:int; var borderRect:Rectangle; var forceSkinAutoHide:Boolean; var minWidth:Number; var vidWidth:Number; var minHeight:Number; var vidHeight:Number; if (layout_mc == null){ return; }; if (skinLoadDelayCount < 2){ return; }; video_mc = layout_mc["video_mc"]; if (video_mc == null){ throw (new Error("No layout_mc.video_mc")); }; placeholderLeft = video_mc.x; placeholderRight = (video_mc.x + video_mc.width); placeholderTop = video_mc.y; placeholderBottom = (video_mc.y + video_mc.height); videoLeft = (_vc.x - _vc.registrationX); videoRight = (videoLeft + _vc.width); videoTop = (_vc.y - _vc.registrationY); videoBottom = (videoTop + _vc.height); if (((((_fullScreen) && (_fullScreenTakeOver))) && (!((border_mc == null))))){ borderRect = calcLayoutControl(border_mc); forceSkinAutoHide = false; if ((((borderRect.width > 0)) && ((borderRect.height > 0)))){ if (borderRect.x < 0){ placeholderLeft = (placeholderLeft + (videoLeft - borderRect.x)); forceSkinAutoHide = true; }; if ((borderRect.x + borderRect.width) > _vc.registrationWidth){ placeholderRight = (placeholderRight + ((borderRect.x + borderRect.width) - videoRight)); forceSkinAutoHide = true; }; if (borderRect.y < 0){ placeholderTop = (placeholderTop + (videoTop - borderRect.y)); forceSkinAutoHide = true; }; if ((borderRect.y + borderRect.height) > _vc.registrationHeight){ placeholderBottom = (placeholderBottom + ((borderRect.y + borderRect.height) - videoBottom)); forceSkinAutoHide = true; }; if (forceSkinAutoHide){ _skinAutoHide = true; setupSkinAutoHide(true); }; }; }; try { if (!isNaN(layout_mc["minWidth"])){ minWidth = layout_mc["minWidth"]; vidWidth = (videoRight - videoLeft); if ((((minWidth > 0)) && ((minWidth > vidWidth)))){ videoLeft = (videoLeft - ((minWidth - vidWidth) / 2)); videoRight = (minWidth + videoLeft); }; }; } catch(re1:ReferenceError) { }; try { if (!isNaN(layout_mc["minHeight"])){ minHeight = layout_mc["minHeight"]; vidHeight = (videoBottom - videoTop); if ((((minHeight > 0)) && ((minHeight > vidHeight)))){ videoTop = (videoTop - ((minHeight - vidHeight) / 2)); videoBottom = (minHeight + videoTop); }; }; } catch(re2:ReferenceError) { }; i = 0; while (i < customClips.length) { layoutControl(customClips[i]); if (customClips[i] == border_mc){ bitmapCopyBorder(); }; i = (i + 1); }; i = 0; while (i < NUM_CONTROLS) { layoutControl(controls[i]); i = (i + 1); }; } public function set bufferingDelayInterval(_arg1:Number):void{ if (_bufferingDelayTimer.delay == _arg1){ return; }; _bufferingDelayTimer.delay = _arg1; } flvplayback_internal function setEnabledAndVisibleForState(_arg1:int, _arg2:String):void{ var _local3:int; var _local4:String; var _local5:Sprite; var _local6:ControlData; var _local7:Boolean; var _local8:ControlData; var _local9:ControlData; var _local10:ControlData; var _local11:ControlData; _local3 = _vc.activeVideoPlayerIndex; _vc.activeVideoPlayerIndex = _vc.visibleVideoPlayerIndex; _local4 = _arg2; if ((((_local4 == VideoState.BUFFERING)) && (!(_bufferingOn)))){ _local4 = VideoState.PLAYING; }; _local5 = controls[_arg1]; if (_local5 == null){ return; }; _local6 = ctrlDataDict[_local5]; if (_local6 == null){ return; }; switch (_arg1){ case VOLUME_BAR: case VOLUME_BAR_HANDLE: case VOLUME_BAR_HIT: _local6.enabled = true; break; case FULL_SCREEN_ON_BUTTON: _local6.enabled = !(_fullScreen); if (controls[FULL_SCREEN_BUTTON] != undefined){ _local5.visible = _local6.enabled; }; break; case FULL_SCREEN_OFF_BUTTON: _local6.enabled = _fullScreen; if (controls[FULL_SCREEN_BUTTON] != undefined){ _local5.visible = _local6.enabled; }; break; case MUTE_ON_BUTTON: _local6.enabled = !(_isMuted); if (controls[MUTE_BUTTON] != undefined){ _local5.visible = _local6.enabled; }; break; case MUTE_OFF_BUTTON: _local6.enabled = _isMuted; if (controls[MUTE_BUTTON] != undefined){ _local5.visible = _local6.enabled; }; break; default: switch (_local4){ case VideoState.LOADING: case VideoState.CONNECTION_ERROR: _local6.enabled = false; break; case VideoState.DISCONNECTED: _local6.enabled = ((!((_vc.source == null))) && (!((_vc.source == "")))); break; case VideoState.SEEKING: break; default: _local6.enabled = true; break; }; break; }; switch (_arg1){ case SEEK_BAR: switch (_local4){ case VideoState.STOPPED: case VideoState.PLAYING: case VideoState.PAUSED: case VideoState.REWINDING: case VideoState.SEEKING: _local6.enabled = true; break; case VideoState.BUFFERING: _local6.enabled = ((!(_bufferingBarHides)) || ((controls[BUFFERING_BAR] == undefined))); break; default: _local6.enabled = false; break; }; if (_local6.enabled){ _local6.enabled = !(isNaN(_vc.totalTime)); }; if (_local6.handle_mc != null){ _local8 = ctrlDataDict[_local6.handle_mc]; _local8.enabled = _local6.enabled; _local6.handle_mc.visible = _local8.enabled; }; if (_local6.hit_mc != null){ _local9 = ctrlDataDict[_local6.hit_mc]; _local9.enabled = _local6.enabled; _local6.hit_mc.visible = _local9.enabled; }; _local7 = ((((((!(_bufferingBarHides)) || (_local6.enabled))) || ((controls[BUFFERING_BAR] == undefined)))) || (!(controls[BUFFERING_BAR].visible))); _local5.visible = _local7; if (_local6.progress_mc != null){ _local6.progress_mc.visible = _local7; _local10 = ctrlDataDict[_local6.progress_mc]; if (_local10.fill_mc != null){ _local10.fill_mc.visible = _local7; }; }; if (_local6.fullness_mc != null){ _local6.fullness_mc.visible = _local7; _local11 = ctrlDataDict[_local6.fullness_mc]; if (_local11.fill_mc != null){ _local11.fill_mc.visible = _local7; }; }; break; case BUFFERING_BAR: switch (_local4){ case VideoState.STOPPED: case VideoState.PLAYING: case VideoState.PAUSED: case VideoState.REWINDING: case VideoState.SEEKING: _local6.enabled = false; break; default: _local6.enabled = true; break; }; _local5.visible = _local6.enabled; if (_local6.fill_mc != null){ _local6.fill_mc.visible = _local6.enabled; }; break; case PAUSE_BUTTON: switch (_local4){ case VideoState.DISCONNECTED: case VideoState.STOPPED: case VideoState.PAUSED: case VideoState.REWINDING: _local6.enabled = false; break; case VideoState.PLAYING: _local6.enabled = true; break; case VideoState.BUFFERING: _local6.enabled = ((!(_bufferingBarHides)) || ((controls[BUFFERING_BAR] == undefined))); break; }; if (controls[PLAY_PAUSE_BUTTON] != undefined){ _local5.visible = _local6.enabled; }; break; case PLAY_BUTTON: switch (_local4){ case VideoState.PLAYING: _local6.enabled = false; break; case VideoState.STOPPED: case VideoState.PAUSED: _local6.enabled = true; break; case VideoState.BUFFERING: _local6.enabled = ((!(_bufferingBarHides)) || ((controls[BUFFERING_BAR] == undefined))); break; }; if (controls[PLAY_PAUSE_BUTTON] != undefined){ _local5.visible = !(controls[PAUSE_BUTTON].visible); }; break; case STOP_BUTTON: switch (_local4){ case VideoState.DISCONNECTED: case VideoState.STOPPED: _local6.enabled = false; break; case VideoState.PAUSED: case VideoState.PLAYING: case VideoState.BUFFERING: _local6.enabled = true; break; }; break; case BACK_BUTTON: case FORWARD_BUTTON: switch (_local4){ case VideoState.BUFFERING: _local6.enabled = ((!(_bufferingBarHides)) || ((controls[BUFFERING_BAR] == undefined))); break; }; }; _local5.mouseEnabled = _local6.enabled; _vc.activeVideoPlayerIndex = _local3; } public function set fullScreenTakeOver(_arg1:Boolean):void{ var v = _arg1; if (_fullScreenTakeOver != v){ _fullScreenTakeOver = v; if (_fullScreenTakeOver){ enterFullScreenTakeOver(); } else { if (((((!((_vc.stage == null))) && (_fullScreen))) && (_fullScreenAccel))){ try { _vc.stage.displayState = StageDisplayState.NORMAL; } catch(se:SecurityError) { }; }; exitFullScreenTakeOver(); }; }; } flvplayback_internal function enterFullScreenTakeOver():void{ var i:int; var fullScreenBG:Sprite; var vp:VideoPlayer; if (((!(_fullScreen)) || (!((cacheFLVPlaybackParent == null))))){ return; }; _vc.removeEventListener(LayoutEvent.LAYOUT, handleLayoutEvent); _vc.removeEventListener(AutoLayoutEvent.AUTO_LAYOUT, handleLayoutEvent); _vc.removeEventListener(Event.ADDED_TO_STAGE, handleEvent); _vc.stage.removeEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreenEvent); try { cacheFLVPlaybackScaleMode = new Array(); cacheFLVPlaybackAlign = new Array(); i = 0; while (i < _vc.videoPlayers.length) { vp = (_vc.videoPlayers[i] as VideoPlayer); if (vp != null){ cacheFLVPlaybackScaleMode[i] = vp.scaleMode; cacheFLVPlaybackAlign[i] = vp.align; }; i = (i + 1); }; cacheFLVPlaybackParent = _vc.parent; cacheFLVPlaybackIndex = _vc.parent.getChildIndex(_vc); cacheFLVPlaybackLocation = new Rectangle(_vc.registrationX, _vc.registrationY, _vc.registrationWidth, _vc.registrationHeight); if (!_fullScreenAccel){ cacheStageAlign = _vc.stage.align; cacheStageScaleMode = _vc.stage.scaleMode; _vc.stage.align = StageAlign.TOP_LEFT; _vc.stage.scaleMode = StageScaleMode.NO_SCALE; }; _vc.align = VideoAlign.CENTER; _vc.scaleMode = VideoScaleMode.MAINTAIN_ASPECT_RATIO; _vc.registrationX = 0; _vc.registrationY = 0; _vc.setSize(_vc.stage.stageWidth, _vc.stage.stageHeight); if (_vc.stage != _vc.parent){ _vc.stage.addChild(_vc); } else { _vc.stage.setChildIndex(_vc, (_vc.stage.numChildren - 1)); }; fullScreenBG = Sprite(_vc.getChildByName("fullScreenBG")); if (fullScreenBG == null){ fullScreenBG = new Sprite(); fullScreenBG.name = "fullScreenBG"; _vc.addChildAt(fullScreenBG, 0); } else { _vc.setChildIndex(fullScreenBG, 0); }; fullScreenBG.graphics.beginFill(_fullScreenBgColor); fullScreenBG.graphics.drawRect(0, 0, _vc.stage.stageWidth, _vc.stage.stageHeight); layoutSkin(); setupSkinAutoHide(false); } catch(err:Error) { cacheFLVPlaybackParent = null; }; _vc.addEventListener(LayoutEvent.LAYOUT, handleLayoutEvent); _vc.addEventListener(AutoLayoutEvent.AUTO_LAYOUT, handleLayoutEvent); _vc.addEventListener(Event.ADDED_TO_STAGE, handleEvent); _vc.stage.addEventListener(FullScreenEvent.FULL_SCREEN, handleFullScreenEvent); } public function set seekBarScrubTolerance(_arg1:Number):void{ _seekBarScrubTolerance = _arg1; } flvplayback_internal function cleanupHandle(_arg1:Object):void{ var e:Event; var ctrl:Sprite; var ctrlData:ControlData; var ctrlOrEvent = _arg1; try { if ((ctrlOrEvent is Event)){ e = Event(ctrlOrEvent); }; ctrl = ((e == null)) ? Sprite(ctrlOrEvent) : Sprite(e.currentTarget); ctrlData = ctrlDataDict[ctrl]; if ((((ctrlData == null)) || ((e == null)))){ ctrl.removeEventListener(Event.REMOVED_FROM_STAGE, cleanupHandle, false); if (ctrlData == null){ return; }; }; ctrl.removeEventListener(Event.ENTER_FRAME, finishAddBarControl); if (ctrlData.handle_mc != null){ if (ctrlData.handle_mc.parent != null){ ctrlData.handle_mc.parent.removeChild(ctrlData.handle_mc); }; delete ctrlDataDict[ctrlData.handle_mc]; ctrlData.handle_mc = null; }; if (ctrlData.hit_mc != null){ if (ctrlData.hit_mc.parent != null){ ctrlData.hit_mc.parent.removeChild(ctrlData.hit_mc); }; delete ctrlDataDict[ctrlData.hit_mc]; ctrlData.hit_mc = null; }; } catch(err:Error) { }; } flvplayback_internal static function getNumberPropSafe(_arg1:Object, _arg2:String):Number{ var numProp:*; var obj = _arg1; var propName = _arg2; try { numProp = obj[propName]; return (Number(numProp)); } catch(re:ReferenceError) { }; return (NaN); } flvplayback_internal static function getBooleanPropSafe(_arg1:Object, _arg2:String):Boolean{ var boolProp:*; var obj = _arg1; var propName = _arg2; try { boolProp = obj[propName]; return (Boolean(boolProp)); } catch(re:ReferenceError) { }; return (false); } flvplayback_internal static function initLayoutNameToIndexMappings():void{ var _local1:int; layoutNameToIndexMappings = new Object(); _local1 = 0; while (_local1 < layoutNameArray.length) { if (layoutNameArray[_local1] != null){ layoutNameToIndexMappings[layoutNameArray[_local1]] = _local1; }; _local1++; }; } } }//package fl.video
Section 36
//VideoAlign (fl.video.VideoAlign) package fl.video { public final class VideoAlign { public static const CENTER:String = "center"; public static const LEFT:String = "left"; public static const BOTTOM_RIGHT:String = "bottomRight"; public static const BOTTOM:String = "bottom"; public static const TOP_LEFT:String = "topLeft"; public static const TOP_RIGHT:String = "topRight"; public static const TOP:String = "top"; public static const BOTTOM_LEFT:String = "bottomLeft"; public static const RIGHT:String = "right"; } }//package fl.video
Section 37
//VideoError (fl.video.VideoError) package fl.video { public class VideoError extends Error { private var _code:uint; public static const INVALID_SOURCE:uint = 1004; flvplayback_internal static const ERROR_MSG:Array = ["Unable to make connection to server or to find FLV on server", "No matching cue point found", "Illegal cue point", "Invalid seek", "Invalid source", "Invalid xml", "No bitrate match, must be no default flv", "Cannot delete default VideoPlayer", "VideoPlayer.iNCManagerClass has not been set or its value is invalid", "Null url parameter sent to load()", "Skin is missing a required style definition or its value is invalid", "Unsupported property", "VideoPlayer.netStreamClientClass has not been set or its value is invalid"]; public static const NULL_URL_LOAD:uint = 1009; public static const INVALID_XML:uint = 1005; flvplayback_internal static const BASE_ERROR_CODE:uint = 1000; public static const DELETE_DEFAULT_PLAYER:uint = 1007; public static const SHORT_VERSION:String = "2.1"; public static const UNSUPPORTED_PROPERTY:uint = 1011; public static const ILLEGAL_CUE_POINT:uint = 1002; public static const INVALID_SEEK:uint = 1003; public static const NO_CONNECTION:uint = 1000; public static const MISSING_SKIN_STYLE:uint = 1010; public static const INCMANAGER_CLASS_UNSET:uint = 1008; public static const NO_BITRATE_MATCH:uint = 1006; public static const NETSTREAM_CLIENT_CLASS_UNSET:uint = 1012; public static const VERSION:String = "2.1.0.14"; public function VideoError(_arg1:uint, _arg2:String=null){ super((((("" + _arg1) + ": ") + ERROR_MSG[(_arg1 - BASE_ERROR_CODE)]) + ((_arg2)==null) ? "" : (": " + _arg2))); name = "VideoError"; _code = _arg1; } public function get code():uint{ return (_code); } } }//package fl.video
Section 38
//VideoEvent (fl.video.VideoEvent) package fl.video { import flash.events.*; public class VideoEvent extends Event implements IVPEvent { private var _vp:uint; private var _playheadTime:Number; private var _state:String; public static const FAST_FORWARD:String = "fastForward"; public static const READY:String = "ready"; public static const SKIN_LOADED:String = "skinLoaded"; public static const SCRUB_FINISH:String = "scrubFinish"; public static const BUFFERING_STATE_ENTERED:String = "bufferingStateEntered"; public static const STOPPED_STATE_ENTERED:String = "stoppedStateEntered"; public static const AUTO_REWOUND:String = "autoRewound"; public static const SCRUB_START:String = "scrubStart"; public static const PLAYHEAD_UPDATE:String = "playheadUpdate"; public static const SEEKED:String = "seeked"; public static const PLAYING_STATE_ENTERED:String = "playingStateEntered"; public static const CLOSE:String = "close"; public static const PAUSED_STATE_ENTERED:String = "pausedStateEntered"; public static const COMPLETE:String = "complete"; public static const REWIND:String = "rewind"; public static const STATE_CHANGE:String = "stateChange"; public function VideoEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:String=null, _arg5:Number=NaN, _arg6:uint=0){ super(_arg1, _arg2, _arg3); _state = _arg4; _playheadTime = _arg5; _vp = _arg6; } public function set playheadTime(_arg1:Number):void{ _playheadTime = _arg1; } public function get playheadTime():Number{ return (_playheadTime); } public function get state():String{ return (_state); } public function get vp():uint{ return (_vp); } override public function clone():Event{ return (new VideoEvent(type, bubbles, cancelable, state, playheadTime, vp)); } public function set state(_arg1:String):void{ _state = _arg1; } public function set vp(_arg1:uint):void{ _vp = _arg1; } } }//package fl.video
Section 39
//VideoPlayer (fl.video.VideoPlayer) package fl.video { import flash.net.*; import flash.events.*; import flash.geom.*; import flash.media.*; import flash.utils.*; public class VideoPlayer extends Video { protected var _align:String; protected var _registrationWidth:Number; flvplayback_internal var _updateProgressTimer:Timer; flvplayback_internal var _atEndCheckPlayhead:Number; flvplayback_internal var _hiddenForResize:Boolean; flvplayback_internal var startProgressTime:Number; protected var _volume:Number; flvplayback_internal var _invalidSeekTime:Boolean; flvplayback_internal var _readyDispatched:Boolean; flvplayback_internal var lastUpdateTimeStuckCount:Number; protected var _ns:NetStream; protected var _isLive:Boolean; flvplayback_internal var _bufferState:String; protected var _streamLength:Number; flvplayback_internal var _rtmpDoSeekTimer:Timer; protected var _contentPath:String; flvplayback_internal var lastUpdateTimeStuckCountMax:int;// = 10 protected var _metadata:Object; protected var __visible:Boolean; flvplayback_internal var autoResizeMetadataDelayMax:Number;// = 5 protected var _scaleMode:String; flvplayback_internal var _lastUpdateTime:Number; flvplayback_internal var _sawPlayStop:Boolean; flvplayback_internal var _atEnd:Boolean; flvplayback_internal var _sawSeekNotify:Boolean; flvplayback_internal var _idleTimeoutTimer:Timer; flvplayback_internal var _prevVideoWidth:int; protected var _registrationX:Number; protected var _registrationY:Number; protected var _bufferTime:Number; flvplayback_internal var _cachedState:String; flvplayback_internal var totalDownloadTime:Number; flvplayback_internal var _cachedPlayheadTime:Number; protected var _autoPlay:Boolean; protected var _autoRewind:Boolean; flvplayback_internal var _invalidSeekRecovery:Boolean; flvplayback_internal var _hiddenRewindPlayheadTime:Number; flvplayback_internal var _prevVideoHeight:int; protected var _ncMgr:INCManager; protected var _soundTransform:SoundTransform; flvplayback_internal var _httpDoSeekCount:Number; flvplayback_internal var oldRegistrationBounds:Rectangle; flvplayback_internal var _cmdQueue:Array; flvplayback_internal var _updateTimeTimer:Timer; flvplayback_internal var httpDoSeekMaxCount:Number;// = 4 flvplayback_internal var _startingPlay:Boolean; flvplayback_internal var baselineProgressTime:Number; flvplayback_internal var _autoResizeTimer:Timer; flvplayback_internal var _autoResizeDone:Boolean; flvplayback_internal var _httpDoSeekTimer:Timer; protected var _state:String; protected var _videoWidth:int; flvplayback_internal var _finishAutoResizeTimer:Timer; flvplayback_internal var _resizeImmediatelyOnMetadata:Boolean; flvplayback_internal var _currentPos:Number; flvplayback_internal var oldBounds:Rectangle; protected var _videoHeight:int; flvplayback_internal var waitingForEnough:Boolean; flvplayback_internal var _delayedBufferingTimer:Timer; protected var _registrationHeight:Number; flvplayback_internal var _hiddenForResizeMetadataDelay:Number; flvplayback_internal var autoResizePlayheadTimeout:Number;// = 0.5 flvplayback_internal var _rtmpDoStopAtEndTimer:Timer; flvplayback_internal var _lastSeekTime:Number; flvplayback_internal var totalProgressTime:Number; flvplayback_internal static const FINISH_AUTO_RESIZE_INTERVAL:Number = 250; flvplayback_internal static const DEFAULT_AUTO_RESIZE_PLAYHEAD_TIMEOUT:Number = 0.5; flvplayback_internal static const DEFAULT_AUTO_RESIZE_METADATA_DELAY_MAX:Number = 5; public static const SHORT_VERSION:String = "2.1"; flvplayback_internal static const HTTP_DO_SEEK_INTERVAL:Number = 250; flvplayback_internal static const DEFAULT_HTTP_DO_SEEK_MAX_COUNT:Number = 4; flvplayback_internal static const RTMP_DO_SEEK_INTERVAL:Number = 100; flvplayback_internal static const HTTP_DELAYED_BUFFERING_INTERVAL:Number = 100; public static const DEFAULT_UPDATE_TIME_INTERVAL:Number = 250; flvplayback_internal static const AUTO_RESIZE_INTERVAL:Number = 100; public static const DEFAULT_IDLE_TIMEOUT_INTERVAL:Number = 300000; flvplayback_internal static const DEFAULT_LAST_UPDATE_TIME_STUCK_COUNT_MAX:int = 10; flvplayback_internal static const RTMP_DO_STOP_AT_END_INTERVAL:Number = 500; public static const VERSION:String = "2.1.0.14"; public static const DEFAULT_UPDATE_PROGRESS_INTERVAL:Number = 250; public static var netStreamClientClass:Object = VideoPlayerClient; public static var iNCManagerClass:Object = "fl.video.NCManager"; flvplayback_internal static var BUFFER_FLUSH:String = "bufferFlush"; flvplayback_internal static var BUFFER_FULL:String = "bufferFull"; flvplayback_internal static var BUFFER_EMPTY:String = "bufferEmpty"; public function VideoPlayer(_arg1:int=320, _arg2:int=240){ autoResizePlayheadTimeout = DEFAULT_AUTO_RESIZE_PLAYHEAD_TIMEOUT; autoResizeMetadataDelayMax = DEFAULT_AUTO_RESIZE_METADATA_DELAY_MAX; httpDoSeekMaxCount = DEFAULT_HTTP_DO_SEEK_MAX_COUNT; lastUpdateTimeStuckCountMax = DEFAULT_LAST_UPDATE_TIME_STUCK_COUNT_MAX; super(_arg1, _arg2); _registrationX = x; _registrationY = y; _registrationWidth = _arg1; _registrationHeight = _arg2; _state = VideoState.DISCONNECTED; _cachedState = _state; _bufferState = BUFFER_EMPTY; _sawPlayStop = false; _cachedPlayheadTime = 0; _metadata = null; _startingPlay = false; _invalidSeekTime = false; _invalidSeekRecovery = false; _currentPos = 0; _atEnd = false; _streamLength = 0; _cmdQueue = new Array(); _readyDispatched = false; _autoResizeDone = false; _lastUpdateTime = NaN; lastUpdateTimeStuckCount = 0; _sawSeekNotify = false; _hiddenForResize = false; _hiddenForResizeMetadataDelay = 0; _resizeImmediatelyOnMetadata = false; _videoWidth = -1; _videoHeight = -1; _prevVideoWidth = 0; _prevVideoHeight = 0; _updateTimeTimer = new Timer(DEFAULT_UPDATE_TIME_INTERVAL); _updateTimeTimer.addEventListener(TimerEvent.TIMER, doUpdateTime); _updateProgressTimer = new Timer(DEFAULT_UPDATE_PROGRESS_INTERVAL); _updateProgressTimer.addEventListener(TimerEvent.TIMER, doUpdateProgress); _idleTimeoutTimer = new Timer(DEFAULT_IDLE_TIMEOUT_INTERVAL, 1); _idleTimeoutTimer.addEventListener(TimerEvent.TIMER, doIdleTimeout); _autoResizeTimer = new Timer(AUTO_RESIZE_INTERVAL); _autoResizeTimer.addEventListener(TimerEvent.TIMER, doAutoResize); _rtmpDoStopAtEndTimer = new Timer(RTMP_DO_STOP_AT_END_INTERVAL); _rtmpDoStopAtEndTimer.addEventListener(TimerEvent.TIMER, rtmpDoStopAtEnd); _rtmpDoSeekTimer = new Timer(RTMP_DO_SEEK_INTERVAL); _rtmpDoSeekTimer.addEventListener(TimerEvent.TIMER, rtmpDoSeek); _httpDoSeekTimer = new Timer(HTTP_DO_SEEK_INTERVAL); _httpDoSeekTimer.addEventListener(TimerEvent.TIMER, httpDoSeek); _httpDoSeekCount = 0; _finishAutoResizeTimer = new Timer(FINISH_AUTO_RESIZE_INTERVAL, 1); _finishAutoResizeTimer.addEventListener(TimerEvent.TIMER, finishAutoResize); _delayedBufferingTimer = new Timer(HTTP_DELAYED_BUFFERING_INTERVAL); _delayedBufferingTimer.addEventListener(TimerEvent.TIMER, doDelayedBuffering); _isLive = false; _align = VideoAlign.CENTER; _scaleMode = VideoScaleMode.MAINTAIN_ASPECT_RATIO; _autoPlay = true; _autoRewind = false; _bufferTime = 0.1; _soundTransform = new SoundTransform(); _volume = _soundTransform.volume; __visible = true; _contentPath = ""; waitingForEnough = false; baselineProgressTime = NaN; startProgressTime = NaN; totalDownloadTime = NaN; totalProgressTime = NaN; } public function get playheadTime():Number{ var _local1:Number; _local1 = ((_ns)==null) ? _currentPos : _ns.time; if (((!((_metadata == null))) && (!((_metadata.audiodelay == undefined))))){ _local1 = (_local1 - _metadata.audiodelay); if (_local1 < 0){ _local1 = 0; }; }; return (_local1); } public function stop():void{ if (!isXnOK()){ if ((((((_state == VideoState.CONNECTION_ERROR)) || ((_ncMgr == null)))) || ((_ncMgr.netConnection == null)))){ throw (new VideoError(VideoError.NO_CONNECTION)); }; return; } else { if (_state == VideoState.EXEC_QUEUED_CMD){ _state = _cachedState; } else { if (!stateResponsive){ queueCmd(QueuedCommand.STOP); return; }; execQueuedCmds(); }; }; if ((((_state == VideoState.STOPPED)) || ((_ns == null)))){ return; }; if (_ncMgr.isRTMP){ if (((_autoRewind) && (!(_isLive)))){ _currentPos = 0; _play(0, 0); _state = VideoState.STOPPED; setState(VideoState.REWINDING); } else { closeNS(true); setState(VideoState.STOPPED); }; } else { _pause(true); if (_autoRewind){ _seek(0); _state = VideoState.STOPPED; setState(VideoState.REWINDING); } else { setState(VideoState.STOPPED); }; }; } flvplayback_internal function execQueuedCmds():void{ var nextCmd:Object; while ((((((_cmdQueue.length > 0)) && (((((stateResponsive) || ((_state == VideoState.DISCONNECTED)))) || ((_state == VideoState.CONNECTION_ERROR)))))) && (((!((_cmdQueue[0].url == null))) || (((!((_state == VideoState.DISCONNECTED))) && (!((_state == VideoState.CONNECTION_ERROR))))))))) { try { nextCmd = _cmdQueue.shift(); _cachedState = _state; _state = VideoState.EXEC_QUEUED_CMD; switch (nextCmd.type){ case QueuedCommand.PLAY: play(nextCmd.url, nextCmd.time, nextCmd.isLive); break; case QueuedCommand.LOAD: load(nextCmd.url, nextCmd.time, nextCmd.isLive); break; case QueuedCommand.PAUSE: pause(); break; case QueuedCommand.STOP: stop(); break; case QueuedCommand.SEEK: seek(nextCmd.time); break; case QueuedCommand.PLAY_WHEN_ENOUGH: playWhenEnoughDownloaded(); break; }; } finally { if (_state == VideoState.EXEC_QUEUED_CMD){ _state = _cachedState; }; }; }; } public function setScale(_arg1:Number, _arg2:Number):void{ super.scaleX = _arg1; super.scaleY = _arg2; _registrationWidth = width; _registrationHeight = height; switch (_scaleMode){ case VideoScaleMode.MAINTAIN_ASPECT_RATIO: case VideoScaleMode.NO_SCALE: startAutoResize(); break; default: super.x = _registrationX; super.y = _registrationY; break; }; } public function set playheadTime(_arg1:Number):void{ seek(_arg1); } override public function get videoWidth():int{ if (_videoWidth > 0){ return (_videoWidth); }; if (((((!((_metadata == null))) && (!(isNaN(_metadata.width))))) && (!(isNaN(_metadata.height))))){ if ((((_metadata.width == _metadata.height)) && (_readyDispatched))){ return (super.videoWidth); }; return (int(_metadata.width)); }; if (_readyDispatched){ return (super.videoWidth); }; return (-1); } public function get scaleMode():String{ return (_scaleMode); } public function get progressInterval():Number{ return (_updateProgressTimer.delay); } public function set align(_arg1:String):void{ if (_align != _arg1){ switch (_arg1){ case VideoAlign.CENTER: case VideoAlign.TOP: case VideoAlign.LEFT: case VideoAlign.BOTTOM: case VideoAlign.RIGHT: case VideoAlign.TOP_LEFT: case VideoAlign.TOP_RIGHT: case VideoAlign.BOTTOM_LEFT: case VideoAlign.BOTTOM_RIGHT: break; default: return; }; _align = _arg1; switch (_scaleMode){ case VideoScaleMode.MAINTAIN_ASPECT_RATIO: case VideoScaleMode.NO_SCALE: startAutoResize(); break; }; }; } public function set scaleMode(_arg1:String):void{ if (_scaleMode != _arg1){ switch (_arg1){ case VideoScaleMode.MAINTAIN_ASPECT_RATIO: case VideoScaleMode.NO_SCALE: case VideoScaleMode.EXACT_FIT: break; default: return; }; if ((((((_scaleMode == VideoScaleMode.EXACT_FIT)) && (_resizeImmediatelyOnMetadata))) && ((((_videoWidth < 0)) || ((_videoHeight < 0)))))){ _resizeImmediatelyOnMetadata = false; }; _scaleMode = _arg1; startAutoResize(); }; } public function get source():String{ return (_contentPath); } flvplayback_internal function doUpdateTime(_arg1:TimerEvent=null):void{ var _local2:Number; _local2 = playheadTime; if (_local2 != _atEndCheckPlayhead){ _atEndCheckPlayhead = NaN; }; switch (_state){ case VideoState.STOPPED: case VideoState.PAUSED: case VideoState.DISCONNECTED: case VideoState.CONNECTION_ERROR: _updateTimeTimer.stop(); break; case VideoState.PLAYING: case VideoState.BUFFERING: if (((((((((!((_ncMgr == null))) && (!(_ncMgr.isRTMP)))) && ((_lastUpdateTime == _local2)))) && (!((_ns == null))))) && ((_ns.bytesLoaded == _ns.bytesTotal)))){ if (lastUpdateTimeStuckCount > lastUpdateTimeStuckCountMax){ lastUpdateTimeStuckCount = 0; httpDoStopAtEnd(); } else { lastUpdateTimeStuckCount++; }; }; }; if (_lastUpdateTime != _local2){ dispatchEvent(new VideoEvent(VideoEvent.PLAYHEAD_UPDATE, false, false, _state, _local2)); _lastUpdateTime = _local2; lastUpdateTimeStuckCount = 0; }; } flvplayback_internal function rtmpNetStatus(_arg1:NetStatusEvent):void{ if (_state == VideoState.CONNECTION_ERROR){ return; }; switch (_arg1.info.code){ case "NetStream.Play.Stop": if (_startingPlay){ return; }; switch (_state){ case VideoState.RESIZING: if (_hiddenForResize){ finishAutoResize(); }; break; case VideoState.LOADING: case VideoState.STOPPED: case VideoState.PAUSED: break; default: _sawPlayStop = true; if (((!(_rtmpDoStopAtEndTimer.running)) && ((((_bufferState == BUFFER_FLUSH)) || ((((_ns.bufferTime <= 0.1)) && ((_ns.bufferLength <= 0.1)))))))){ _cachedPlayheadTime = playheadTime; _rtmpDoStopAtEndTimer.reset(); _rtmpDoStopAtEndTimer.start(); }; break; }; break; case "NetStream.Buffer.Empty": switch (_bufferState){ case BUFFER_FULL: if (_sawPlayStop){ rtmpDoStopAtEnd(); } else { if (_state == VideoState.PLAYING){ setState(VideoState.BUFFERING); }; }; break; }; _bufferState = BUFFER_EMPTY; _sawPlayStop = false; break; case "NetStream.Buffer.Flush": if (((_sawSeekNotify) && ((_state == VideoState.SEEKING)))){ _bufferState = BUFFER_EMPTY; _sawPlayStop = false; setStateFromCachedState(false); doUpdateTime(); execQueuedCmds(); }; if (((((!(_rtmpDoStopAtEndTimer.running)) && (_sawPlayStop))) && ((((_bufferState == BUFFER_EMPTY)) || ((((_ns.bufferTime <= 0.1)) && ((_ns.bufferLength <= 0.1)))))))){ _cachedPlayheadTime = playheadTime; _rtmpDoStopAtEndTimer.reset(); _rtmpDoStopAtEndTimer.start(); }; switch (_bufferState){ case BUFFER_EMPTY: if (!_hiddenForResize){ if ((((((_state == VideoState.LOADING)) && ((_cachedState == VideoState.PLAYING)))) || ((_state == VideoState.BUFFERING)))){ setState(VideoState.PLAYING); } else { if (_cachedState == VideoState.BUFFERING){ _cachedState = VideoState.PLAYING; }; }; }; _bufferState = BUFFER_FLUSH; break; default: if (_state == VideoState.BUFFERING){ setStateFromCachedState(); }; break; }; break; case "NetStream.Buffer.Full": if (((_sawSeekNotify) && ((_state == VideoState.SEEKING)))){ _bufferState = BUFFER_EMPTY; _sawPlayStop = false; setStateFromCachedState(false); doUpdateTime(); execQueuedCmds(); }; switch (_bufferState){ case BUFFER_EMPTY: _bufferState = BUFFER_FULL; if (!_hiddenForResize){ if ((((((_state == VideoState.LOADING)) && ((_cachedState == VideoState.PLAYING)))) || ((_state == VideoState.BUFFERING)))){ setState(VideoState.PLAYING); } else { if (_cachedState == VideoState.BUFFERING){ _cachedState = VideoState.PLAYING; }; }; if (_rtmpDoStopAtEndTimer.running){ _sawPlayStop = true; _rtmpDoStopAtEndTimer.reset(); }; }; break; case BUFFER_FLUSH: _bufferState = BUFFER_FULL; if (_rtmpDoStopAtEndTimer.running){ _sawPlayStop = true; _rtmpDoStopAtEndTimer.reset(); }; break; }; if (_state == VideoState.BUFFERING){ setStateFromCachedState(); }; break; case "NetStream.Pause.Notify": if ((((_state == VideoState.RESIZING)) && (_hiddenForResize))){ finishAutoResize(); }; break; case "NetStream.Unpause.Notify": if (_state == VideoState.PAUSED){ _state = VideoState.PLAYING; setState(VideoState.BUFFERING); } else { _cachedState = VideoState.PLAYING; }; break; case "NetStream.Play.Start": _rtmpDoStopAtEndTimer.reset(); _bufferState = BUFFER_EMPTY; _sawPlayStop = false; if (_startingPlay){ _startingPlay = false; _cachedPlayheadTime = playheadTime; } else { if (_state == VideoState.PLAYING){ setState(VideoState.BUFFERING); }; }; break; case "NetStream.Play.Reset": _rtmpDoStopAtEndTimer.reset(); if (_state == VideoState.REWINDING){ _rtmpDoSeekTimer.reset(); if ((((playheadTime == 0)) || ((playheadTime < _cachedPlayheadTime)))){ setStateFromCachedState(); } else { _cachedPlayheadTime = playheadTime; _rtmpDoSeekTimer.start(); }; }; break; case "NetStream.Seek.Notify": if (playheadTime != _cachedPlayheadTime){ setStateFromCachedState(false); doUpdateTime(); execQueuedCmds(); } else { _sawSeekNotify = true; _rtmpDoSeekTimer.start(); }; break; case "Netstream.Play.UnpublishNotify": break; case "Netstream.Play.PublishNotify": break; case "NetStream.Play.StreamNotFound": if (!_ncMgr.connectAgain()){ setState(VideoState.CONNECTION_ERROR); }; break; case "NetStream.Play.Failed": case "NetStream.Failed": case "NetStream.Play.FileStructureInvalid": case "NetStream.Play.NoSupportedTrackFound": setState(VideoState.CONNECTION_ERROR); break; }; } public function set progressInterval(_arg1:Number):void{ _updateProgressTimer.delay = _arg1; } flvplayback_internal function onCuePoint(_arg1:Object):void{ if (((!(_hiddenForResize)) || (((!(isNaN(_hiddenRewindPlayheadTime))) && ((playheadTime < _hiddenRewindPlayheadTime)))))){ dispatchEvent(new MetadataEvent(MetadataEvent.CUE_POINT, false, false, _arg1)); }; } flvplayback_internal function createINCManager():void{ var theClass:Class; theClass = null; try { if ((iNCManagerClass is String)){ theClass = Class(getDefinitionByName(String(iNCManagerClass))); } else { if ((iNCManagerClass is Class)){ theClass = Class(iNCManagerClass); }; }; } catch(e:Error) { theClass = null; }; if (theClass == null){ throw (new VideoError(VideoError.INCMANAGER_CLASS_UNSET, ((iNCManagerClass)==null) ? "null" : iNCManagerClass.toString())); }; _ncMgr = new (theClass); _ncMgr.videoPlayer = this; } flvplayback_internal function doAutoResize(_arg1:TimerEvent=null):void{ var _local2:Boolean; var _local3:int; var _local4:int; var _local5:Number; var _local6:Number; if (_autoResizeTimer.running){ switch (_state){ case VideoState.RESIZING: case VideoState.LOADING: break; case VideoState.DISCONNECTED: case VideoState.CONNECTION_ERROR: _autoResizeTimer.reset(); return; default: if (!stateResponsive){ return; }; }; if (((((((((!((super.videoWidth == _prevVideoWidth))) || (!((super.videoHeight == _prevVideoHeight))))) || ((_bufferState == BUFFER_FULL)))) || ((_bufferState == BUFFER_FLUSH)))) || ((_ns.time > autoResizePlayheadTimeout)))){ if (((((_hiddenForResize) && (!(_ns.client.ready)))) && ((_hiddenForResizeMetadataDelay < autoResizeMetadataDelayMax)))){ _hiddenForResizeMetadataDelay++; return; }; _autoResizeTimer.reset(); } else { return; }; }; if (_autoResizeDone){ setState(_cachedState); return; }; oldBounds = new Rectangle(x, y, width, height); oldRegistrationBounds = new Rectangle(registrationX, registrationY, registrationWidth, registrationHeight); _autoResizeDone = true; _local2 = _readyDispatched; _readyDispatched = true; _local3 = videoWidth; _local4 = videoHeight; _readyDispatched = _local2; switch (_scaleMode){ case VideoScaleMode.NO_SCALE: super.width = _local3; super.height = _local4; break; case VideoScaleMode.EXACT_FIT: super.width = registrationWidth; super.height = registrationHeight; break; case VideoScaleMode.MAINTAIN_ASPECT_RATIO: default: _local5 = ((_local3 * _registrationHeight) / _local4); _local6 = ((_local4 * _registrationWidth) / _local3); if (_local6 < _registrationHeight){ super.width = _registrationWidth; super.height = _local6; } else { if (_local5 < _registrationWidth){ super.width = _local5; super.height = _registrationHeight; } else { super.width = _registrationWidth; super.height = _registrationHeight; }; }; }; switch (_align){ case VideoAlign.CENTER: case VideoAlign.TOP: case VideoAlign.BOTTOM: default: super.x = (_registrationX + ((_registrationWidth - width) / 2)); break; case VideoAlign.LEFT: case VideoAlign.TOP_LEFT: case VideoAlign.BOTTOM_LEFT: super.x = _registrationX; break; case VideoAlign.RIGHT: case VideoAlign.TOP_RIGHT: case VideoAlign.BOTTOM_RIGHT: super.x = (_registrationX + (_registrationWidth - width)); break; }; switch (_align){ case VideoAlign.CENTER: case VideoAlign.LEFT: case VideoAlign.RIGHT: default: super.y = (_registrationY + ((_registrationHeight - height) / 2)); break; case VideoAlign.TOP: case VideoAlign.TOP_LEFT: case VideoAlign.TOP_RIGHT: super.y = _registrationY; break; case VideoAlign.BOTTOM: case VideoAlign.BOTTOM_LEFT: case VideoAlign.BOTTOM_RIGHT: super.y = (_registrationY + (_registrationHeight - height)); break; }; if (_hiddenForResize){ _hiddenRewindPlayheadTime = playheadTime; if (_state == VideoState.LOADING){ _cachedState = VideoState.PLAYING; }; if (!_ncMgr.isRTMP){ _pause(true); _seek(0); _finishAutoResizeTimer.reset(); _finishAutoResizeTimer.start(); } else { if (!_isLive){ _currentPos = 0; _play(0, 0); setState(VideoState.RESIZING); } else { if (_autoPlay){ _finishAutoResizeTimer.reset(); _finishAutoResizeTimer.start(); } else { finishAutoResize(); }; }; }; } else { dispatchEvent(new AutoLayoutEvent(AutoLayoutEvent.AUTO_LAYOUT, false, false, oldBounds, oldRegistrationBounds)); }; } public function get totalTime():Number{ return (_streamLength); } public function get ncMgr():INCManager{ if (_ncMgr == null){ createINCManager(); }; return (_ncMgr); } public function set volume(_arg1:Number):void{ var _local2:SoundTransform; _local2 = soundTransform; _local2.volume = _arg1; soundTransform = _local2; } flvplayback_internal function _play(_arg1:int=0, _arg2:int=-1):void{ waitingForEnough = false; _rtmpDoStopAtEndTimer.reset(); _startingPlay = true; _ns.play(_ncMgr.streamName, (_isLive) ? -1 : _arg1, _arg2); } flvplayback_internal function finishAutoResize(_arg1:TimerEvent=null):void{ if (stateResponsive){ return; }; _hiddenForResize = false; super.visible = __visible; volume = _volume; dispatchEvent(new AutoLayoutEvent(AutoLayoutEvent.AUTO_LAYOUT, false, false, oldBounds, oldRegistrationBounds)); if (_autoPlay){ if (_ncMgr.isRTMP){ if (!_isLive){ _currentPos = 0; _play(0); }; if (_state == VideoState.RESIZING){ setState(VideoState.LOADING); _cachedState = VideoState.PLAYING; }; } else { waitingForEnough = true; _cachedState = _state; _state = VideoState.PAUSED; checkReadyForPlay(bytesLoaded, bytesTotal); if (waitingForEnough){ _state = _cachedState; setState(VideoState.PAUSED); } else { _cachedState = VideoState.PLAYING; }; }; } else { setState(VideoState.STOPPED); }; } public function set soundTransform(_arg1:SoundTransform):void{ if (_arg1 == null){ return; }; if (_hiddenForResize){ _volume = _arg1.volume; }; _soundTransform = new SoundTransform(); _soundTransform.volume = (_hiddenForResize) ? 0 : _arg1.volume; _soundTransform.leftToLeft = _arg1.leftToLeft; _soundTransform.leftToRight = _arg1.leftToRight; _soundTransform.rightToLeft = _arg1.rightToLeft; _soundTransform.rightToRight = _arg1.rightToRight; if (_ns != null){ _ns.soundTransform = _soundTransform; }; } flvplayback_internal function httpDoSeek(_arg1:TimerEvent):void{ var _local2:Boolean; _local2 = (((_state == VideoState.REWINDING)) || ((_state == VideoState.SEEKING))); if (((((_local2) && ((_httpDoSeekCount < httpDoSeekMaxCount)))) && ((((_cachedPlayheadTime == playheadTime)) || (_invalidSeekTime))))){ _httpDoSeekCount++; return; }; _httpDoSeekCount = 0; _httpDoSeekTimer.reset(); if (!_local2){ return; }; setStateFromCachedState(false); if (_invalidSeekTime){ _invalidSeekTime = false; _invalidSeekRecovery = true; seek(playheadTime); } else { doUpdateTime(); _lastSeekTime = playheadTime; execQueuedCmds(); }; } public function get bytesLoaded():uint{ if ((((_ns == null)) || (_ncMgr.isRTMP))){ return (uint.MIN_VALUE); }; return (_ns.bytesLoaded); } override public function set height(_arg1:Number):void{ super.height = (_registrationHeight = _arg1); switch (_scaleMode){ case VideoScaleMode.MAINTAIN_ASPECT_RATIO: case VideoScaleMode.NO_SCALE: startAutoResize(); break; default: super.height = _arg1; break; }; } flvplayback_internal function httpNetStatus(_arg1:NetStatusEvent):void{ switch (_arg1.info.code){ case "NetStream.Play.Stop": _delayedBufferingTimer.reset(); if (_invalidSeekTime){ _invalidSeekTime = false; _invalidSeekRecovery = true; setState(_cachedState); seek(playheadTime); } else { switch (_state){ case VideoState.SEEKING: httpDoSeek(null); case VideoState.PLAYING: case VideoState.BUFFERING: httpDoStopAtEnd(); break; }; }; break; case "NetStream.Seek.InvalidTime": if (_invalidSeekRecovery){ _invalidSeekTime = false; _invalidSeekRecovery = false; setState(_cachedState); seek(0); } else { _invalidSeekTime = true; _httpDoSeekCount = 0; _httpDoSeekTimer.start(); }; break; case "NetStream.Buffer.Empty": _bufferState = BUFFER_EMPTY; if (_state == VideoState.PLAYING){ _delayedBufferingTimer.reset(); _delayedBufferingTimer.start(); }; break; case "NetStream.Buffer.Full": case "NetStream.Buffer.Flush": _delayedBufferingTimer.reset(); _bufferState = BUFFER_FULL; if (!_hiddenForResize){ if ((((((_state == VideoState.LOADING)) && ((_cachedState == VideoState.PLAYING)))) || ((_state == VideoState.BUFFERING)))){ setState(VideoState.PLAYING); } else { if (_cachedState == VideoState.BUFFERING){ _cachedState = VideoState.PLAYING; }; }; }; break; case "NetStream.Seek.Notify": _invalidSeekRecovery = false; switch (_state){ case VideoState.SEEKING: case VideoState.REWINDING: _httpDoSeekCount = 0; _httpDoSeekTimer.start(); break; }; break; case "NetStream.Play.StreamNotFound": case "NetStream.Play.FileStructureInvalid": case "NetStream.Play.NoSupportedTrackFound": setState(VideoState.CONNECTION_ERROR); break; }; } public function get netConnection():NetConnection{ if (_ncMgr != null){ return (_ncMgr.netConnection); }; return (null); } public function set bufferTime(_arg1:Number):void{ _bufferTime = _arg1; if (_ns != null){ _ns.bufferTime = _bufferTime; }; } flvplayback_internal function onMetaData(_arg1:Object):void{ if (_metadata != null){ return; }; _metadata = _arg1; if (isNaN(_streamLength)){ _streamLength = _arg1.duration; }; if (((_resizeImmediatelyOnMetadata) && (_ns.client.ready))){ _resizeImmediatelyOnMetadata = false; _autoResizeTimer.reset(); _autoResizeDone = false; doAutoResize(); }; dispatchEvent(new MetadataEvent(MetadataEvent.METADATA_RECEIVED, false, false, _arg1)); } flvplayback_internal function queueCmd(_arg1:Number, _arg2:String=null, _arg3:Boolean=false, _arg4:Number=NaN):void{ _cmdQueue.push(new QueuedCommand(_arg1, _arg2, _arg3, _arg4)); } public function set registrationHeight(_arg1:Number):void{ height = _arg1; } override public function get visible():Boolean{ if (!_hiddenForResize){ __visible = super.visible; }; return (__visible); } public function seek(_arg1:Number):void{ if (_invalidSeekTime){ return; }; if (((isNaN(_arg1)) || ((_arg1 < 0)))){ throw (new VideoError(VideoError.INVALID_SEEK)); }; if (!isXnOK()){ if ((((((_state == VideoState.CONNECTION_ERROR)) || ((_ncMgr == null)))) || ((_ncMgr.netConnection == null)))){ throw (new VideoError(VideoError.NO_CONNECTION)); }; flushQueuedCmds(); queueCmd(QueuedCommand.SEEK, null, false, _arg1); setState(VideoState.LOADING); _cachedState = VideoState.LOADING; _ncMgr.reconnect(); return; } else { if (_state == VideoState.EXEC_QUEUED_CMD){ _state = _cachedState; } else { if (!stateResponsive){ queueCmd(QueuedCommand.SEEK, null, false, _arg1); return; }; execQueuedCmds(); }; }; if (_ns == null){ _createStream(); }; if (((_atEnd) && ((_arg1 < playheadTime)))){ _atEnd = false; }; switch (_state){ case VideoState.PLAYING: _state = VideoState.BUFFERING; case VideoState.BUFFERING: case VideoState.PAUSED: _seek(_arg1); setState(VideoState.SEEKING); break; case VideoState.STOPPED: if (_ncMgr.isRTMP){ _play(0); _pause(true); }; _seek(_arg1); _state = VideoState.PAUSED; setState(VideoState.SEEKING); break; }; } public function get state():String{ return (_state); } public function set autoRewind(_arg1:Boolean):void{ _autoRewind = _arg1; } override public function set scaleX(_arg1:Number):void{ super.scaleX = _arg1; _registrationWidth = width; switch (_scaleMode){ case VideoScaleMode.MAINTAIN_ASPECT_RATIO: case VideoScaleMode.NO_SCALE: startAutoResize(); break; }; } override public function set scaleY(_arg1:Number):void{ super.scaleY = _arg1; _registrationHeight = height; switch (_scaleMode){ case VideoScaleMode.MAINTAIN_ASPECT_RATIO: case VideoScaleMode.NO_SCALE: startAutoResize(); break; }; } public function get registrationWidth():Number{ return (_registrationWidth); } flvplayback_internal function flushQueuedCmds():void{ while (_cmdQueue.length > 0) { _cmdQueue.pop(); }; } public function get registrationX():Number{ return (_registrationX); } flvplayback_internal function _setUpStream():void{ if (((!(isNaN(_ncMgr.streamLength))) && ((_ncMgr.streamLength >= 0)))){ _streamLength = _ncMgr.streamLength; }; _videoWidth = ((_ncMgr.streamWidth)>=0) ? _ncMgr.streamWidth : -1; _videoHeight = ((_ncMgr.streamHeight)>=0) ? _ncMgr.streamHeight : -1; _resizeImmediatelyOnMetadata = (((((_videoWidth >= 0)) && ((_videoHeight >= 0)))) || ((_scaleMode == VideoScaleMode.EXACT_FIT))); if (!_hiddenForResize){ __visible = super.visible; super.visible = false; _volume = volume; volume = 0; _hiddenForResize = true; }; _hiddenForResizeMetadataDelay = 0; _play(0); if (_currentPos > 0){ _seek(_currentPos); _currentPos = 0; }; _autoResizeTimer.reset(); _autoResizeTimer.start(); } public function get registrationY():Number{ return (_registrationY); } flvplayback_internal function httpDoStopAtEnd():void{ if ((((((_atEndCheckPlayhead == playheadTime)) && (!((_atEndCheckPlayhead == _lastUpdateTime))))) && (!((playheadTime == 0))))){ _atEnd = false; _seek(0); return; }; _atEndCheckPlayhead = NaN; _atEnd = true; if (isNaN(_streamLength)){ _streamLength = _ns.time; }; _pause(true); setState(VideoState.STOPPED); if (_state != VideoState.STOPPED){ return; }; doUpdateTime(); if (_state != VideoState.STOPPED){ return; }; dispatchEvent(new VideoEvent(VideoEvent.COMPLETE, false, false, _state, playheadTime)); if (_state != VideoState.STOPPED){ return; }; if (_autoRewind){ _atEnd = false; _pause(true); _seek(0); setState(VideoState.REWINDING); }; } public function ncConnected():void{ if ((((_ncMgr == null)) || ((_ncMgr.netConnection == null)))){ setState(VideoState.CONNECTION_ERROR); } else { if (_ns == null){ _createStream(); _setUpStream(); }; }; } override public function set visible(_arg1:Boolean):void{ __visible = _arg1; if (!_hiddenForResize){ super.visible = __visible; }; } public function load(_arg1:String, _arg2:Number=NaN, _arg3:Boolean=false):void{ if (_arg1 == null){ throw (new VideoError(VideoError.NULL_URL_LOAD)); }; if (_state == VideoState.EXEC_QUEUED_CMD){ _state = _cachedState; } else { if (((((!(stateResponsive)) && (!((_state == VideoState.DISCONNECTED))))) && (!((_state == VideoState.CONNECTION_ERROR))))){ queueCmd(QueuedCommand.LOAD, _arg1, _arg3, _arg2); return; }; execQueuedCmds(); }; _autoPlay = false; _load(_arg1, _arg2, _arg3); } override public function set x(_arg1:Number):void{ var _local2:Number; if (this.x != _arg1){ _local2 = (_arg1 - this.x); super.x = _arg1; _registrationX = (_registrationX + _local2); }; } override public function set y(_arg1:Number):void{ var _local2:Number; if (this.y != _arg1){ _local2 = (_arg1 - this.y); super.y = _arg1; _registrationY = (_registrationY + _local2); }; } flvplayback_internal function _pause(_arg1:Boolean):void{ _atEndCheckPlayhead = playheadTime; _rtmpDoStopAtEndTimer.reset(); if (_arg1){ _ns.pause(); } else { _ns.resume(); }; } public function get playheadUpdateInterval():Number{ return (_updateTimeTimer.delay); } flvplayback_internal function doDelayedBuffering(_arg1:TimerEvent):void{ switch (_state){ case VideoState.LOADING: case VideoState.RESIZING: break; case VideoState.PLAYING: _delayedBufferingTimer.reset(); if (((((((((!(isNaN(totalTime))) && ((totalTime > 0)))) && ((bytesLoaded > 0)))) && ((bytesLoaded < uint.MAX_VALUE)))) && ((bytesLoaded < bytesTotal)))){ pause(); if (_state == VideoState.PAUSED){ waitingForEnough = true; playWhenEnoughDownloaded(); }; } else { setState(VideoState.BUFFERING); }; break; default: _delayedBufferingTimer.reset(); break; }; } flvplayback_internal function createNetStreamClient():Object{ var theClass:Class; var theInst:Object; theClass = null; theInst = null; try { if ((netStreamClientClass is String)){ theClass = Class(getDefinitionByName(String(netStreamClientClass))); } else { if ((netStreamClientClass is Class)){ theClass = Class(netStreamClientClass); }; }; if (theClass != null){ theInst = new theClass(this); }; } catch(e:Error) { theClass = null; theInst = null; }; if (theInst == null){ throw (new VideoError(VideoError.NETSTREAM_CLIENT_CLASS_UNSET, ((netStreamClientClass)==null) ? "null" : netStreamClientClass.toString())); }; return (theInst); } public function get align():String{ return (_align); } public function set registrationWidth(_arg1:Number):void{ width = _arg1; } public function get stateResponsive():Boolean{ switch (_state){ case VideoState.STOPPED: case VideoState.PLAYING: case VideoState.PAUSED: case VideoState.BUFFERING: return (true); default: return (false); }; } public function get volume():Number{ return (soundTransform.volume); } public function get soundTransform():SoundTransform{ var _local1:SoundTransform; if (_ns != null){ _soundTransform = _ns.soundTransform; }; _local1 = new SoundTransform(); _local1.volume = (_hiddenForResize) ? _volume : _soundTransform.volume; _local1.leftToLeft = _soundTransform.leftToLeft; _local1.leftToRight = _soundTransform.leftToRight; _local1.rightToLeft = _soundTransform.rightToLeft; _local1.rightToRight = _soundTransform.rightToRight; return (_local1); } public function get bufferTime():Number{ if (_ns != null){ _bufferTime = _ns.bufferTime; }; return (_bufferTime); } public function get metadata():Object{ return (_metadata); } public function play(_arg1:String=null, _arg2:Number=NaN, _arg3:Boolean=false):void{ if (_arg1 != null){ if (_state == VideoState.EXEC_QUEUED_CMD){ _state = _cachedState; } else { if (((((!(stateResponsive)) && (!((_state == VideoState.DISCONNECTED))))) && (!((_state == VideoState.CONNECTION_ERROR))))){ queueCmd(QueuedCommand.PLAY, _arg1, _arg3, _arg2); return; }; execQueuedCmds(); }; _autoPlay = true; _load(_arg1, _arg2, _arg3); return; }; if (!isXnOK()){ if ((((((_state == VideoState.CONNECTION_ERROR)) || ((_ncMgr == null)))) || ((_ncMgr.netConnection == null)))){ throw (new VideoError(VideoError.NO_CONNECTION)); }; flushQueuedCmds(); queueCmd(QueuedCommand.PLAY); setState(VideoState.LOADING); _cachedState = VideoState.LOADING; _ncMgr.reconnect(); return; } else { if (_state == VideoState.EXEC_QUEUED_CMD){ _state = _cachedState; } else { if (!stateResponsive){ queueCmd(QueuedCommand.PLAY); return; }; execQueuedCmds(); }; }; if (_ns == null){ _createStream(); }; switch (_state){ case VideoState.BUFFERING: if (_ncMgr.isRTMP){ _play(0); if (_atEnd){ _atEnd = false; _currentPos = 0; setState(VideoState.REWINDING); } else { if (_currentPos > 0){ _seek(_currentPos); _currentPos = 0; }; }; }; case VideoState.PLAYING: return; case VideoState.STOPPED: if (_ncMgr.isRTMP){ if (_isLive){ _play(-1); setState(VideoState.BUFFERING); } else { _play(0); if (_atEnd){ _atEnd = false; _currentPos = 0; _state = VideoState.BUFFERING; setState(VideoState.REWINDING); } else { if (_currentPos > 0){ _seek(_currentPos); _currentPos = 0; setState(VideoState.BUFFERING); } else { setState(VideoState.BUFFERING); }; }; }; } else { _pause(false); if (_atEnd){ _atEnd = false; _seek(0); _state = VideoState.BUFFERING; setState(VideoState.REWINDING); } else { if (_bufferState == BUFFER_EMPTY){ setState(VideoState.BUFFERING); } else { setState(VideoState.PLAYING); }; }; }; break; case VideoState.PAUSED: _pause(false); if (!_ncMgr.isRTMP){ if (_bufferState == BUFFER_EMPTY){ setState(VideoState.BUFFERING); } else { setState(VideoState.PLAYING); }; } else { setState(VideoState.BUFFERING); }; break; }; } public function get isLive():Boolean{ return (_isLive); } flvplayback_internal function setStateFromCachedState(_arg1:Boolean=true):void{ switch (_cachedState){ case VideoState.PLAYING: case VideoState.PAUSED: case VideoState.BUFFERING: setState(_cachedState, _arg1); break; default: setState(VideoState.STOPPED, _arg1); break; }; } public function get idleTimeout():Number{ return (_idleTimeoutTimer.delay); } public function get registrationHeight():Number{ return (_registrationHeight); } public function ncReconnected():void{ if ((((_ncMgr == null)) || ((_ncMgr.netConnection == null)))){ setState(VideoState.CONNECTION_ERROR); } else { _ns = null; _state = VideoState.STOPPED; execQueuedCmds(); }; } flvplayback_internal function startAutoResize():void{ switch (_state){ case VideoState.DISCONNECTED: case VideoState.CONNECTION_ERROR: return; default: if (_ns == null){ return; }; _autoResizeDone = false; if (((stateResponsive) && (((((((((!((super.videoWidth == 0))) || (!((super.videoHeight == 0))))) || ((_bufferState == BUFFER_FULL)))) || ((_bufferState == BUFFER_FLUSH)))) || ((_ns.time > autoResizePlayheadTimeout)))))){ doAutoResize(); } else { _autoResizeTimer.reset(); _autoResizeTimer.start(); }; break; }; } flvplayback_internal function setState(_arg1:String, _arg2:Boolean=true):void{ var _local3:String; if (_arg1 == _state){ return; }; _hiddenRewindPlayheadTime = NaN; _cachedState = _state; _cachedPlayheadTime = playheadTime; _state = _arg1; _local3 = _state; dispatchEvent(new VideoEvent(VideoEvent.STATE_CHANGE, false, false, _local3, playheadTime)); if (!_readyDispatched){ switch (_local3){ case VideoState.STOPPED: case VideoState.PLAYING: case VideoState.PAUSED: case VideoState.BUFFERING: _readyDispatched = true; dispatchEvent(new VideoEvent(VideoEvent.READY, false, false, _local3, playheadTime)); break; }; }; switch (_cachedState){ case VideoState.REWINDING: dispatchEvent(new VideoEvent(VideoEvent.AUTO_REWOUND, false, false, _local3, playheadTime)); if (((_ncMgr.isRTMP) && ((_local3 == VideoState.STOPPED)))){ closeNS(); }; break; }; switch (_local3){ case VideoState.STOPPED: case VideoState.PAUSED: if (_ncMgr.isRTMP){ _idleTimeoutTimer.reset(); _idleTimeoutTimer.start(); }; break; case VideoState.SEEKING: case VideoState.REWINDING: _bufferState = BUFFER_EMPTY; _sawPlayStop = false; _idleTimeoutTimer.reset(); break; case VideoState.PLAYING: case VideoState.BUFFERING: _updateTimeTimer.start(); _idleTimeoutTimer.reset(); break; case VideoState.LOADING: case VideoState.RESIZING: _idleTimeoutTimer.reset(); break; }; if (_arg2){ execQueuedCmds(); }; } flvplayback_internal function _seek(_arg1:Number):void{ _rtmpDoStopAtEndTimer.reset(); if (((((!((_metadata == null))) && (!((_metadata.audiodelay == undefined))))) && (((isNaN(_streamLength)) || (((_arg1 + _metadata.audiodelay) < _streamLength)))))){ _arg1 = (_arg1 + _metadata.audiodelay); }; _ns.seek(_arg1); _lastSeekTime = _arg1; _invalidSeekTime = false; _bufferState = BUFFER_EMPTY; _sawPlayStop = false; _sawSeekNotify = false; } public function get autoRewind():Boolean{ return (_autoRewind); } flvplayback_internal function doIdleTimeout(_arg1:TimerEvent):void{ close(); } public function playWhenEnoughDownloaded():void{ if (((!((_ncMgr == null))) && (_ncMgr.isRTMP))){ play(); return; }; if (!isXnOK()){ throw (new VideoError(VideoError.NO_CONNECTION)); }; if (_state == VideoState.EXEC_QUEUED_CMD){ _state = _cachedState; } else { if (!stateResponsive){ queueCmd(QueuedCommand.PLAY_WHEN_ENOUGH); return; }; execQueuedCmds(); }; waitingForEnough = true; checkReadyForPlay(bytesLoaded, bytesTotal); } flvplayback_internal function rtmpDoSeek(_arg1:TimerEvent):void{ if (((!((_state == VideoState.REWINDING))) && (!((_state == VideoState.SEEKING))))){ _rtmpDoSeekTimer.reset(); _sawSeekNotify = false; } else { if (playheadTime != _cachedPlayheadTime){ _rtmpDoSeekTimer.reset(); _sawSeekNotify = false; setStateFromCachedState(false); doUpdateTime(); _lastSeekTime = playheadTime; execQueuedCmds(); }; }; } public function get netStream():NetStream{ return (_ns); } override public function get videoHeight():int{ if (_videoHeight > 0){ return (_videoHeight); }; if (((((!((_metadata == null))) && (!(isNaN(_metadata.width))))) && (!(isNaN(_metadata.height))))){ if ((((_metadata.width == _metadata.height)) && (_readyDispatched))){ return (super.videoHeight); }; return (int(_metadata.height)); }; if (_readyDispatched){ return (super.videoHeight); }; return (-1); } public function set registrationX(_arg1:Number):void{ var _local2:Number; if (_registrationX != _arg1){ _local2 = (_arg1 - _registrationX); _registrationX = _arg1; this.x = (this.x + _local2); }; } public function set registrationY(_arg1:Number):void{ var _local2:Number; if (_registrationY != _arg1){ _local2 = (_arg1 - _registrationY); _registrationY = _arg1; this.y = (this.y + _local2); }; } flvplayback_internal function doUpdateProgress(_arg1:TimerEvent):void{ var _local2:uint; var _local3:uint; if (_ns == null){ return; }; _local2 = _ns.bytesLoaded; _local3 = _ns.bytesTotal; if (_local3 < uint.MAX_VALUE){ dispatchEvent(new VideoProgressEvent(VideoProgressEvent.PROGRESS, false, false, _local2, _local3)); }; if ((((((_state == VideoState.DISCONNECTED)) || ((_state == VideoState.CONNECTION_ERROR)))) || ((_local2 >= _local3)))){ _updateProgressTimer.stop(); }; checkEnoughDownloaded(_local2, _local3); } override public function set width(_arg1:Number):void{ super.width = (_registrationWidth = _arg1); switch (_scaleMode){ case VideoScaleMode.MAINTAIN_ASPECT_RATIO: case VideoScaleMode.NO_SCALE: startAutoResize(); break; default: super.width = _arg1; break; }; } public function get isRTMP():Boolean{ if (_ncMgr == null){ return (false); }; return (_ncMgr.isRTMP); } public function get bytesTotal():uint{ if ((((_ns == null)) || (_ncMgr.isRTMP))){ return (uint.MAX_VALUE); }; return (_ns.bytesTotal); } public function setSize(_arg1:Number, _arg2:Number):void{ super.width = (_registrationWidth = _arg1); super.height = (_registrationHeight = _arg2); switch (_scaleMode){ case VideoScaleMode.MAINTAIN_ASPECT_RATIO: case VideoScaleMode.NO_SCALE: startAutoResize(); break; default: super.x = _registrationX; super.y = _registrationY; break; }; } flvplayback_internal function isXnOK():Boolean{ if (_state == VideoState.LOADING){ return (true); }; if (_state == VideoState.CONNECTION_ERROR){ return (false); }; if (_state != VideoState.DISCONNECTED){ if ((((((_ncMgr == null)) || ((_ncMgr.netConnection == null)))) || (((_ncMgr.isRTMP) && (!(_ncMgr.netConnection.connected)))))){ setState(VideoState.DISCONNECTED); return (false); }; return (true); }; return (false); } flvplayback_internal function _createStream():void{ var _local1:NetStream; _ns = null; _local1 = new NetStream(_ncMgr.netConnection); if (_ncMgr.isRTMP){ _local1.addEventListener(NetStatusEvent.NET_STATUS, rtmpNetStatus); } else { _local1.addEventListener(NetStatusEvent.NET_STATUS, httpNetStatus); }; _local1.client = createNetStreamClient(); _local1.bufferTime = _bufferTime; _local1.soundTransform = soundTransform; _ns = _local1; attachNetStream(_ns); } flvplayback_internal function checkReadyForPlay(_arg1:uint, _arg2:uint):void{ var _local3:Number; if (_arg1 >= _arg2){ waitingForEnough = false; _cachedState = _state; _state = VideoState.EXEC_QUEUED_CMD; play(); execQueuedCmds(); return; }; if (isNaN(baselineProgressTime)){ return; }; if (((isNaN(totalTime)) || ((totalTime < 0)))){ waitingForEnough = false; _cachedState = _state; _state = VideoState.EXEC_QUEUED_CMD; play(); execQueuedCmds(); } else { if (totalDownloadTime > 1.5){ _local3 = ((totalProgressTime - baselineProgressTime) / totalDownloadTime); if ((totalTime - playheadTime) > ((totalTime - totalProgressTime) / _local3)){ waitingForEnough = false; _cachedState = _state; _state = VideoState.EXEC_QUEUED_CMD; play(); execQueuedCmds(); }; }; }; } flvplayback_internal function closeNS(_arg1:Boolean=false):void{ if (_ns != null){ if (_arg1){ doUpdateTime(); _currentPos = _ns.time; }; _updateTimeTimer.reset(); _updateProgressTimer.reset(); _idleTimeoutTimer.reset(); _autoResizeTimer.reset(); _rtmpDoStopAtEndTimer.reset(); _rtmpDoSeekTimer.reset(); _httpDoSeekTimer.reset(); _finishAutoResizeTimer.reset(); _delayedBufferingTimer.reset(); _ns.removeEventListener(NetStatusEvent.NET_STATUS, rtmpNetStatus); _ns.removeEventListener(NetStatusEvent.NET_STATUS, httpNetStatus); _ns.close(); _ns = null; }; } flvplayback_internal function _load(_arg1:String, _arg2:Number, _arg3:Boolean):void{ var _local4:Boolean; _prevVideoWidth = super.videoWidth; _prevVideoHeight = super.videoHeight; _autoResizeDone = false; _cachedPlayheadTime = 0; _bufferState = BUFFER_EMPTY; _sawPlayStop = false; _metadata = null; _startingPlay = false; _invalidSeekTime = false; _invalidSeekRecovery = false; _isLive = _arg3; _contentPath = _arg1; _currentPos = 0; _streamLength = (((isNaN(_arg2)) || ((_arg2 <= 0)))) ? NaN : _arg2; _atEnd = false; _readyDispatched = false; _lastUpdateTime = NaN; lastUpdateTimeStuckCount = 0; _sawSeekNotify = false; waitingForEnough = false; baselineProgressTime = NaN; startProgressTime = NaN; totalDownloadTime = NaN; totalProgressTime = NaN; _httpDoSeekCount = 0; _updateTimeTimer.reset(); _updateProgressTimer.reset(); _idleTimeoutTimer.reset(); _autoResizeTimer.reset(); _rtmpDoStopAtEndTimer.reset(); _rtmpDoSeekTimer.reset(); _httpDoSeekTimer.reset(); _finishAutoResizeTimer.reset(); _delayedBufferingTimer.reset(); closeNS(false); if (_ncMgr == null){ createINCManager(); }; _local4 = _ncMgr.connectToURL(_contentPath); setState(VideoState.LOADING); _cachedState = VideoState.LOADING; if (_local4){ _createStream(); _setUpStream(); }; if (!_ncMgr.isRTMP){ _updateProgressTimer.start(); }; } flvplayback_internal function rtmpDoStopAtEnd(_arg1:TimerEvent=null):void{ if (_rtmpDoStopAtEndTimer.running){ switch (_state){ case VideoState.DISCONNECTED: case VideoState.CONNECTION_ERROR: _rtmpDoStopAtEndTimer.reset(); return; }; if ((((_arg1 == null)) || ((_cachedPlayheadTime == playheadTime)))){ _rtmpDoStopAtEndTimer.reset(); } else { _cachedPlayheadTime = playheadTime; return; }; }; if ((((((((_atEndCheckPlayhead == playheadTime)) && (!((_atEndCheckPlayhead == _lastSeekTime))))) && (!(_isLive)))) && (!((playheadTime == 0))))){ _atEnd = false; _currentPos = 0; _play(0); return; }; _atEndCheckPlayhead = NaN; _bufferState = BUFFER_EMPTY; _sawPlayStop = false; _atEnd = true; setState(VideoState.STOPPED); if (_state != VideoState.STOPPED){ return; }; doUpdateTime(); if (_state != VideoState.STOPPED){ return; }; dispatchEvent(new VideoEvent(VideoEvent.COMPLETE, false, false, _state, playheadTime)); if (_state != VideoState.STOPPED){ return; }; if (((((_autoRewind) && (!(_isLive)))) && (!((playheadTime == 0))))){ _atEnd = false; _currentPos = 0; _play(0, 0); setState(VideoState.REWINDING); } else { closeNS(); }; } public function set idleTimeout(_arg1:Number):void{ _idleTimeoutTimer.delay = _arg1; } public function set playheadUpdateInterval(_arg1:Number):void{ _updateTimeTimer.delay = _arg1; } flvplayback_internal function checkEnoughDownloaded(_arg1:uint, _arg2:uint):void{ if ((((_arg1 == 0)) || ((_arg2 == uint.MAX_VALUE)))){ return; }; if (((isNaN(totalTime)) || ((totalTime <= 0)))){ if (((waitingForEnough) && (stateResponsive))){ waitingForEnough = false; _cachedState = _state; _state = VideoState.EXEC_QUEUED_CMD; play(); execQueuedCmds(); }; return; }; if (_arg1 >= _arg2){ if (waitingForEnough){ waitingForEnough = false; _cachedState = _state; _state = VideoState.EXEC_QUEUED_CMD; play(); execQueuedCmds(); }; return; }; if (isNaN(baselineProgressTime)){ baselineProgressTime = ((_arg1 / _arg2) * totalTime); }; if (isNaN(startProgressTime)){ startProgressTime = getTimer(); } else { totalDownloadTime = ((getTimer() - startProgressTime) / 1000); totalProgressTime = ((_arg1 / _arg2) * totalTime); if (waitingForEnough){ checkReadyForPlay(_arg1, _arg2); }; }; } public function close():void{ closeNS(true); if (((!((_ncMgr == null))) && (_ncMgr.isRTMP))){ _ncMgr.close(); }; setState(VideoState.DISCONNECTED); dispatchEvent(new VideoEvent(VideoEvent.CLOSE, false, false, _state, playheadTime)); } public function pause():void{ if (!isXnOK()){ if ((((((_state == VideoState.CONNECTION_ERROR)) || ((_ncMgr == null)))) || ((_ncMgr.netConnection == null)))){ throw (new VideoError(VideoError.NO_CONNECTION)); }; return; } else { if (_state == VideoState.EXEC_QUEUED_CMD){ _state = _cachedState; } else { if (!stateResponsive){ queueCmd(QueuedCommand.PAUSE); return; }; execQueuedCmds(); }; }; if ((((((_state == VideoState.PAUSED)) || ((_state == VideoState.STOPPED)))) || ((_ns == null)))){ return; }; _pause(true); setState(VideoState.PAUSED); } } }//package fl.video
Section 40
//VideoPlayerClient (fl.video.VideoPlayerClient) package fl.video { public dynamic class VideoPlayerClient { protected var _owner:VideoPlayer; protected var gotMetadata:Boolean; public function VideoPlayerClient(_arg1:VideoPlayer){ _owner = _arg1; gotMetadata = false; } public function get ready():Boolean{ return (gotMetadata); } public function onMetaData(_arg1:Object, ... _args):void{ _arg1.duration; _arg1.width; _arg1.height; _owner.onMetaData(_arg1); gotMetadata = true; } public function get owner():VideoPlayer{ return (_owner); } public function onCuePoint(_arg1:Object, ... _args):void{ _arg1.name; _arg1.time; _arg1.type; _owner.onCuePoint(_arg1); } } }//package fl.video
Section 41
//VideoPlayerState (fl.video.VideoPlayerState) package fl.video { public class VideoPlayerState { public var autoPlay:Boolean; public var isWaiting:Boolean; public var isLiveSet:Boolean; public var index:int; public var prevState:String; public var preSeekTime:Number; public var minProgressPercent:Number; public var url:String; public var totalTime:Number; public var owner:VideoPlayer; public var isLive:Boolean; public var cmdQueue:Array; public var totalTimeSet:Boolean; public function VideoPlayerState(_arg1:VideoPlayer, _arg2:int){ this.owner = _arg1; this.index = _arg2; this.url = ""; this.isLive = false; this.isLiveSet = true; this.totalTime = NaN; this.totalTimeSet = true; this.autoPlay = (_arg2 == 0); this.isWaiting = false; this.preSeekTime = NaN; this.cmdQueue = null; } } }//package fl.video
Section 42
//VideoProgressEvent (fl.video.VideoProgressEvent) package fl.video { import flash.events.*; public class VideoProgressEvent extends ProgressEvent implements IVPEvent { private var _vp:uint; public static const PROGRESS:String = "progress"; public function VideoProgressEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:uint=0, _arg5:uint=0, _arg6:uint=0){ super(_arg1, _arg2, _arg3, _arg4, _arg5); _vp = _arg6; } override public function clone():Event{ return (new VideoProgressEvent(type, bubbles, cancelable, bytesLoaded, bytesTotal, vp)); } public function set vp(_arg1:uint):void{ _vp = _arg1; } public function get vp():uint{ return (_vp); } } }//package fl.video
Section 43
//VideoScaleMode (fl.video.VideoScaleMode) package fl.video { public final class VideoScaleMode { public static const EXACT_FIT:String = "exactFit"; public static const MAINTAIN_ASPECT_RATIO:String = "maintainAspectRatio"; public static const NO_SCALE:String = "noScale"; } }//package fl.video
Section 44
//VideoState (fl.video.VideoState) package fl.video { public final class VideoState { public static const CONNECTION_ERROR:String = "connectionError"; public static const BUFFERING:String = "buffering"; public static const SEEKING:String = "seeking"; public static const STOPPED:String = "stopped"; public static const PAUSED:String = "paused"; public static const RESIZING:String = "resizing"; public static const PLAYING:String = "playing"; public static const DISCONNECTED:String = "disconnected"; public static const LOADING:String = "loading"; public static const REWINDING:String = "rewinding"; flvplayback_internal static var EXEC_QUEUED_CMD:String = "execQueuedCmd"; } }//package fl.video
Section 45
//CTAADDCLIP_39 (Rambo_fla.CTAADDCLIP_39) package Rambo_fla { import flash.display.*; public dynamic class CTAADDCLIP_39 extends MovieClip { public var now:Date; public var targetDate:Date; public function CTAADDCLIP_39(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ now = new Date(); targetDate = new Date(2008, 4, 27); trace(("now date: " + now.toString())); trace(("launch date: " + targetDate.toString())); if (now >= targetDate){ trace("swapping"); gotoAndStop((currentFrame + 1)); }; stop(); } function frame2(){ stop(); } } }//package Rambo_fla
Section 46
//DamageIndicator_27 (Rambo_fla.DamageIndicator_27) package Rambo_fla { import flash.display.*; public dynamic class DamageIndicator_27 extends MovieClip { public function DamageIndicator_27(){ addFrameScript(0, frame1, 13, frame14, 26, frame27, 39, frame40, 52, frame53); } function frame14(){ stop(); } function frame1(){ stop(); } function frame27(){ stop(); } function frame40(){ stop(); } function frame53(){ stop(); } } }//package Rambo_fla
Section 47
//kewlboxanimatedlogo_46 (Rambo_fla.kewlboxanimatedlogo_46) package Rambo_fla { import flash.display.*; public dynamic class kewlboxanimatedlogo_46 extends MovieClip { public function kewlboxanimatedlogo_46(){ addFrameScript(10, frame11); } function frame11(){ stop(); } } }//package Rambo_fla
Section 48
//LogoLaunchPage_45 (Rambo_fla.LogoLaunchPage_45) package Rambo_fla { import flash.display.*; public dynamic class LogoLaunchPage_45 extends MovieClip { public var kewlboxLogo:MovieClip; } }//package Rambo_fla
Section 49
//NearMissIndicator_26 (Rambo_fla.NearMissIndicator_26) package Rambo_fla { import flash.display.*; public dynamic class NearMissIndicator_26 extends MovieClip { public function NearMissIndicator_26(){ addFrameScript(0, frame1, 20, frame21, 40, frame41, 60, frame61); } function frame1(){ stop(); } function frame21(){ stop(); } function frame41(){ stop(); } function frame61(){ stop(); } } }//package Rambo_fla
Section 50
//TheGun_16 (Rambo_fla.TheGun_16) package Rambo_fla { import flash.display.*; public dynamic class TheGun_16 extends MovieClip { public function TheGun_16(){ addFrameScript(0, frame1, 3, frame4, 8, frame9, 13, frame14, 18, frame19, 23, frame24, 28, frame29, 33, frame34, 38, frame39, 43, frame44, 48, frame49, 53, frame54, 58, frame59, 63, frame64, 68, frame69, 73, frame74, 78, frame79, 83, frame84, 88, frame89, 93, frame94, 98, frame99, 103, frame104, 108, frame109, 113, frame114, 118, frame119, 123, frame124, 128, frame129, 133, frame134, 138, frame139, 143, frame144, 148, frame149, 153, frame154, 158, frame159, 163, frame164, 168, frame169, 173, frame174, 178, frame179); } function frame144(){ stop(); } function frame159(){ stop(); } function frame64(){ stop(); } function frame154(){ stop(); } function frame79(){ stop(); } function frame74(){ stop(); } function frame84(){ stop(); } function frame89(){ stop(); } function frame164(){ stop(); } function frame169(){ stop(); } function frame94(){ stop(); } function frame14(){ stop(); } function frame174(){ stop(); } function frame1(){ stop(); } function frame19(){ stop(); } function frame4(){ stop(); } function frame104(){ stop(); } function frame9(){ stop(); } function frame109(){ stop(); } function frame179(){ stop(); } function frame29(){ stop(); } function frame24(){ stop(); } function frame34(){ stop(); } function frame39(){ stop(); } function frame114(){ stop(); } function frame99(){ stop(); } function frame124(){ stop(); } function frame44(){ stop(); } function frame49(){ stop(); } function frame129(){ stop(); } function frame119(){ stop(); } function frame139(){ stop(); } function frame54(){ stop(); } function frame59(){ stop(); } function frame134(){ stop(); } function frame149(){ stop(); } function frame69(){ stop(); } } }//package Rambo_fla
Section 51
//BackgroundMzks (BackgroundMzks) package { import flash.media.*; public dynamic class BackgroundMzks extends Sound { } }//package
Section 52
//Bullet1 (Bullet1) package { public dynamic class Bullet1 extends Caseing { public function Bullet1(){ addFrameScript(21, frame22); } function frame22(){ stop(); } } }//package
Section 53
//ButtonclickSnd (ButtonclickSnd) package { import flash.media.*; public dynamic class ButtonclickSnd extends Sound { } }//package
Section 54
//Caseing (Caseing) package { public class Caseing extends Particle { } }//package
Section 55
//Deathsound01Snd (Deathsound01Snd) package { import flash.media.*; public dynamic class Deathsound01Snd extends Sound { } }//package
Section 56
//Deathsound02Snd (Deathsound02Snd) package { import flash.media.*; public dynamic class Deathsound02Snd extends Sound { } }//package
Section 57
//Deathsound03Snd (Deathsound03Snd) package { import flash.media.*; public dynamic class Deathsound03Snd extends Sound { } }//package
Section 58
//Debris (Debris) package { public class Debris extends Particle { } }//package
Section 59
//Debris1 (Debris1) package { public dynamic class Debris1 extends Debris { public function Debris1(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package
Section 60
//DifficultyMgr (DifficultyMgr) package { import flash.net.*; import flash.events.*; public class DifficultyMgr { private var mSpawnDelays:Array; private var mMoveDelays:Array; private var mPostRoundHealthRecovery:Array; public var mbIsLoading:Boolean; private var mActiveEnemys:Array; private var mLoader:URLLoader; public var mbXMLLoadComplete:Boolean; private var mTotalEnemys:Array; private var mShootDelays:Array; private var mEnemyDamage:Array; private var mXML:XML; private var mNumQuads:Array; public var mStartingLevel:Number; private var mShowDelays:Array; private var mEnemyAccuracy:Array; private var mHideDelays:Array; public function DifficultyMgr(){ mTotalEnemys = new Array(5); mSpawnDelays = new Array(5); mShowDelays = new Array(5); mShootDelays = new Array(5); mHideDelays = new Array(5); mMoveDelays = new Array(5); mNumQuads = new Array(5); mActiveEnemys = new Array(5); mPostRoundHealthRecovery = new Array(5); mEnemyAccuracy = new Array(5); mEnemyDamage = new Array(5); mbXMLLoadComplete = false; mbIsLoading = false; mStartingLevel = 0; } public function getMoveDelays(_arg1:Number=1):Number{ return (mMoveDelays[(_arg1 - 1)]); } public function getEnemyAccuracy(_arg1:Number=1):Array{ return (mEnemyAccuracy[(_arg1 - 1)]); } public function getPostRoundHealthRecovery(_arg1:Number=1):Number{ return (mPostRoundHealthRecovery[(_arg1 - 1)]); } public function getActiveEnemys(_arg1:Number=1):Number{ return (mActiveEnemys[(_arg1 - 1)]); } public function getShootDelays(_arg1:Number=1):Number{ return (mShootDelays[(_arg1 - 1)]); } public function initLevel(_arg1:Number){ var _local2:int; if (mXML == null){ mXML = <data> <startlevel>0</startlevel> <level id="1"> <TotalEnemys>15</TotalEnemys> <SpawnDelays>.75</SpawnDelays> <ShowDelays>1.0</ShowDelays> <ShootDelays>.75</ShootDelays> <HideDelays>.5</HideDelays> <MoveDelays>1</MoveDelays> <NumQuads>1</NumQuads> <ActiveEnemys>3</ActiveEnemys> <PostRoundHealthRecovery>50</PostRoundHealthRecovery> <EnemyAccuracy1>90</EnemyAccuracy1> <EnemyAccuracy2>50</EnemyAccuracy2> <EnemyAccuracy3>25</EnemyAccuracy3> <mEnemyDamage>15</mEnemyDamage> </level> <level id="2"> <TotalEnemys>20</TotalEnemys> <SpawnDelays>1.0</SpawnDelays> <ShowDelays>0</ShowDelays> <ShootDelays>1.5</ShootDelays> <HideDelays>1.0</HideDelays> <MoveDelays>1</MoveDelays> <NumQuads>2</NumQuads> <ActiveEnemys>4</ActiveEnemys> <PostRoundHealthRecovery>50</PostRoundHealthRecovery> <EnemyAccuracy1>90</EnemyAccuracy1> <EnemyAccuracy2>50</EnemyAccuracy2> <EnemyAccuracy3>25</EnemyAccuracy3> <mEnemyDamage>15</mEnemyDamage> </level> <level id="3"> <TotalEnemys>25</TotalEnemys> <SpawnDelays>1.0</SpawnDelays> <ShowDelays>0</ShowDelays> <ShootDelays>1.5</ShootDelays> <HideDelays>1.5</HideDelays> <MoveDelays>1</MoveDelays> <NumQuads>3</NumQuads> <ActiveEnemys>3</ActiveEnemys> <PostRoundHealthRecovery>50</PostRoundHealthRecovery> <EnemyAccuracy1>90</EnemyAccuracy1> <EnemyAccuracy2>50</EnemyAccuracy2> <EnemyAccuracy3>25</EnemyAccuracy3> <mEnemyDamage>15</mEnemyDamage> </level> <level id="4"> <TotalEnemys>30</TotalEnemys> <SpawnDelays>1.0</SpawnDelays> <ShowDelays>0</ShowDelays> <ShootDelays>1.5</ShootDelays> <HideDelays>2.0</HideDelays> <MoveDelays>1</MoveDelays> <NumQuads>4</NumQuads> <ActiveEnemys>3</ActiveEnemys> <PostRoundHealthRecovery>50</PostRoundHealthRecovery> <EnemyAccuracy1>90</EnemyAccuracy1> <EnemyAccuracy2>50</EnemyAccuracy2> <EnemyAccuracy3>25</EnemyAccuracy3> <mEnemyDamage>15</mEnemyDamage> </level> <level id="5"> <TotalEnemys>35</TotalEnemys> <SpawnDelays>1.0</SpawnDelays> <ShowDelays>0</ShowDelays> <ShootDelays>1.5</ShootDelays> <HideDelays>2.00</HideDelays> <MoveDelays>1</MoveDelays> <NumQuads>4</NumQuads> <ActiveEnemys>3</ActiveEnemys> <PostRoundHealthRecovery>50</PostRoundHealthRecovery> <EnemyAccuracy1>90</EnemyAccuracy1> <EnemyAccuracy2>50</EnemyAccuracy2> <EnemyAccuracy3>25</EnemyAccuracy3> <mEnemyDamage>15</mEnemyDamage> </level> </data> ; }; mStartingLevel = Number(mXML.startlevel); _local2 = 0; while (_local2 < _arg1) { mTotalEnemys[_local2] = Number(mXML.level[_local2].TotalEnemys); mSpawnDelays[_local2] = Number(mXML.level[_local2].SpawnDelays); mShowDelays[_local2] = Number(mXML.level[_local2].ShowDelays); mShootDelays[_local2] = Number(mXML.level[_local2].ShootDelays); mHideDelays[_local2] = Number(mXML.level[_local2].HideDelays); mMoveDelays[_local2] = Number(mXML.level[_local2].MoveDelays); mNumQuads[_local2] = Number(mXML.level[_local2].NumQuads); mActiveEnemys[_local2] = Number(mXML.level[_local2].ActiveEnemys); mPostRoundHealthRecovery[_local2] = Number(mXML.level[_local2].PostRoundHealthRecovery); mEnemyAccuracy[_local2] = [Number(mXML.level[_local2].EnemyAccuracy1), Number(mXML.level[_local2].EnemyAccuracy2), Number(mXML.level[_local2].EnemyAccuracy3)]; mEnemyDamage[_local2] = Number(mXML.level[_local2].mEnemyDamage); _local2++; }; mbXMLLoadComplete = true; mbIsLoading = false; } public function getNumQuads(_arg1:Number=1):Number{ return (mNumQuads[(_arg1 - 1)]); } public function getHideDelays(_arg1:Number=1):Number{ return (mHideDelays[(_arg1 - 1)]); } public function getEnemyDamage(_arg1:Number=1):Number{ return (mEnemyDamage[(_arg1 - 1)]); } public function getShowDelays(_arg1:Number=1):Number{ return (mShowDelays[(_arg1 - 1)]); } public function getSpawnDelays(_arg1:Number=1):Number{ return (mSpawnDelays[(_arg1 - 1)]); } public function xmlLoadComplete(_arg1:Event){ initLevel(5); } public function getTotalEnemies(_arg1:Number=1):Number{ return (mTotalEnemys[(_arg1 - 1)]); } } }//package
Section 61
//DistantgunfileSnd (DistantgunfileSnd) package { import flash.media.*; public dynamic class DistantgunfileSnd extends Sound { } }//package
Section 62
//EffectsManager (EffectsManager) package { import flash.display.*; public class EffectsManager extends MovieClip { private var mRdy:Array; public function EffectsManager(){ mRdy = new Array(); } public function spawnEffect(_arg1:Particle){ mRdy.push(_arg1); } public function reset(){ mRdy = new Array(); } public function killall(){ while (this.numChildren > 0) { this.removeChildAt(0); }; reset(); } public function allAlive():Boolean{ var _local1:int; var _local2:Particle; _local1 = 0; while (_local1 < this.numChildren) { _local2 = Particle(this.getChildAt(_local1)); if (!_local2.isAlive()){ removeChildAt(_local1); return (false); }; _local1++; }; return (true); } public function update(_arg1:Number){ var _local2:int; var _local3:Particle; var _local4:Particle; _local2 = 0; while (_local2 < this.numChildren) { _local4 = Particle(getChildAt(_local2)); _local4.update(_arg1); _local2++; }; for each (_local3 in mRdy) { addChild(_local3); }; mRdy = new Array(); do { } while (!(allAlive())); } } }//package
Section 63
//Enemy (Enemy) package { import flash.events.*; import flash.display.*; import flash.geom.*; import com.blockdot.utils.*; public class Enemy extends MovieClip { public var mLastMoveTime:Number; private var mOffsets:Array; public var mLastShowTime:Number; private var mPrevState:Number; private var mCurrentTime:Number; private var mCoverSpot:HotSpot; private var mbIsActive:Boolean; public var mCurrentState:Number; public var mLastShotTime:Number; public var mMySpot:HotSpot; public var mLastHideTime:Number; public static var ENEMYSTATES:EnumeratedType; public function Enemy(){ if (ENEMYSTATES == null){ ENEMYSTATES = new EnumeratedType(["WAITING", "MOVING", "HIDING", "HIDING2", "SHOWING", "SHOOTING", "DIEING"]); }; mLastHideTime = 0; mLastMoveTime = 0; mLastShowTime = 0; mLastShotTime = 0; mCurrentState = ENEMYSTATES.WAITING; gotoAndStop("START"); mPrevState = -1; mOffsets = [0, 0, 0, 0]; } public function setEnemyState(_arg1:Number){ mCurrentState = _arg1; } public function getBB():Rectangle{ return (new Rectangle((x + (width * mOffsets[0])), (y + (height * mOffsets[1])), (width * mOffsets[2]), (height * mOffsets[3]))); } public function renderBB(){ var _local1:Shape; var _local2:Rectangle; _local1 = new Shape(); _local2 = getBB(); _local1.graphics.beginFill(0xFF0000, 0.5); _local1.graphics.drawRect(_local2.x, _local2.y, _local2.width, _local2.height); _local1.graphics.endFill(); stage.addChild(_local1); } public function getSpot():HotSpot{ return (mMySpot); } public function setSpot(_arg1:HotSpot){ mMySpot = _arg1; } public function getQuadrant():Number{ return (mMySpot.getQuad()); } public function setOffsets(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ mOffsets[0] = _arg1; mOffsets[1] = _arg2; mOffsets[2] = _arg3; mOffsets[3] = _arg4; } public function update(){ this.x = mMySpot.getPos().x; this.y = mMySpot.getPos().y; switch (mMySpot.getRow()){ case 1: this.scaleX = 1; this.scaleY = 1; break; case 2: this.scaleX = 0.75; this.scaleY = 0.75; break; case 3: this.scaleX = 0.5; this.scaleY = 0.5; break; default: this.scaleX = 0.25; this.scaleY = 0.25; }; } public function getRow():Number{ return (mMySpot.getRow()); } } }//package
Section 64
//EnemyAttackEvent (EnemyAttackEvent) package { import flash.events.*; public class EnemyAttackEvent extends Event { public var row:Number; public var quad:Number; public function EnemyAttackEvent(_arg1:String, _arg2:Number, _arg3:Number){ super(_arg1, true); _arg1 = type; quad = _arg2; row = _arg3; } } }//package
Section 65
//EnemyMgr (EnemyMgr) package { import flash.display.*; import flash.geom.*; import com.blockdot.utils.*; import com.blockdot.audio.*; public class EnemyMgr { private var mMoveDelay:Number; private var mLastMoveTime:Number; private var mqm:QuadrantMgr; private var mShowDelay:Number; private var mLastHideTime:Number; private var mRows:Array; private var mLastShotTime:Number; private var mLastShowTime:Number; private var mVisableQuad:Number; private var mParent:MovieClip; private var mEnemies:Array; private var mHideDelay:Number; private var mShotDelay:Number; public function EnemyMgr(_arg1:MovieClip){ mEnemies = new Array(); mMoveDelay = 0; mShowDelay = 0; mShotDelay = 0; mHideDelay = 0; mLastHideTime = 0; mLastMoveTime = 0; mLastShowTime = 0; mLastShotTime = 0; mVisableQuad = 1; mParent = _arg1; } private function die(_arg1:Enemy){ _arg1.setEnemyState(Enemy.ENEMYSTATES.DIEING); playdeathSound(); _arg1.gotoAndPlay("DIE"); } public function SpawnEnemy(_arg1:Enemy):Boolean{ var _local2:MovieClip; if (validSpawn(_arg1)){ mEnemies.push(_arg1); if (_arg1.getQuadrant() == mVisableQuad){ _local2 = mRows[(_arg1.getRow() - 1)]; _local2.addChild(_arg1); }; _arg1.setEnemyState(Enemy.ENEMYSTATES.HIDING); return (true); //unresolved jump }; return (false); } public function getSpawnCount():Number{ return (mEnemies.length); } private function ai(_arg1:Enemy, _arg2:Number){ switch (_arg1.mCurrentState){ case Enemy.ENEMYSTATES.WAITING: break; case Enemy.ENEMYSTATES.MOVING: if (_arg2 > (_arg1.mLastMoveTime + mHideDelay)){ hide(_arg1, _arg2); }; break; case Enemy.ENEMYSTATES.HIDING: if (_arg2 > (_arg1.mLastHideTime + mShowDelay)){ show(_arg1, _arg2); }; break; case Enemy.ENEMYSTATES.SHOWING: if (_arg2 > (_arg1.mLastShowTime + mShotDelay)){ shoot(_arg1, _arg2); }; break; case Enemy.ENEMYSTATES.SHOOTING: if (_arg2 > (_arg1.mLastShotTime + mHideDelay)){ hide2(_arg1, _arg2); }; break; case Enemy.ENEMYSTATES.HIDING2: if (_arg2 > (_arg1.mLastHideTime + mMoveDelay)){ move(_arg1, _arg2); }; break; case Enemy.ENEMYSTATES.DIEING: _arg1.setSpot(new HotSpot(0, 0, new Point())); _arg1.setEnemyState(Enemy.ENEMYSTATES.WAITING); break; default: throw (new ArgumentError("undefined state")); }; } private function hide(_arg1:Enemy, _arg2:Number){ _arg1.mLastHideTime = _arg2; _arg1.setEnemyState(Enemy.ENEMYSTATES.HIDING); } public function getBodyCount():Number{ var _local1:Number; var _local2:Enemy; _local1 = 0; for each (_local2 in mEnemies) { if (_local2.getQuadrant() == 0){ _local1++; }; }; return (_local1); } private function validSpawn(_arg1:Enemy):Boolean{ var _local2:Enemy; if (mEnemies.length > 0){ for each (_local2 in mEnemies) { if (_local2.getSpot().areEqual(_arg1.getSpot())){ return (false); }; }; }; return (true); } public function hitTest(_arg1:Point, _arg2:Number):Boolean{ var _local3:Enemy; var _local4:Rectangle; for each (_local3 in mEnemies) { _local4 = _local3.getBB(); if ((((_local4.left < _arg1.x)) && ((_arg1.x < _local4.right)))){ if ((((_local4.top < _arg1.y)) && ((_arg1.y < _local4.bottom)))){ if ((((_local3.mCurrentState == Enemy.ENEMYSTATES.SHOWING)) || ((_local3.mCurrentState == Enemy.ENEMYSTATES.SHOOTING)))){ if (_local3.getQuadrant() == _arg2){ die(_local3); return (true); }; }; }; }; }; return (false); } public function initEnemyMgr(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Array, _arg7:QuadrantMgr){ mEnemies = new Array(); mMoveDelay = _arg2; mShowDelay = _arg3; mShotDelay = _arg4; mHideDelay = _arg5; mLastHideTime = _arg1; mLastMoveTime = _arg1; mLastShowTime = _arg1; mLastShotTime = _arg1; mVisableQuad = 1; mRows = _arg6; mqm = _arg7; } public function update(_arg1){ var _local2:Enemy; for each (_local2 in mEnemies) { ai(_local2, _arg1); if (_local2.getQuadrant() == mVisableQuad){ _local2.update(); }; }; } private function shoot(_arg1:Enemy, _arg2:Number){ _arg1.mLastShotTime = _arg2; _arg1.setEnemyState(Enemy.ENEMYSTATES.SHOOTING); _arg1.gotoAndPlay("SHOOT"); mParent.dispatchEvent(new EnemyAttackEvent("EnemyAttackEvent", _arg1.getQuadrant(), _arg1.getRow())); } private function move(_arg1:Enemy, _arg2:Number){ var _local3:Array; var _local4:Number; var _local5:HotSpot; var _local6:Enemy; var _local7:MovieClip; var _local8:MovieClip; _arg1.mLastMoveTime = _arg2; _arg1.setEnemyState(Enemy.ENEMYSTATES.MOVING); if (_arg1.getRow() <= 1){ return; }; _local3 = mqm.getHotSpots(_arg1.getQuadrant(), (_arg1.getRow() - 1)); _local4 = NewMath.getRandomRange(0, (_local3.length - 1)); _local5 = _local3[_local4]; for each (_local6 in mEnemies) { if (_local6.mMySpot.areEqual(_local5)){ return; }; }; _local7 = mRows[(_arg1.getRow() - 1)]; _local8 = mRows[(_local5.getRow() - 1)]; if (mVisableQuad == _arg1.getQuadrant()){ _local7.removeChild(_arg1); }; _arg1.setSpot(_local5); if (mVisableQuad == _arg1.getQuadrant()){ _local8.addChild(_arg1); }; } private function hide2(_arg1:Enemy, _arg2:Number){ _arg1.mLastHideTime = _arg2; _arg1.setEnemyState(Enemy.ENEMYSTATES.HIDING2); _arg1.gotoAndPlay("DOWN"); } private function playdeathSound(){ var _local1:Number; _local1 = NewMath.getRandomRange(1, 3); switch (_local1){ case 1: SoundManager.play("Deathsound01Snd"); break; case 2: SoundManager.play("Deathsound02Snd"); break; case 3: SoundManager.play("Deathsound03Snd"); break; }; } private function show(_arg1:Enemy, _arg2:Number){ _arg1.mLastShowTime = _arg2; _arg1.setEnemyState(Enemy.ENEMYSTATES.SHOWING); mParent.dispatchEvent(new EnemyShowEvent("EnemyShowEvent", _arg1.getQuadrant())); _arg1.gotoAndPlay("UP"); } public function setQuadrant(_arg1:Number){ var _local2:Number; var _local3:Enemy; var _local4:MovieClip; var _local5:MovieClip; _local2 = mVisableQuad; mVisableQuad = _arg1; if (_local2 != _arg1){ for each (_local3 in mEnemies) { if (_local3.getQuadrant() == _local2){ _local4 = mRows[(_local3.getRow() - 1)]; _local4.removeChild(_local3); } else { if (_local3.getQuadrant() == _arg1){ _local5 = mRows[(_local3.getRow() - 1)]; _local5.addChild(_local3); }; }; }; }; } } }//package
Section 66
//EnemyShowEvent (EnemyShowEvent) package { import flash.events.*; public class EnemyShowEvent extends Event { public var mQuadrant:Number; public function EnemyShowEvent(_arg1:String, _arg2:Number, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); mQuadrant = _arg2; } override public function toString():String{ return (formatToString("EnemyShowEvent", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new EnemyShowEvent(type, mQuadrant, bubbles, cancelable)); } } }//package
Section 67
//HotSpot (HotSpot) package { import flash.geom.*; public class HotSpot { private var mRow:Number; private var mQuad:Number; private var mPos:Point; public function HotSpot(_arg1:Number, _arg2:Number, _arg3:Point){ mRow = _arg2; mPos = _arg3; mQuad = _arg1; } public function areEqual(_arg1:HotSpot):Boolean{ if ((((((((_arg1.getQuad() == mQuad)) && ((_arg1.getRow() == mRow)))) && ((_arg1.getPos().x == mPos.x)))) && ((_arg1.getPos().y == mPos.y)))){ return (true); }; return (false); } public function getRow():Number{ return (mRow); } public function getQuad():Number{ return (mQuad); } public function getPos():Point{ return (mPos); } } }//package
Section 68
//LevelSummary (LevelSummary) package { import flash.display.*; import flash.text.*; public class LevelSummary extends MsgBox { public var gTitleText:TextField; private var mBonusText:TextField; public var gBonus:TextField; public var gStartingScore:TextField; public var gLevelScore:TextField; private var mMsgText:TextField; public var gFinalScore:TextField; public var gAccuracy:TextField; private var mLevelScoreText:TextField; private var mStartingScoreText:TextField; public var gOkBtn:SimpleButton; private var mTitleText:TextField; private var mAccuracyText:TextField; private var mFinalScoreText:TextField; public var gMsgText:TextField; public function LevelSummary(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String){ super(_arg1, _arg2, _arg3, _arg4); mTitleText = gTitleText; mMsgText = gMsgText; mStartingScoreText = gStartingScore; mLevelScoreText = gLevelScore; mAccuracyText = gAccuracy; mFinalScoreText = gFinalScore; mBonusText = gBonus; mTitleText.text = _arg4; mMsgText.text = _arg1; } public function showsummery(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ var _local5:Number; _local5 = ((_arg4 - _arg1) - _arg3); setStartingScore(_local5); setLevelScore(_arg1); setAccuracy(_arg2); setBonusText(_arg3); setFinalScore(_arg4); } public function setStartingScore(_arg1:Number){ if (_arg1 < 1){ mStartingScoreText.text = "-"; } else { mStartingScoreText.text = _arg1.toFixed(0); }; } public function setLevelScore(_arg1:Number){ if (_arg1 < 1){ mLevelScoreText.text = "0"; } else { mLevelScoreText.text = _arg1.toFixed(0); }; } public function setAccuracy(_arg1:Number){ var _local2:Number; _local2 = (_arg1 * 100); if (isNaN(_local2)){ mAccuracyText.text = "-"; } else { mAccuracyText.text = (_local2.toFixed(0) + "%"); }; } public function setBonusText(_arg1:Number){ if (_arg1 < 1){ mBonusText.text = "-"; } else { mBonusText.text = _arg1.toFixed(0); }; } public function setFinalScore(_arg1:Number){ if (_arg1 < 1){ mFinalScoreText.text = "0"; } else { mFinalScoreText.text = _arg1.toFixed(0); }; } } }//package
Section 69
//MovementSnd (MovementSnd) package { import flash.media.*; public dynamic class MovementSnd extends Sound { } }//package
Section 70
//MsgBox (MsgBox) package { import flash.events.*; import flash.display.*; import flash.geom.*; public class MsgBox extends MovieClip { private var mIsShowing:Boolean; private var mFinalLoc:Point; public function MsgBox(_arg1:String, _arg2:Number, _arg3:Number, _arg4:String){ mFinalLoc = new Point(_arg2, _arg3); addEventListener(MouseEvent.CLICK, cbOkBtnClick); } public function cbOkBtnClick(_arg1:MouseEvent){ hidemsg(); } public function showmsg(){ this.x = mFinalLoc.x; this.y = mFinalLoc.y; mIsShowing = true; } public function hidemsg(){ mIsShowing = false; if (this.y >= 0){ this.y = (this.y - stage.height); removeEventListener(MouseEvent.CLICK, cbOkBtnClick); this.parent.dispatchEvent(new MsgBoxOKEvent("MsgBoxOKEvent")); }; } } }//package
Section 71
//MsgBoxOKEvent (MsgBoxOKEvent) package { import flash.events.*; public class MsgBoxOKEvent extends Event { public function MsgBoxOKEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){ super(_arg1, _arg2, _arg3); } override public function toString():String{ return (formatToString("MsgBoxOKEvent", "type", "bubbles", "cancelable", "eventPhase")); } override public function clone():Event{ return (new MsgBoxOKEvent(type, bubbles, cancelable)); } } }//package
Section 72
//NeardeathSnd (NeardeathSnd) package { import flash.media.*; public dynamic class NeardeathSnd extends Sound { } }//package
Section 73
//NeargunfireSnd (NeargunfireSnd) package { import flash.media.*; public dynamic class NeargunfireSnd extends Sound { } }//package
Section 74
//Nearmiss01Snd (Nearmiss01Snd) package { import flash.media.*; public dynamic class Nearmiss01Snd extends Sound { } }//package
Section 75
//Nearmiss02Snd (Nearmiss02Snd) package { import flash.media.*; public dynamic class Nearmiss02Snd extends Sound { } }//package
Section 76
//Nearmiss03Snd (Nearmiss03Snd) package { import flash.media.*; public dynamic class Nearmiss03Snd extends Sound { } }//package
Section 77
//PainsoundSnd (PainsoundSnd) package { import flash.media.*; public dynamic class PainsoundSnd extends Sound { } }//package
Section 78
//Particle (Particle) package { import flash.display.*; public class Particle extends MovieClip { private var mLifeSpan:Number; private var mStartTime:Number; private var mIsAlive:Boolean; public function init(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number){ x = _arg1; y = _arg2; mStartTime = _arg3; mIsAlive = true; mLifeSpan = _arg4; } public function isAlive():Boolean{ return (mIsAlive); } function update(_arg1){ var _local2:Number; _local2 = (_arg1 - mStartTime); if (_local2 >= mLifeSpan){ mIsAlive = false; }; } } }//package
Section 79
//Player (Player) package { public class Player { private var mQuadrant:Number; private var mMaxHealth:Number; private var mDamage:Number; public function Player(){ mMaxHealth = 100; mDamage = 0; mQuadrant = 1; } public function getHealthAsPercent():Number{ var _local1:Number; _local1 = (1 - (mDamage / mMaxHealth)); if (_local1 > 0){ return (_local1); }; return (0); } public function getQuadrant():Number{ return (mQuadrant); } public function init(){ mMaxHealth = 100; mDamage = 0; mQuadrant = 1; } public function takeDamage(_arg1:Number){ mDamage = (mDamage + _arg1); } public function healDamage(_arg1:Number){ mDamage = (mDamage - _arg1); if (mDamage < 0){ mDamage = 0; }; } public function getHealth(){ return ((mMaxHealth - mDamage)); } public function setQuadrant(_arg1:Number){ mQuadrant = _arg1; } } }//package
Section 80
//QuadrantMgr (QuadrantMgr) package { import flash.display.*; import flash.geom.*; public class QuadrantMgr { private var mHotSpots:Array; public function QuadrantMgr(){ mHotSpots = new Array(); } public function getHotSpotCount():Number{ return (mHotSpots.length); } public function getHotSpots(_arg1:Number, _arg2:Number):Array{ var _local3:Array; var _local4:HotSpot; _local3 = new Array(); for each (_local4 in mHotSpots) { if (_local4.getQuad() == _arg1){ if (_local4.getRow() == _arg2){ _local3.push(_local4); }; }; }; return (_local3); } public function reset(){ mHotSpots = new Array(); } public function addHotSpot(_arg1:Number, _arg2:Number, _arg3:DisplayObject){ var _local4:HotSpot; _local4 = new HotSpot(_arg1, _arg2, new Point(_arg3.x, _arg3.y)); mHotSpots.push(_local4); } } }//package
Section 81
//Rambo (Rambo) package { import fl.video.*; import flash.net.*; import flash.events.*; import flash.display.*; import flash.geom.*; import flash.text.*; import flash.utils.*; import com.blockdot.utils.encryption.*; import com.blockdot.utils.*; import com.blockdot.comm.kewlbox.*; import com.blockdot.audio.*; import flash.ui.*; import flash.filters.*; public class Rambo extends MovieClip { private const FIREDELAY:Number = 0.09; private const ENEMYPOINTS:Number = 100; private const ACCURACYBONUS:Number = 3500; private const MAXROUNDS:Number = 5; private const TURNDELAY:Number = 0.33; private const TOTALQUADRANTS:Number = 4; public var gCTAKewlboxBtn:SimpleButton; private var mSecurityMgr:MD5; private var mShotsFired:Number; private var mTheGunMovieClip:MovieClip; public var gIBRContinueBtn:SimpleButton; public var __setPropDict:Dictionary; private var mIsActive:Boolean; private var mTarget:Reticule; public var sMediaUrl:String; public var gShowDamage:MovieClip; public var loadpercent; public var mGameBackGround:MovieClip; public var gCTAScoreText:TextField; public var gUIBackground:MovieClip; public var gRules:MovieClip; private var mEffectMgr:EffectsManager; private var mTip:MovieClip; public var gLevelTextField:TextField; private var mEnemyMgr:EnemyMgr; public var gCTASubmitBtn:SimpleButton; private var mBodyCountTextField:TextField; public var gCTAQuitBtn:SimpleButton; public var gPrivacy:MovieClip; public var gPostScoreBtn:SimpleButton; public var gUI:MovieClip; public var gEnemyCountTextField:TextField; public var gParticleLayer:EffectsManager; private var mHits:Number; public var gHealthMeter2:MovieClip; public var gmail2:TextField; public var gmail3:TextField; public var gmail4:TextField; public var gmail5:TextField; public var gmail1:TextField; private var mTotalEnemiesTextField:TextField; private var mGameTime:Number; private var mTheHealthMeterMovieClip:MovieClip; public var gAudioOnBtn:SimpleButton; private var mPrevQuad:Number; public var Major:Number; public var gVersionTextBox:TextField; private var mPlayer:Player; public var gSpot01:MovieClip; public var gSpot03:MovieClip; public var gSpot04:MovieClip; public var gSpot05:MovieClip; public var gSpot06:MovieClip; public var gSpot07:MovieClip; public var gSpot08:MovieClip; public var gSpot09:MovieClip; private var mGameState:Number; public var gSpot02:MovieClip; public var gSpot10:MovieClip; public var gTitleQuitBtn:SimpleButton; public var gCTAPlayBtn:SimpleButton; public var gFLVMovie:FLVPlayback; public var gCTAAd:MovieClip; public var gTitleLegalBtn:SimpleButton; private var mLastShot:Number; public var gTimerTextField:TextField; private var mMovieOrder:Array; public var gGameQuitBtn:SimpleButton; public var Build:Number; public var gTheGun:MovieClip; private var mUIReady:Boolean; private var mIsPaused:Boolean; public var gBodyCountTextField:TextField; private var mlastTurnTime:Number; private var mRemainingLives; public var gLegal:MovieClip; public var gRow1:MovieClip; public var gRow2:MovieClip; public var gRow3:MovieClip; private var mLevelTextField:TextField; public var progressBar:MovieClip; private var mCurrentLevel:Number; public var gTip:Tip; private var mDiffMgr:DifficultyMgr; public var gTitlePrivacyBtn:SimpleButton; public var gKBLogo:SimpleButton; public var gNearMiss:MovieClip; private var mprevlabel:Number; private var mLoader:URLLoader; private var mTimer:Timer; public var gAudioOffBtn:SimpleButton; private var mNeedTip:Boolean; private var mIsShooting:Boolean; public var gTitlePlayBtn:SimpleButton; public var gTitleRulesBtn:SimpleButton; private var mPrevGameState:Number; private var mEndofRoundTime:Number; private var mLastSpawnTime:Number; public var Minor:Number; public var gHealthMeter:MovieClip; private var mCurrentQuad:Number; public var gTitleClientLogoBtn:SimpleButton; private var mClientURL:URLRequest; private var mQuadrantMgr:QuadrantMgr; private var mTimerTextField:TextField; private var mUIBackground:MovieClip; private var mRows:Array; private static var GAMESTATES:EnumeratedType; public function Rambo(){ __setPropDict = new Dictionary(true); super(); addFrameScript(0, frame1, 1, frame2, 4, frame5, 5, frame6, 11, frame12, 30, frame31, 34, frame35, 35, frame36, 39, frame40, 44, frame45, 49, frame50, 54, frame55, 59, frame60, 119, frame120, 36, frame37, 37, frame38, 38, frame39); GameData.scope = this; GameData.gameId = 292; GameData.clientId = 133; GameData.partner = 1; GameData.version = 10500; GameData.gameWidth = 550; GameData.gameHeight = 413; GameData.scoreCode = "tarzan"; GameData.gameShortName = "Rambo"; GameData.gameLongName = "Rambo"; Ping.startRichPing(); if (GAMESTATES == null){ createStates(); }; mTimer = new Timer(100); mGameTime = 0; mIsPaused = false; mGameState = GAMESTATES.LOADWAIT; mPrevGameState = -1; mTarget = null; mRemainingLives = 0; mCurrentLevel = 0; mCurrentQuad = 1; mPrevQuad = mCurrentQuad; mUIReady = false; mIsShooting = false; mNeedTip = true; mEndofRoundTime = mGameTime; mLastShot = mGameTime; mlastTurnTime = mGameTime; loadstuff(); mMovieOrder = new Array(); mprevlabel = -1; } private function leftorright(_arg1:Number):Number{ if (((_arg1 % 4) - mCurrentQuad) < 0){ if (Math.abs(((_arg1 % 4) - mCurrentQuad)) == 1){ return (-1); }; return (1); } else { if (((_arg1 % 4) - mCurrentQuad) > 0){ return (1); }; }; return (0); } private function playEnemyGunFire(_arg1){ if ((Math.abs((_arg1 - mCurrentQuad)) == 2)){ SoundManager.play("NeargunfireSnd", 0.3); SoundManager.setPan("NeargunfireSnd", 0); } else { if (_arg1 == mCurrentQuad){ SoundManager.play("NeargunfireSnd", 1); SoundManager.setPan("NeargunfireSnd", 0); } else { SoundManager.play("NeargunfireSnd", 0.2); SoundManager.setPan("NeargunfireSnd", leftorright(_arg1)); }; }; } private function whichAngleName(_arg1:Number, _arg2:Number, _arg3:Number):Number{ var _local4:*; var _local5:int; _local4 = (550 / _arg3); _local5 = 0; while (_local5 < _arg3) { if (((((_local5 * _local4) < _arg1)) && ((_arg1 <= ((_local5 + 1) * _local4))))){ return (_local5); }; _local5++; }; return (-1); } private function showRamdomLossMsg(){ var _local1:Number; var _local2:LevelSummary; _local1 = NewMath.getRandomRange(1, 4); switch (_local1){ case 1: _local2 = new LevelSummary("You’ve taken too much damage, Rambo. Now the villagers will be slaughtered. Play again…and seek vengeance!", 0, 0, "Game over"); break; case 2: _local2 = new LevelSummary("You’ve gasped your last breath, Rambo. But just because you lost this battle doesn’t mean you have to lose the war — play again.", 0, 0, "Game over"); break; case 3: _local2 = new LevelSummary("Your internal organs have been blasted with bullets, Rambo. Still hungry for combat? Then grab your fifty-cal and play again.", 0, 0, "Game over"); break; case 4: _local2 = new LevelSummary("All the blood in your body has spilled out onto the jungle floor, Rambo. Don’t settle for defeat — jump back in the battle and play again.", 0, 0, "Game over"); break; }; summerize(_local2, false); addChild(_local2); addEventListener("MsgBoxOKEvent", cbLossMsgOk); } function frame12(){ setTimerTextField(gTimerTextField); setTheGunMovieClip(gTheGun); setHealthMeterMovieClip(gHealthMeter); setBodyCountTextField(gBodyCountTextField); setTotalEnemiesTextField(gEnemyCountTextField); setUIBackgroundMovieClip(gUI); setRowReferences([gRow1, gRow2, gRow3]); setLevelTextField(gLevelTextField); setTipMoviclip(gTip); sortMovies(); mQuadrantMgr.reset(); mQuadrantMgr.addHotSpot(1, 3, gSpot10); mQuadrantMgr.addHotSpot(1, 3, gSpot09); mQuadrantMgr.addHotSpot(1, 3, gSpot08); mQuadrantMgr.addHotSpot(1, 3, gSpot07); mQuadrantMgr.addHotSpot(1, 3, gSpot06); mQuadrantMgr.addHotSpot(1, 2, gSpot05); mQuadrantMgr.addHotSpot(1, 2, gSpot04); mQuadrantMgr.addHotSpot(1, 1, gSpot03); mQuadrantMgr.addHotSpot(1, 1, gSpot02); mQuadrantMgr.addHotSpot(1, 1, gSpot01); trace("Q1 Loaded"); mQuadrantMgr.addHotSpot(2, 3, gSpot07); mQuadrantMgr.addHotSpot(2, 3, gSpot06); mQuadrantMgr.addHotSpot(2, 2, gSpot05); mQuadrantMgr.addHotSpot(2, 2, gSpot04); mQuadrantMgr.addHotSpot(2, 1, gSpot03); mQuadrantMgr.addHotSpot(2, 1, gSpot02); mQuadrantMgr.addHotSpot(2, 1, gSpot01); trace("Q2 Loaded"); mQuadrantMgr.addHotSpot(3, 3, gSpot07); mQuadrantMgr.addHotSpot(3, 3, gSpot06); mQuadrantMgr.addHotSpot(3, 2, gSpot05); mQuadrantMgr.addHotSpot(3, 2, gSpot04); mQuadrantMgr.addHotSpot(3, 1, gSpot03); mQuadrantMgr.addHotSpot(3, 1, gSpot02); mQuadrantMgr.addHotSpot(3, 1, gSpot01); trace("Q3 Loaded"); mQuadrantMgr.addHotSpot(4, 3, gSpot07); mQuadrantMgr.addHotSpot(4, 3, gSpot06); mQuadrantMgr.addHotSpot(4, 2, gSpot05); mQuadrantMgr.addHotSpot(4, 2, gSpot04); mQuadrantMgr.addHotSpot(4, 1, gSpot03); mQuadrantMgr.addHotSpot(4, 1, gSpot02); mQuadrantMgr.addHotSpot(4, 1, gSpot01); trace("Q4 Loaded"); checkRequiredGraphicReferences(); gGameQuitBtn.addEventListener(MouseEvent.CLICK, cbGameQuitBtn); gUIBackground.addEventListener(MouseEvent.MOUSE_OVER, cbShowMouse); gUIBackground.addEventListener(MouseEvent.MOUSE_OUT, cbHideMouse); gGameQuitBtn.addEventListener(MouseEvent.MOUSE_OVER, cbShowMouse); gAudioOnBtn.addEventListener(MouseEvent.CLICK, cbSoundToggle); gAudioOffBtn.addEventListener(MouseEvent.CLICK, cbSoundToggle); stop(); } public function setTotalEnemiesTextField(_arg1:TextField){ mTotalEnemiesTextField = _arg1; } function frame1(){ if ((((((root.loaderInfo.parameters.mediaUrl == null)) || ((root.loaderInfo.parameters.mediaUrl == undefined)))) || ((root.loaderInfo.parameters.mediaUrl == "")))){ sMediaUrl = "http://blockdot.mgnetwork.com/rambo/"; } else { sMediaUrl = root.loaderInfo.parameters.mediaUrl; }; } function frame2(){ loadpercent = (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal); progressBar.width = (300 * loadpercent); if (loadpercent >= 1){ cbSWFLoadComplete(new Event("LoadComplete")); }; } function frame5(){ gotoAndPlay("LOAD"); } function frame6(){ addEventListener(Event.ENTER_FRAME, gameLoop); gTitlePlayBtn.addEventListener(MouseEvent.CLICK, cbTitlePlayBtn); gTitleQuitBtn.addEventListener(MouseEvent.CLICK, cbTitleQuitBtn); gTitleRulesBtn.addEventListener(MouseEvent.CLICK, cbTitleRulesBtn); gTitlePrivacyBtn.addEventListener(MouseEvent.CLICK, cbTitlePrivacyBtn); gTitleLegalBtn.addEventListener(MouseEvent.CLICK, cbTitleLegalBtn); gTitleClientLogoBtn.addEventListener(MouseEvent.CLICK, cbTitleClientLogoBtn); gKBLogo.addEventListener(MouseEvent.CLICK, cbKBLogoBtn); Major = int(((GameData.version / 10000) % 10)); Minor = int(((GameData.version / 100) % 10)); Build = int((GameData.version % 10)); gVersionTextBox.text = ((((("v" + Major.toString()) + ".") + Minor.toString()) + ".") + Build.toString()); SoundManager.play("TitleMzk", 1, -1, "internal", false); stop(); } function frame31(){ SoundManager.play("Whoosh"); } private function unpauseGame(){ mIsPaused = false; mTimer.start(); } function frame36(){ SoundManager.stopAll(); if (mCurrentLevel < MAXROUNDS){ gotoAndStop("Q1"); setGameState(GAMESTATES.NEWROUND); } else { endGame(); mUIReady = false; gotoAndStop("CTA"); mGameState = GAMESTATES.CTAWAIT; }; stop(); } function frame37(){ if ((((__setPropDict[gFLVMovie] == undefined)) || (!((((int(__setPropDict[gFLVMovie]) >= 37)) && ((int(__setPropDict[gFLVMovie]) <= 39))))))){ __setPropDict[gFLVMovie] = currentFrame; __setProp_gFLVMovie_Scene1_MOVIE_37(); }; } function frame38(){ if ((((__setPropDict[gFLVMovie] == undefined)) || (!((((int(__setPropDict[gFLVMovie]) >= 37)) && ((int(__setPropDict[gFLVMovie]) <= 39))))))){ __setPropDict[gFLVMovie] = currentFrame; __setProp_gFLVMovie_Scene1_MOVIE_37(); }; } private function playNearMiss(){ var _local1:Number; _local1 = NewMath.getRandomRange(1, 3); switch (_local1){ case 1: SoundManager.play("Nearmiss01Snd"); break; case 2: SoundManager.play("Nearmiss02Snd"); break; case 3: SoundManager.play("Nearmiss03Snd"); break; }; } function frame39(){ if ((((__setPropDict[gFLVMovie] == undefined)) || (!((((int(__setPropDict[gFLVMovie]) >= 37)) && ((int(__setPropDict[gFLVMovie]) <= 39))))))){ __setPropDict[gFLVMovie] = currentFrame; __setProp_gFLVMovie_Scene1_MOVIE_37(); }; } public function cbSkipVideo(_arg1:MouseEvent){ var _local2:FLVPlayback; _local2 = gFLVMovie; if (_local2.playing){ _local2.stop(); _local2.removeEventListener(Event.COMPLETE, cbNextRound); cbNextRound(_arg1); }; } function frame35(){ quadrantUpdate(); stop(); } public function cbCTASubmit(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); ViralChallenge.addEventListener("INVALID", invalidEmail); ViralChallenge.send(gmail1.text, gmail2.text, gmail3.text, gmail4.text, gmail5.text); } function frame40(){ gCTAPlayBtn.addEventListener(MouseEvent.CLICK, cbCTAPlayAgainBtn); gCTAQuitBtn.addEventListener(MouseEvent.CLICK, cbCTAQuitBtn); gPostScoreBtn.addEventListener(MouseEvent.CLICK, cbCTAPostScore); gCTASubmitBtn.addEventListener(MouseEvent.CLICK, cbCTASubmit); gCTAKewlboxBtn.addEventListener(MouseEvent.CLICK, cbKBLogoBtn); gCTAAd.addEventListener(MouseEvent.CLICK, cbAdClick); SoundManager.stop("TitleMzk"); SoundManager.play("BackgroundMzks", 1, -1); gCTAScoreText.text = Score.score.toString(); stop(); } function frame45(){ removeEventListener(Event.ENTER_FRAME, gameLoop); navigateToURL(new URLRequest("http://clk.atdmt.com/IWC/go/blckclgt0690000001iwc/direct/01/"), "_blank"); SoundManager.stop("TitleMzk"); SoundManager.stop("BackgroundMzks"); stop(); } public function setTipMoviclip(_arg1:MovieClip){ mTip = _arg1; } public function cbNextRound(_arg1:Event){ SoundManager.play("ButtonclickSnd"); if (mCurrentLevel < MAXROUNDS){ gotoAndStop("Q1"); setGameState(GAMESTATES.NEWROUND); } else { endGame(); mUIReady = false; gotoAndStop("CTA"); mGameState = GAMESTATES.CTAWAIT; }; } function frame50(){ gLegal.addEventListener(MouseEvent.CLICK, cbContinue); stop(); } private function showDamage(_arg1:Number){ if (_arg1 == mCurrentQuad){ gShowDamage.gotoAndPlay("FRONT"); } else { if (Math.abs((_arg1 - mCurrentQuad)) == 2){ gShowDamage.gotoAndPlay("BACK"); } else { if (leftorright(_arg1) < 0){ gShowDamage.gotoAndPlay("LEFT"); } else { gShowDamage.gotoAndPlay("RIGHT"); }; }; }; } private function spawnEnemy(){ var _local1:Number; var _local2:Number; var _local3:Array; var _local4:Number; var _local5:HotSpot; var _local6:Number; var _local7:Enemy; _local1 = mDiffMgr.getNumQuads(mCurrentLevel); _local2 = NewMath.getRandomRange(1, _local1); _local3 = mQuadrantMgr.getHotSpots(_local2, 3); _local4 = NewMath.getRandomRange(0, (_local3.length - 1)); _local5 = _local3[_local4]; _local6 = NewMath.getRandomRange(1, 4); switch (_local6){ case 1: _local7 = new Soldier1(); _local7.setOffsets(0.36, 0.18, 0.2, 0.4); break; case 2: _local7 = new Soldier2(); _local7.setOffsets(0.45, 0.35, 0.2, 0.3); break; case 3: _local7 = new Soldier3(); _local7.setOffsets(0.35, 0.3, 0.25, 0.3); break; case 4: _local7 = new Soldier4(); _local7.setOffsets(0.36, 0.18, 0.2, 0.4); break; default: _local7 = new Soldier1(); _local7.setOffsets(0.36, 0.18, 0.2, 0.4); break; }; _local7.setSpot(_local5); mLastSpawnTime = mGameTime; mEnemyMgr.SpawnEnemy(_local7); } public function loadstuff(){ mClientURL = new URLRequest("http://www.lionsgateshop.com/"); mEnemyMgr = new EnemyMgr(this); mSecurityMgr = new MD5(); mDiffMgr = new DifficultyMgr(); mQuadrantMgr = new QuadrantMgr(); mPlayer = new Player(); } function frame55(){ gPrivacy.addEventListener(MouseEvent.CLICK, cbContinue); stop(); } private function update(){ var _local1:Number; var _local2:Number; var _local3:String; var _local4:Point; var _local5:BlurFilter; var _local6:Particle; var _local7:Particle; mGameTime = (mTimer.currentCount / 10); mTarget.update(); mTimerTextField.text = mGameTime.toFixed(1); mBodyCountTextField.text = mEnemyMgr.getBodyCount().toString(); mTotalEnemiesTextField.text = mDiffMgr.getTotalEnemies(mCurrentLevel).toString(); mTheHealthMeterMovieClip.width = (100 * (1 - mPlayer.getHealthAsPercent())); mLevelTextField.text = mCurrentLevel.toString(); if (mPlayer.getHealth() > 0){ mEnemyMgr.update(mGameTime); _local1 = whichAngleName(mouseX, stage.width, 9); _local2 = whichHeightName(mouseY, stage.height, 4); _local3 = (("P" + _local1.toString()) + _local2.toString()); mTheGunMovieClip.gotoAndStop(_local3); mEffectMgr.update(mGameTime); if ((((mGameTime > (mLastShot + FIREDELAY))) && (mIsShooting))){ mLastShot = mGameTime; _local4 = new Point(mTarget.getPosition().x, mTarget.getPosition().y); if (mEnemyMgr.hitTest(_local4, mCurrentQuad)){ addscore(ENEMYPOINTS); mHits++; } else { _local7 = new Debris1(); _local7.init(mouseX, mouseY, mGameTime, 0.5); mEffectMgr.spawnEffect(_local7); }; _local5 = new BlurFilter(0, 25); mTheGunMovieClip.filters = [_local5]; mTheGunMovieClip.gotoAndPlay((mTheGunMovieClip.currentLabel + "s")); SoundManager.play("RambogunfireSnd"); mShotsFired++; _local6 = new Bullet1(); _local6.init(275, 413, mGameTime, 0.8); mEffectMgr.spawnEffect(_local6); } else { if (mTheGunMovieClip.filters.length > 0){ mTheGunMovieClip.filters = []; }; }; }; } function __setProp_gFLVMovie_Scene1_MOVIE_37(){ try { gFLVMovie["componentInspectorSetting"] = true; } catch(e:Error) { }; gFLVMovie.align = "center"; gFLVMovie.autoPlay = true; gFLVMovie.scaleMode = "maintainAspectRatio"; gFLVMovie.skin = ""; gFLVMovie.skinAutoHide = false; gFLVMovie.skinBackgroundAlpha = 0.85; gFLVMovie.skinBackgroundColor = 4697035; gFLVMovie.source = "killings_easy_as_breathing_Movie_LetterBox.flv"; gFLVMovie.volume = 1; try { gFLVMovie["componentInspectorSetting"] = false; } catch(e:Error) { }; } function frame60(){ gRules.addEventListener(MouseEvent.CLICK, cbContinue); stop(); } public function cbEnemyShow(_arg1:EnemyShowEvent){ playEnemyMovement(_arg1.mQuadrant); } private function exit(){ try { Ping.send("gameEnd"); } catch(e:Error) { trace(("*** Ping Failed **** " + e.message)); }; gotoAndStop("EXIT"); } public function initGame(_arg1:Number){ mEffectMgr = gParticleLayer; mRemainingLives = _arg1; mCurrentLevel = 0; resetScore(); mNeedTip = true; hide(mTip); } private function hide(_arg1:DisplayObject){ if (_arg1.y >= 0){ _arg1.y = (_arg1.y - stage.height); }; } private function nearDeathCheck(){ if (mPlayer.getHealthAsPercent() <= 0.3){ SoundManager.play("NeardeathSnd", 1, -1, "internal", false); }; } public function cbTitleLegalBtn(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); gotoAndStop("LEGAL"); } public function setGameState(_arg1:Number){ mGameState = _arg1; } private function cbSWFLoadComplete(_arg1:Event){ setGameState(GAMESTATES.TITLEWAIT); gotoAndPlay("LAUNCH"); } private function playEnemyMovement(_arg1){ if (_arg1 == mCurrentQuad){ SoundManager.play("MovementSnd", 1); SoundManager.setPan("MovementSnd", 0); } else { if (Math.abs((_arg1 - mCurrentQuad)) == 2){ SoundManager.play("MovementSnd", 0.2); SoundManager.setPan("MovementSnd", 0); } else { SoundManager.play("MovementSnd", 0.3); SoundManager.setPan("MovementSnd", leftorright(_arg1)); }; }; } public function checkRequiredGraphicReferences(){ if (mTimerTextField == null){ throw (new ReferenceError("Missing reference to a Graphics Objects: mTimerTextField ")); }; if (mTheGunMovieClip == null){ throw (new ReferenceError("Missing reference to a Graphics Objects: mTheGunMovieClip ")); }; if (mTheHealthMeterMovieClip == null){ throw (new ReferenceError("Missing reference to a Graphics Objects: mTheHealthMeterMovieClip ")); }; if (mBodyCountTextField == null){ throw (new ReferenceError("Missing reference to a Graphics Objects: mBodyCountTextField ")); }; if (mTotalEnemiesTextField == null){ throw (new ReferenceError("Missing reference to a Graphics Objects: mTotalEnemiesTextField ")); }; if (mUIBackground == null){ throw (new ReferenceError("Missing reference to a Graphics Objects: mUIBackground ")); }; if (mLevelTextField == null){ throw (new ReferenceError("Missing reference to a Graphics Objects: mLevelTextField")); }; mUIReady = true; } private function showWinGameMsg(){ var _local1:LevelSummary; _local1 = summerize(_local1); addChild(_local1); addEventListener("MsgBoxOKEvent", cbNextRoundMsgOk); } private function playRandomSuccessSound(){ var _local1:Number; _local1 = NewMath.getRandomRange(1, 3); switch (_local1){ case 1: SoundManager.play("Success01Snd"); break; case 2: SoundManager.play("Success02Snd"); break; case 3: SoundManager.play("Success03Snd"); break; default: SoundManager.play("Success01Snd"); break; }; } function frame120(){ gotoAndPlay("TITLE"); stop(); } public function setLevelTextField(_arg1:TextField){ mLevelTextField = _arg1; } public function gameLoop(_arg1:Event){ var moveD:Number; var showD:Number; var shotD:Number; var hideD:Number; var e = _arg1; traceState(); switch (mGameState){ case GAMESTATES.LOADWAIT: break; case GAMESTATES.TITLEWAIT: break; case GAMESTATES.INITGAME: if (mUIReady){ initGame(1); setGameState(GAMESTATES.NEWROUND); mTarget = new Reticule(); stage.addEventListener(KeyboardEvent.KEY_DOWN, cbHandleKeyPress); stage.addEventListener(KeyboardEvent.KEY_UP, cbHandleKeyReleased); addEventListener(MouseEvent.MOUSE_MOVE, cbMoveReticule); addEventListener(MouseEvent.MOUSE_DOWN, cbFireKeyPressed); addEventListener(MouseEvent.MOUSE_UP, cbFireKeyReleased); addEventListener("EnemyAttackEvent", cbEnemyAttack); addEventListener("EnemyShowEvent", cbEnemyShow); Ping.send("gamePlay"); }; break; case GAMESTATES.NEWROUND: if (mDiffMgr.mbXMLLoadComplete == false){ mDiffMgr.initLevel(5); } else { quadrantUpdate(); Mouse.hide(); mTimer.reset(); mGameTime = mTimer.currentCount; mlastTurnTime = mGameTime; mTimer.start(); updateSoundState(); SoundManager.play("BackgroundMzks", 0.5, -1, "internal", false); mLastShot = 0; mTarget.setPosition(mouseX, mouseY); mUIBackground.addChild(mTarget); mTotalEnemiesTextField.text = mDiffMgr.getTotalEnemies(mCurrentLevel).toString(); mCurrentQuad = 1; mPlayer.init(); setGameState(GAMESTATES.GAMEPLAY); if (mDiffMgr.mStartingLevel > 0){ mCurrentLevel = mDiffMgr.mStartingLevel; } else { mCurrentLevel = (mCurrentLevel + 1); }; mLastSpawnTime = mGameTime; moveD = mDiffMgr.getMoveDelays(mCurrentLevel); showD = mDiffMgr.getShowDelays(mCurrentLevel); shotD = mDiffMgr.getShootDelays(mCurrentLevel); hideD = mDiffMgr.getHideDelays(mCurrentLevel); mShotsFired = 0; mHits = 0; mEnemyMgr.initEnemyMgr(mGameTime, moveD, showD, shotD, hideD, mRows, mQuadrantMgr); }; break; case GAMESTATES.GAMEPLAY: if ((((((mGameTime > 10)) && (mNeedTip))) && ((mCurrentLevel > 1)))){ show(mTip, 0, 0); } else { hide(mTip); }; if (mEnemyMgr.getBodyCount() < mDiffMgr.getTotalEnemies(mCurrentLevel)){ if (mEnemyMgr.getSpawnCount() < mDiffMgr.getTotalEnemies(mCurrentLevel)){ if (mGameTime > (mLastSpawnTime + mDiffMgr.getSpawnDelays(mCurrentLevel))){ spawnEnemy(); }; }; } else { mEndofRoundTime = mGameTime; setGameState(GAMESTATES.ENDROUND); break; }; if (mPlayer.getHealth() <= 0){ mEndofRoundTime = mGameTime; setGameState(GAMESTATES.ENDROUND); }; nearDeathCheck(); update(); break; case GAMESTATES.ENDROUND: Mouse.show(); mIsShooting = false; update(); mEffectMgr.killall(); try { SoundManager.stop("NeardeathSnd"); } catch(e:Error) { }; if (mPlayer.getHealth() <= 0){ gShowDamage.gotoAndStop("FRONT"); }; if (mGameTime >= (mEndofRoundTime + 1)){ if (mPlayer.getHealth() > 0){ playRandomSuccessSound(); }; setGameState(GAMESTATES.ENDROUND2); }; case GAMESTATES.ENDROUND2: mGameTime = (mTimer.currentCount / 10); Mouse.show(); mIsShooting = false; update(); mEffectMgr.killall(); if (mGameTime >= (mEndofRoundTime + 2)){ if (mPlayer.getHealth() <= 0){ showMessage(1); } else { showMessage(2); }; setGameState(GAMESTATES.MESSAGEWAIT); }; break; case GAMESTATES.MESSAGEWAIT: break; case GAMESTATES.IBRWAIT: Mouse.show(); break; case GAMESTATES.CTAWAIT: Mouse.show(); break; }; } public function cbHandleKeyPress(_arg1:KeyboardEvent){ switch (_arg1.keyCode){ case 192: endGame(); mUIReady = false; gotoAndStop("CTA"); mGameState = GAMESTATES.CTAWAIT; break; case Keyboard.ESCAPE: endGame(); mUIReady = false; gotoAndStop("CTA"); mGameState = GAMESTATES.CTAWAIT; break; case Keyboard.SPACE: cbFireKeyPressed(_arg1); break; case 65: case Keyboard.LEFT: cbTurnLeft(_arg1); break; case 100: case Keyboard.RIGHT: cbTurnRight(_arg1); break; default: break; }; } public function cbTitleClientLogoBtn(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); navigateToURL(mClientURL, "_blank"); } public function setBodyCountTextField(_arg1:TextField){ mBodyCountTextField = _arg1; } public function cbAdClick(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); navigateToURL(new URLRequest("http://clk.atdmt.com/IWC/go/blckclgt0690000001iwc/direct/01/"), "_blank"); } public function cbKBLogoBtn(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); navigateToURL(new URLRequest("http://www.kewlbox.com"), "_blank"); } public function cbFireKeyPressed(_arg1:Event){ var _local2:Array; if (!mIsPaused){ if (mGameState == GAMESTATES.GAMEPLAY){ mIsShooting = true; }; }; } private function quadrantUpdate(){ if (mCurrentQuad != mPrevQuad){ mPlayer.setQuadrant(mCurrentQuad); mEnemyMgr.setQuadrant(mCurrentQuad); gotoAndStop(("Q" + mCurrentQuad)); mPrevQuad = mCurrentQuad; }; } public function cbNextRoundMsgOk(_arg1:Event){ SoundManager.play("ButtonclickSnd"); removeEventListener("MsgBoxOKEvent", cbNextRoundMsgOk); setGameState(GAMESTATES.IBRWAIT); gotoAndStop("IBR"); } public function cbTurnRight(_arg1:Event){ mNeedTip = false; if (mGameTime > (mlastTurnTime + TURNDELAY)){ mlastTurnTime = mGameTime; mCurrentQuad = (mCurrentQuad + 1); if (mCurrentQuad > TOTALQUADRANTS){ mCurrentQuad = 1; }; gotoAndPlay("TURN"); }; } public function cbCTAPlayAgainBtn(_arg1:MouseEvent){ SoundManager.stop("TitleMzk"); SoundManager.play("ButtonclickSnd"); gotoAndPlay("GAME"); setGameState(GAMESTATES.INITGAME); _arg1.updateAfterEvent(); } public function cbShowMouse(_arg1:MouseEvent){ Mouse.show(); } public function setHealthMeterMovieClip(_arg1:MovieClip){ mTheHealthMeterMovieClip = _arg1; } public function cbEnemyAttack(_arg1:EnemyAttackEvent){ var _local2:Number; var _local3:*; var _local4:*; _local2 = mDiffMgr.getEnemyAccuracy(mCurrentLevel)[(_arg1.row - 1)]; _local3 = (_local2 / 100); _local4 = Math.random(); playEnemyGunFire(_arg1.quad); if ((((_local3 > _local4)) && (!((Math.abs((_arg1.quad - mCurrentQuad)) == 2))))){ showDamage(_arg1.quad); mPlayer.takeDamage(mDiffMgr.getEnemyDamage(mCurrentLevel)); SoundManager.play("PainsoundSnd"); } else { playNearMiss(); shownearmiss(_arg1.quad); }; } public function cbTitleQuitBtn(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); SoundManager.stop("TitleMzk"); gotoAndStop("CTA"); setGameState(GAMESTATES.CTAWAIT); } public function cbContinue(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); gotoAndStop("TITLE"); } public function cbLossMsgOk(_arg1:Event){ SoundManager.play("ButtonclickSnd"); removeEventListener("MsgBoxOKEvent", cbLossMsgOk); setGameState(GAMESTATES.CTAWAIT); gotoAndStop("CTA"); } public function cbTitleRulesBtn(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); gotoAndStop("RULES"); } public function cbMoveReticule(_arg1:MouseEvent){ if (!mIsPaused){ mTarget.setPosition(_arg1.stageX, _arg1.stageY); _arg1.updateAfterEvent(); }; } private function showMessage(_arg1:Number){ setGameState(GAMESTATES.MESSAGEWAIT); switch (_arg1){ case 1: showRamdomLossMsg(); break; case 2: showWinMsg(); break; }; } private function traceState(){ if (mPrevGameState != mGameState){ mPrevGameState = mGameState; }; } private function whichHeightName(_arg1:Number, _arg2:Number, _arg3:Number):Number{ var _local4:*; var _local5:int; _local4 = (413 / _arg3); _local5 = 0; while (_local5 < _arg3) { if (((((_local5 * _local4) < _arg1)) && ((_arg1 <= ((_local5 + 1) * _local4))))){ return (_local5); }; _local5++; }; return (-1); } public function cbFireKeyReleased(_arg1:Event){ mIsShooting = false; } public function updateSoundState(){ if (SoundManager.isMuted()){ show(gAudioOffBtn, gAudioOnBtn.x, gAudioOnBtn.y); hide(gAudioOnBtn); } else { show(gAudioOnBtn, gAudioOffBtn.x, gAudioOffBtn.y); hide(gAudioOffBtn); }; } public function sortMovies(){ var _local1:Array; var _local2:Number; var _local3:Number; var _local4:Number; mMovieOrder = new Array(); _local1 = [1, 2, 3, 4, 5, 6]; _local2 = _local1.length; _local3 = 1; while (_local3 <= _local2) { _local4 = NewMath.getRandomRange(0, (_local2 - _local3)); mMovieOrder.push(_local1[_local4]); _local1.slice(_local4); _local3++; }; } public function resetScore(){ Score.score = 0; } private function addscore(_arg1:Number){ Score.score = (Score.score + _arg1); } public function setUIBackgroundMovieClip(_arg1:MovieClip){ mUIBackground = _arg1; } public function setRowReferences(_arg1:Array){ mRows = _arg1; } public function cbHandleKeyReleased(_arg1:KeyboardEvent){ switch (_arg1.keyCode){ case Keyboard.SPACE: cbFireKeyReleased(_arg1); break; default: break; }; } public function cbHideMouse(_arg1:MouseEvent){ Mouse.hide(); } private function show(_arg1:DisplayObject, _arg2:Number, _arg3:Number){ if (_arg1.y < 0){ _arg1.y = _arg3; }; } private function pauseGame(){ mIsPaused = true; mTimer.stop(); } public function cbTitlePlayBtn(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); gotoAndPlay("GAME"); setGameState(GAMESTATES.INITGAME); _arg1.updateAfterEvent(); SoundManager.stop("TitleMzk"); } public function setTimerTextField(_arg1:TextField){ mTimerTextField = _arg1; } public function shownearmiss(_arg1:Number){ if (Math.abs((_arg1 - mCurrentQuad)) == 2){ gNearMiss.gotoAndPlay("BACK"); } else { if (leftorright(_arg1) < 0){ gNearMiss.gotoAndPlay("LEFT"); } else { if (leftorright(_arg1) > 0){ gNearMiss.gotoAndPlay("RIGHT"); }; }; }; } public function cbCTAQuitBtn(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); exit(); } private function resetUIReady(){ mUIReady = false; } private function summerize(_arg1:LevelSummary, _arg2:Boolean=true){ var _local3:Number; var _local4:Number; var _local5:Number; _local3 = 0; _local4 = (mHits / mShotsFired); if (_arg2){ if (_local4 > 1){ _local4 = 1; }; _local3 = Math.round((ACCURACYBONUS * _local4)); addscore(_local3); }; _local5 = (mHits * ENEMYPOINTS); _arg1.showsummery(_local5, _local4, _local3, Score.score); } private function showWinMsg(){ var _local1:LevelSummary; switch (mCurrentLevel){ case 1: _local1 = new LevelSummary("You survived that wave of mercenaries…but the battle isn’t over. Reload your fifty-cal — another firefight’s about to break out! ", 0, 0, " "); break; case 2: _local1 = new LevelSummary("Good job, you’ve wiped out an entire platoon of mercenaries. But more bloodthirsty fighters are slithering through the jungle — so get your trigger finger ready!", 0, 0, ""); break; case 3: _local1 = new LevelSummary("Thanks to your bravery, the villagers are safe — at least for now. Keep your hands on the fifty-cal, and watch out for more mercenaries!", 0, 0, ""); break; case 4: _local1 = new LevelSummary("Good work, Rambo. KIAs are scattered all over the jungle. But stay sharp: Another platoon of mercenaries is about to attack!", 0, 0, ""); break; case 5: _local1 = new LevelSummary("Hoorah! You’ve defeated all the mercenaries, and the villagers are safe. You are a true American hero!", 0, 0, "Mission accomplished"); break; }; summerize(_local1); addChild(_local1); addEventListener("MsgBoxOKEvent", cbNextRoundMsgOk); } public function cbSoundToggle(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); if (SoundManager.isMuted()){ SoundManager.unmute(); } else { SoundManager.mute(); }; updateSoundState(); } public function cbGameQuitBtn(_arg1:MouseEvent){ SoundManager.stop("BackgroundMzks"); SoundManager.play("ButtonclickSnd"); endGame(); mUIReady = false; gotoAndStop("CTA"); mGameState = GAMESTATES.CTAWAIT; } private function endGame(){ mIsShooting = false; } public function setTheGunMovieClip(_arg1:MovieClip){ mTheGunMovieClip = _arg1; } public function cbCTAPostScore(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); Score.send(); } public function cbTurnLeft(_arg1:Event){ mNeedTip = false; if (mGameTime > (mlastTurnTime + TURNDELAY)){ mlastTurnTime = mGameTime; mCurrentQuad = (mCurrentQuad - 1); if (mCurrentQuad < 1){ mCurrentQuad = TOTALQUADRANTS; }; gotoAndPlay("TURN"); }; } public function cbTitlePrivacyBtn(_arg1:MouseEvent){ SoundManager.play("ButtonclickSnd"); gotoAndStop("PRIVACY"); } public function invalidEmail(_arg1:Event){ trace("BAD EMAIL"); } public static function createStates(){ GAMESTATES = new EnumeratedType(["LOADWAIT", "TITLEWAIT", "RULESWAIT", "PRIVACYWAIT", "INITGAME", "INITGAME2", "CTAWAIT", "MESSAGEWAIT", "GAMEPLAY", "ENDROUND", "ENDROUND2", "NEWROUND", "IBRWAIT"]); } } }//package
Section 82
//RambogunfireSnd (RambogunfireSnd) package { import flash.media.*; public dynamic class RambogunfireSnd extends Sound { } }//package
Section 83
//Reticule (Reticule) package { import flash.display.*; import flash.geom.*; public class Reticule extends Sprite { private var mPos:Point; public function Reticule(){ trace("created Reticule"); mPos = new Point(0, 0); } public function getPosition():Point{ return (mPos); } public function setPosition(_arg1:Number, _arg2:Number){ mPos.x = _arg1; mPos.y = _arg2; } public function update(){ this.x = mPos.x; this.y = mPos.y; } } }//package
Section 84
//Soldier1 (Soldier1) package { public dynamic class Soldier1 extends Enemy { public function Soldier1(){ addFrameScript(3, frame4, 4, frame5, 10, frame11, 20, frame21, 29, frame30); } function frame4(){ stop(); } function frame21(){ stop(); } function frame5(){ stop(); } function frame30(){ stop(); } function frame11(){ stop(); } } }//package
Section 85
//Soldier2 (Soldier2) package { public dynamic class Soldier2 extends Enemy { public function Soldier2(){ addFrameScript(3, frame4, 4, frame5, 10, frame11, 20, frame21, 29, frame30); } function frame4(){ stop(); } function frame21(){ stop(); } function frame5(){ stop(); } function frame30(){ stop(); } function frame11(){ stop(); } } }//package
Section 86
//Soldier3 (Soldier3) package { public dynamic class Soldier3 extends Enemy { public function Soldier3(){ addFrameScript(3, frame4, 4, frame5, 10, frame11, 20, frame21, 29, frame30); } function frame4(){ stop(); } function frame21(){ stop(); } function frame5(){ stop(); } function frame30(){ stop(); } function frame11(){ stop(); } } }//package
Section 87
//Soldier4 (Soldier4) package { public dynamic class Soldier4 extends Enemy { public function Soldier4(){ addFrameScript(3, frame4, 4, frame5, 10, frame11, 20, frame21, 29, frame30); } function frame4(){ stop(); } function frame21(){ stop(); } function frame5(){ stop(); } function frame30(){ stop(); } function frame11(){ stop(); } } }//package
Section 88
//Success01Snd (Success01Snd) package { import flash.media.*; public dynamic class Success01Snd extends Sound { } }//package
Section 89
//Success02Snd (Success02Snd) package { import flash.media.*; public dynamic class Success02Snd extends Sound { } }//package
Section 90
//Success03Snd (Success03Snd) package { import flash.media.*; public dynamic class Success03Snd extends Sound { } }//package
Section 91
//Tip (Tip) package { import flash.display.*; import flash.text.*; public dynamic class Tip extends MovieClip { public var gTitleText:TextField; public var gMsgText:TextField; } }//package
Section 92
//TitleMzk (TitleMzk) package { import flash.media.*; public dynamic class TitleMzk extends Sound { } }//package
Section 93
//Whoosh (Whoosh) package { import flash.media.*; public dynamic class Whoosh extends Sound { } }//package

Library Items

Symbol 1 Sound {Whoosh}
Symbol 2 Sound {Success03Snd}
Symbol 3 Sound {Success02Snd}
Symbol 4 Sound {Success01Snd}
Symbol 5 Sound {RambogunfireSnd}
Symbol 6 Sound {PainsoundSnd}
Symbol 7 Sound {Nearmiss03Snd}
Symbol 8 Sound {Nearmiss02Snd}
Symbol 9 Sound {Nearmiss01Snd}
Symbol 10 Sound {NeargunfireSnd}
Symbol 11 Sound {NeardeathSnd}
Symbol 12 Sound {TitleMzk}
Symbol 13 Sound {BackgroundMzks}
Symbol 14 Sound {MovementSnd}
Symbol 15 Sound {DistantgunfileSnd}
Symbol 16 Sound {Deathsound03Snd}
Symbol 17 Sound {Deathsound02Snd}
Symbol 18 Sound {Deathsound01Snd}
Symbol 19 Sound {ButtonclickSnd}Used by:447
Symbol 20 GraphicUsed by:23
Symbol 21 GraphicUsed by:23
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClip {Debris1}Uses:20 21 22
Symbol 24 GraphicUsed by:25
Symbol 25 MovieClip {Bullet1}Uses:24
Symbol 26 BitmapUsed by:27
Symbol 27 GraphicUses:26Used by:72
Symbol 28 BitmapUsed by:29
Symbol 29 GraphicUses:28Used by:72
Symbol 30 BitmapUsed by:31
Symbol 31 GraphicUses:30Used by:72
Symbol 32 BitmapUsed by:33
Symbol 33 GraphicUses:32Used by:72
Symbol 34 BitmapUsed by:35
Symbol 35 GraphicUses:34Used by:72
Symbol 36 BitmapUsed by:37
Symbol 37 GraphicUses:36Used by:72
Symbol 38 BitmapUsed by:39
Symbol 39 GraphicUses:38Used by:72
Symbol 40 BitmapUsed by:41
Symbol 41 GraphicUses:40Used by:72
Symbol 42 BitmapUsed by:43
Symbol 43 GraphicUses:42Used by:72
Symbol 44 BitmapUsed by:45
Symbol 45 GraphicUses:44Used by:72 105 138 170 258
Symbol 46 BitmapUsed by:47
Symbol 47 GraphicUses:46Used by:72
Symbol 48 BitmapUsed by:49
Symbol 49 GraphicUses:48Used by:72
Symbol 50 BitmapUsed by:51
Symbol 51 GraphicUses:50Used by:72
Symbol 52 BitmapUsed by:53
Symbol 53 GraphicUses:52Used by:72
Symbol 54 BitmapUsed by:55
Symbol 55 GraphicUses:54Used by:72 105 138 170
Symbol 56 BitmapUsed by:57
Symbol 57 GraphicUses:56Used by:72
Symbol 58 BitmapUsed by:59
Symbol 59 GraphicUses:58Used by:72 105 138 170
Symbol 60 BitmapUsed by:61
Symbol 61 GraphicUses:60Used by:72 105 138 170
Symbol 62 BitmapUsed by:63
Symbol 63 GraphicUses:62Used by:72
Symbol 64 BitmapUsed by:65
Symbol 65 GraphicUses:64Used by:72 105 138 170
Symbol 66 BitmapUsed by:67
Symbol 67 GraphicUses:66Used by:72 105 138 170
Symbol 68 BitmapUsed by:69
Symbol 69 GraphicUses:68Used by:72
Symbol 70 BitmapUsed by:71
Symbol 71 GraphicUses:70Used by:72 105 138 170
Symbol 72 MovieClip {Soldier3}Uses:27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 61 63 65 67 69 71
Symbol 73 BitmapUsed by:74
Symbol 74 GraphicUses:73Used by:105
Symbol 75 BitmapUsed by:76
Symbol 76 GraphicUses:75Used by:105
Symbol 77 BitmapUsed by:78
Symbol 78 GraphicUses:77Used by:105
Symbol 79 BitmapUsed by:80
Symbol 80 GraphicUses:79Used by:105
Symbol 81 BitmapUsed by:82
Symbol 82 GraphicUses:81Used by:105
Symbol 83 BitmapUsed by:84
Symbol 84 GraphicUses:83Used by:105
Symbol 85 BitmapUsed by:86
Symbol 86 GraphicUses:85Used by:105
Symbol 87 BitmapUsed by:88
Symbol 88 GraphicUses:87Used by:105
Symbol 89 BitmapUsed by:90
Symbol 90 GraphicUses:89Used by:105
Symbol 91 BitmapUsed by:92
Symbol 92 GraphicUses:91Used by:105
Symbol 93 BitmapUsed by:94
Symbol 94 GraphicUses:93Used by:105
Symbol 95 BitmapUsed by:96
Symbol 96 GraphicUses:95Used by:105
Symbol 97 BitmapUsed by:98
Symbol 98 GraphicUses:97Used by:105
Symbol 99 BitmapUsed by:100
Symbol 100 GraphicUses:99Used by:105
Symbol 101 BitmapUsed by:102
Symbol 102 GraphicUses:101Used by:105
Symbol 103 BitmapUsed by:104
Symbol 104 GraphicUses:103Used by:105
Symbol 105 MovieClip {Soldier4}Uses:74 76 78 80 82 84 86 88 90 45 92 94 96 98 55 59 100 61 65 102 67 71 104
Symbol 106 BitmapUsed by:107
Symbol 107 GraphicUses:106Used by:138
Symbol 108 BitmapUsed by:109
Symbol 109 GraphicUses:108Used by:138
Symbol 110 BitmapUsed by:111
Symbol 111 GraphicUses:110Used by:138
Symbol 112 BitmapUsed by:113
Symbol 113 GraphicUses:112Used by:138
Symbol 114 BitmapUsed by:115
Symbol 115 GraphicUses:114Used by:138
Symbol 116 BitmapUsed by:117
Symbol 117 GraphicUses:116Used by:138
Symbol 118 BitmapUsed by:119
Symbol 119 GraphicUses:118Used by:138
Symbol 120 BitmapUsed by:121
Symbol 121 GraphicUses:120Used by:138
Symbol 122 BitmapUsed by:123
Symbol 123 GraphicUses:122Used by:138
Symbol 124 BitmapUsed by:125
Symbol 125 GraphicUses:124Used by:138
Symbol 126 BitmapUsed by:127
Symbol 127 GraphicUses:126Used by:138
Symbol 128 BitmapUsed by:129
Symbol 129 GraphicUses:128Used by:138
Symbol 130 BitmapUsed by:131
Symbol 131 GraphicUses:130Used by:138
Symbol 132 BitmapUsed by:133
Symbol 133 GraphicUses:132Used by:138
Symbol 134 BitmapUsed by:135
Symbol 135 GraphicUses:134Used by:138
Symbol 136 BitmapUsed by:137
Symbol 137 GraphicUses:136Used by:138
Symbol 138 MovieClip {Soldier2}Uses:107 109 111 113 115 117 119 121 123 45 125 127 129 131 55 59 133 61 65 135 67 71 137
Symbol 139 BitmapUsed by:140
Symbol 140 GraphicUses:139Used by:170
Symbol 141 BitmapUsed by:142
Symbol 142 GraphicUses:141Used by:170
Symbol 143 BitmapUsed by:144
Symbol 144 GraphicUses:143Used by:170
Symbol 145 BitmapUsed by:146
Symbol 146 GraphicUses:145Used by:170
Symbol 147 BitmapUsed by:148
Symbol 148 GraphicUses:147Used by:170
Symbol 149 BitmapUsed by:150
Symbol 150 GraphicUses:149Used by:170
Symbol 151 BitmapUsed by:152
Symbol 152 GraphicUses:151Used by:170
Symbol 153 BitmapUsed by:155
Symbol 154 BitmapUsed by:155
Symbol 155 GraphicUses:153 154Used by:170
Symbol 156 BitmapUsed by:157
Symbol 157 GraphicUses:156Used by:170
Symbol 158 BitmapUsed by:159
Symbol 159 GraphicUses:158Used by:170
Symbol 160 BitmapUsed by:161
Symbol 161 GraphicUses:160Used by:170
Symbol 162 BitmapUsed by:163
Symbol 163 GraphicUses:162Used by:170
Symbol 164 BitmapUsed by:165
Symbol 165 GraphicUses:164Used by:170
Symbol 166 BitmapUsed by:167
Symbol 167 GraphicUses:166Used by:170
Symbol 168 BitmapUsed by:169
Symbol 169 GraphicUses:168Used by:170
Symbol 170 MovieClip {Soldier1}Uses:140 142 144 146 148 150 152 155 157 45 159 161 163 55 59 165 61 65 167 67 71 169
Symbol 171 BitmapUsed by:172
Symbol 172 GraphicUses:171Used by:173
Symbol 173 MovieClip {Reticule}Uses:172
Symbol 174 BitmapUsed by:175
Symbol 175 GraphicUses:174Used by:194 434 438 442
Symbol 176 BitmapUsed by:177
Symbol 177 GraphicUses:176Used by:180
Symbol 178 BitmapUsed by:179
Symbol 179 GraphicUses:178Used by:180
Symbol 180 ButtonUses:177 179Used by:194 434 438 442
Symbol 181 FontUsed by:182 435 436 439 440 443
Symbol 182 EditableTextUses:181Used by:194
Symbol 183 FontUsed by:184 196
Symbol 184 EditableTextUses:183Used by:194
Symbol 185 FontUsed by:186 187 195 437 441 444
Symbol 186 TextUses:185Used by:194
Symbol 187 TextUses:185Used by:194
Symbol 188 FontUsed by:189 190 191 192 193 314 318 319 327 420
Symbol 189 EditableTextUses:188Used by:194
Symbol 190 EditableTextUses:188Used by:194
Symbol 191 EditableTextUses:188Used by:194
Symbol 192 EditableTextUses:188Used by:194
Symbol 193 EditableTextUses:188Used by:194
Symbol 194 MovieClip {LevelSummary}Uses:175 180 182 184 186 187 189 190 191 192 193
Symbol 195 EditableTextUses:185Used by:197
Symbol 196 EditableTextUses:183Used by:197
Symbol 197 MovieClip {Tip}Uses:195 196Used by:Timeline
Symbol 198 MovieClip {EffectsManager}Used by:Timeline
Symbol 199 GraphicUsed by:200
Symbol 200 MovieClipUses:199Used by:204
Symbol 201 BitmapUsed by:202
Symbol 202 GraphicUses:201Used by:203
Symbol 203 MovieClip {fl.video.Icon}Uses:202Used by:204
Symbol 204 MovieClip {fl.video.FLVPlayback}Uses:200 203Used by:Timeline
Symbol 205 BitmapUsed by:206
Symbol 206 GraphicUses:205Used by:207
Symbol 207 MovieClipUses:206Used by:Timeline
Symbol 208 BitmapUsed by:209
Symbol 209 GraphicUses:208Used by:210
Symbol 210 MovieClipUses:209Used by:Timeline
Symbol 211 BitmapUsed by:212
Symbol 212 GraphicUses:211Used by:Timeline
Symbol 213 BitmapUsed by:214
Symbol 214 GraphicUses:213Used by:217
Symbol 215 BitmapUsed by:216
Symbol 216 GraphicUses:215Used by:217
Symbol 217 ButtonUses:214 216Used by:Timeline
Symbol 218 BitmapUsed by:219
Symbol 219 GraphicUses:218Used by:222
Symbol 220 BitmapUsed by:221
Symbol 221 GraphicUses:220Used by:222
Symbol 222 ButtonUses:219 221Used by:Timeline
Symbol 223 BitmapUsed by:224
Symbol 224 GraphicUses:223Used by:227
Symbol 225 BitmapUsed by:226
Symbol 226 GraphicUses:225Used by:227
Symbol 227 ButtonUses:224 226Used by:Timeline
Symbol 228 BitmapUsed by:229
Symbol 229 GraphicUses:228Used by:230
Symbol 230 ButtonUses:229Used by:Timeline
Symbol 231 BitmapUsed by:232
Symbol 232 GraphicUses:231Used by:233
Symbol 233 ButtonUses:232Used by:Timeline
Symbol 234 BitmapUsed by:235
Symbol 235 GraphicUses:234Used by:236
Symbol 236 ButtonUses:235Used by:Timeline
Symbol 237 FontUsed by:238 242 421 422 423 424 425 443
Symbol 238 EditableTextUses:237Used by:Timeline
Symbol 239 BitmapUsed by:240
Symbol 240 GraphicUses:239Used by:241
Symbol 241 ButtonUses:240Used by:Timeline
Symbol 242 TextUses:237Used by:Timeline
Symbol 243 BitmapUsed by:244
Symbol 244 GraphicUses:243Used by:245
Symbol 245 MovieClipUses:244Used by:Timeline
Symbol 246 MovieClipUsed by:Timeline
Symbol 247 MovieClipUsed by:Timeline
Symbol 248 BitmapUsed by:249
Symbol 249 GraphicUses:248Used by:Timeline
Symbol 250 MovieClipUsed by:Timeline
Symbol 251 BitmapUsed by:252
Symbol 252 GraphicUses:251Used by:Timeline
Symbol 253 MovieClipUsed by:Timeline
Symbol 254 BitmapUsed by:255
Symbol 255 GraphicUses:254Used by:Timeline
Symbol 256 BitmapUsed by:257
Symbol 257 GraphicUses:256Used by:311
Symbol 258 MovieClipUses:45Used by:311
Symbol 259 BitmapUsed by:260
Symbol 260 GraphicUses:259Used by:311
Symbol 261 BitmapUsed by:262
Symbol 262 GraphicUses:261Used by:311
Symbol 263 BitmapUsed by:264
Symbol 264 GraphicUses:263Used by:311
Symbol 265 BitmapUsed by:266
Symbol 266 GraphicUses:265Used by:311
Symbol 267 BitmapUsed by:268
Symbol 268 GraphicUses:267Used by:311
Symbol 269 BitmapUsed by:270
Symbol 270 GraphicUses:269Used by:311
Symbol 271 BitmapUsed by:272
Symbol 272 GraphicUses:271Used by:311
Symbol 273 BitmapUsed by:274
Symbol 274 GraphicUses:273Used by:311
Symbol 275 BitmapUsed by:276
Symbol 276 GraphicUses:275Used by:311
Symbol 277 BitmapUsed by:278
Symbol 278 GraphicUses:277Used by:311
Symbol 279 BitmapUsed by:280
Symbol 280 GraphicUses:279Used by:311
Symbol 281 BitmapUsed by:282
Symbol 282 GraphicUses:281Used by:311
Symbol 283 BitmapUsed by:284
Symbol 284 GraphicUses:283Used by:311
Symbol 285 BitmapUsed by:286
Symbol 286 GraphicUses:285Used by:311
Symbol 287 BitmapUsed by:288
Symbol 288 GraphicUses:287Used by:311
Symbol 289 BitmapUsed by:290
Symbol 290 GraphicUses:289Used by:311
Symbol 291 BitmapUsed by:292
Symbol 292 GraphicUses:291Used by:311
Symbol 293 BitmapUsed by:294
Symbol 294 GraphicUses:293Used by:311
Symbol 295 BitmapUsed by:296
Symbol 296 GraphicUses:295Used by:311
Symbol 297 BitmapUsed by:298
Symbol 298 GraphicUses:297Used by:311
Symbol 299 BitmapUsed by:300
Symbol 300 GraphicUses:299Used by:311
Symbol 301 BitmapUsed by:302
Symbol 302 GraphicUses:301Used by:311
Symbol 303 BitmapUsed by:304
Symbol 304 GraphicUses:303Used by:311
Symbol 305 BitmapUsed by:306
Symbol 306 GraphicUses:305Used by:311
Symbol 307 BitmapUsed by:308
Symbol 308 GraphicUses:307Used by:311
Symbol 309 BitmapUsed by:310
Symbol 310 GraphicUses:309Used by:311
Symbol 311 MovieClip {Rambo_fla.TheGun_16}Uses:257 258 260 262 264 266 268 270 272 274 276 278 280 282 284 286 288 290 292 294 296 298 300 302 304 306 308 310Used by:Timeline
Symbol 312 MovieClipUsed by:Timeline
Symbol 313 GraphicUsed by:Timeline
Symbol 314 EditableTextUses:188Used by:Timeline
Symbol 315 BitmapUsed by:316
Symbol 316 GraphicUses:315Used by:317
Symbol 317 MovieClipUses:316Used by:Timeline
Symbol 318 EditableTextUses:188Used by:Timeline
Symbol 319 EditableTextUses:188Used by:Timeline
Symbol 320 BitmapUsed by:321
Symbol 321 GraphicUses:320Used by:324
Symbol 322 BitmapUsed by:323
Symbol 323 GraphicUses:322Used by:324
Symbol 324 ButtonUses:321 323Used by:Timeline
Symbol 325 GraphicUsed by:326
Symbol 326 MovieClipUses:325Used by:Timeline
Symbol 327 EditableTextUses:188Used by:Timeline
Symbol 328 BitmapUsed by:329
Symbol 329 GraphicUses:328Used by:330
Symbol 330 MovieClipUses:329Used by:Timeline
Symbol 331 BitmapUsed by:332
Symbol 332 GraphicUses:331Used by:335
Symbol 333 BitmapUsed by:334
Symbol 334 GraphicUses:333Used by:335
Symbol 335 ButtonUses:332 334Used by:Timeline
Symbol 336 BitmapUsed by:337
Symbol 337 GraphicUses:336Used by:340
Symbol 338 BitmapUsed by:339
Symbol 339 GraphicUses:338Used by:340
Symbol 340 ButtonUses:337 339Used by:Timeline
Symbol 341 BitmapUsed by:342
Symbol 342 GraphicUses:341Used by:343
Symbol 343 MovieClipUses:342Used by:Timeline
Symbol 344 BitmapUsed by:345 348
Symbol 345 GraphicUses:344Used by:349
Symbol 346 BitmapUsed by:347
Symbol 347 GraphicUses:346Used by:349
Symbol 348 GraphicUses:344Used by:349
Symbol 349 MovieClip {Rambo_fla.NearMissIndicator_26}Uses:345 347 348Used by:Timeline
Symbol 350 BitmapUsed by:351
Symbol 351 GraphicUses:350Used by:356
Symbol 352 BitmapUsed by:353
Symbol 353 GraphicUses:352Used by:356
Symbol 354 BitmapUsed by:355
Symbol 355 GraphicUses:354Used by:356
Symbol 356 MovieClip {Rambo_fla.DamageIndicator_27}Uses:351 353 355Used by:Timeline
Symbol 357 GraphicUsed by:Timeline
Symbol 358 BitmapUsed by:359
Symbol 359 GraphicUses:358Used by:360
Symbol 360 MovieClipUses:359Used by:Timeline
Symbol 361 BitmapUsed by:362
Symbol 362 GraphicUses:361Used by:Timeline
Symbol 363 BitmapUsed by:364
Symbol 364 GraphicUses:363Used by:Timeline
Symbol 365 BitmapUsed by:366
Symbol 366 GraphicUses:365Used by:Timeline
Symbol 367 BitmapUsed by:368
Symbol 368 GraphicUses:367Used by:369
Symbol 369 MovieClipUses:368Used by:Timeline
Symbol 370 BitmapUsed by:371
Symbol 371 GraphicUses:370Used by:Timeline
Symbol 372 BitmapUsed by:373
Symbol 373 GraphicUses:372Used by:Timeline
Symbol 374 BitmapUsed by:375
Symbol 375 GraphicUses:374Used by:Timeline
Symbol 376 BitmapUsed by:377
Symbol 377 GraphicUses:376Used by:378
Symbol 378 MovieClipUses:377Used by:Timeline
Symbol 379 BitmapUsed by:380
Symbol 380 GraphicUses:379Used by:Timeline
Symbol 381 BitmapUsed by:382
Symbol 382 GraphicUses:381Used by:Timeline
Symbol 383 BitmapUsed by:384
Symbol 384 GraphicUses:383Used by:Timeline
Symbol 385 BitmapUsed by:386
Symbol 386 GraphicUses:385Used by:387
Symbol 387 MovieClipUses:386Used by:Timeline
Symbol 388 BitmapUsed by:389
Symbol 389 GraphicUses:388Used by:Timeline
Symbol 390 BitmapUsed by:391
Symbol 391 GraphicUses:390Used by:394
Symbol 392 BitmapUsed by:393
Symbol 393 GraphicUses:392Used by:394
Symbol 394 ButtonUses:391 393Used by:Timeline
Symbol 395 BitmapUsed by:396
Symbol 396 GraphicUses:395Used by:Timeline
Symbol 397 BitmapUsed by:398
Symbol 398 GraphicUses:397Used by:401
Symbol 399 BitmapUsed by:400
Symbol 400 GraphicUses:399Used by:401
Symbol 401 ButtonUses:398 400Used by:Timeline
Symbol 402 BitmapUsed by:403
Symbol 403 GraphicUses:402Used by:406
Symbol 404 BitmapUsed by:405
Symbol 405 GraphicUses:404Used by:406
Symbol 406 ButtonUses:403 405Used by:Timeline
Symbol 407 BitmapUsed by:408
Symbol 408 GraphicUses:407Used by:411
Symbol 409 BitmapUsed by:410
Symbol 410 GraphicUses:409Used by:411
Symbol 411 ButtonUses:408 410Used by:Timeline
Symbol 412 BitmapUsed by:413 415
Symbol 413 GraphicUses:412Used by:416
Symbol 414 BitmapUsed by:415
Symbol 415 GraphicUses:414 412Used by:416
Symbol 416 ButtonUses:413 415Used by:Timeline
Symbol 417 BitmapUsed by:418
Symbol 418 GraphicUses:417Used by:419
Symbol 419 ButtonUses:418Used by:Timeline
Symbol 420 EditableTextUses:188Used by:Timeline
Symbol 421 EditableTextUses:237Used by:Timeline
Symbol 422 EditableTextUses:237Used by:Timeline
Symbol 423 EditableTextUses:237Used by:Timeline
Symbol 424 EditableTextUses:237Used by:Timeline
Symbol 425 EditableTextUses:237Used by:Timeline
Symbol 426 BitmapUsed by:427
Symbol 427 GraphicUses:426Used by:428 431
Symbol 428 ButtonUses:427Used by:431
Symbol 429 BitmapUsed by:430
Symbol 430 GraphicUses:429Used by:431
Symbol 431 MovieClip {Rambo_fla.CTAADDCLIP_39}Uses:428 427 430Used by:Timeline
Symbol 432 BitmapUsed by:433
Symbol 433 GraphicUses:432Used by:Timeline
Symbol 434 MovieClipUses:175 180Used by:Timeline
Symbol 435 TextUses:181Used by:Timeline
Symbol 436 EditableTextUses:181Used by:Timeline
Symbol 437 TextUses:185Used by:Timeline
Symbol 438 MovieClipUses:175 180Used by:Timeline
Symbol 439 TextUses:181Used by:Timeline
Symbol 440 EditableTextUses:181Used by:Timeline
Symbol 441 TextUses:185Used by:Timeline
Symbol 442 MovieClipUses:175 180Used by:Timeline
Symbol 443 TextUses:181 237Used by:Timeline
Symbol 444 TextUses:185Used by:Timeline
Symbol 445 GraphicUsed by:450
Symbol 446 GraphicUsed by:447
Symbol 447 MovieClip {Rambo_fla.kewlboxanimatedlogo_46}Uses:446 19Used by:450
Symbol 448 BitmapUsed by:449
Symbol 449 GraphicUses:448Used by:450
Symbol 450 MovieClip {Rambo_fla.LogoLaunchPage_45}Uses:445 447 449Used by:Timeline

Instance Names

"gParticleLayer"Frame 1Symbol 198 MovieClip {EffectsManager}
"progressBar"Frame 1Symbol 210 MovieClip
"gTitlePlayBtn"Frame 6Symbol 217 Button
"gTitleRulesBtn"Frame 6Symbol 222 Button
"gTitleQuitBtn"Frame 6Symbol 227 Button
"gTitleClientLogoBtn"Frame 6Symbol 230 Button
"gTitlePrivacyBtn"Frame 6Symbol 233 Button
"gTitleLegalBtn"Frame 6Symbol 236 Button
"gVersionTextBox"Frame 6Symbol 238 EditableText
"gKBLogo"Frame 6Symbol 241 Button
"mGameBackGround"Frame 12Symbol 245 MovieClip
"gRow3"Frame 12Symbol 246 MovieClip
"gSpot06"Frame 12Symbol 247 MovieClip
"gSpot07"Frame 12Symbol 247 MovieClip
"gSpot08"Frame 12Symbol 247 MovieClip
"gSpot09"Frame 12Symbol 247 MovieClip
"gSpot10"Frame 12Symbol 247 MovieClip
"gRow2"Frame 12Symbol 250 MovieClip
"gSpot04"Frame 12Symbol 247 MovieClip
"gSpot05"Frame 12Symbol 247 MovieClip
"gRow1"Frame 12Symbol 253 MovieClip
"gSpot01"Frame 12Symbol 247 MovieClip
"gSpot02"Frame 12Symbol 247 MovieClip
"gSpot03"Frame 12Symbol 247 MovieClip
"gTheGun"Frame 12Symbol 311 MovieClip {Rambo_fla.TheGun_16}
"gUI"Frame 12Symbol 312 MovieClip
"gTimerTextField"Frame 12Symbol 314 EditableText
"gUIBackground"Frame 12Symbol 317 MovieClip
"gBodyCountTextField"Frame 12Symbol 318 EditableText
"gEnemyCountTextField"Frame 12Symbol 319 EditableText
"gGameQuitBtn"Frame 12Symbol 324 Button
"gHealthMeter2"Frame 12Symbol 326 MovieClip
"gLevelTextField"Frame 12Symbol 327 EditableText
"gHealthMeter"Frame 12Symbol 330 MovieClip
"gAudioOffBtn"Frame 12Symbol 335 Button
"gAudioOnBtn"Frame 12Symbol 340 Button
"gNearMiss"Frame 12Symbol 349 MovieClip {Rambo_fla.NearMissIndicator_26}
"gShowDamage"Frame 12Symbol 356 MovieClip {Rambo_fla.DamageIndicator_27}
"gTip"Frame 12Symbol 197 MovieClip {Tip}
"mGameBackGround"Frame 17Symbol 360 MovieClip
"mGameBackGround"Frame 22Symbol 369 MovieClip
"mGameBackGround"Frame 27Symbol 378 MovieClip
"mGameBackGround"Frame 31Symbol 387 MovieClip
"gFLVMovie"Frame 37Symbol 204 MovieClip {fl.video.FLVPlayback}
"gIBRContinueBtn"Frame 37Symbol 394 Button
"gPostScoreBtn"Frame 40Symbol 401 Button
"gCTAPlayBtn"Frame 40Symbol 406 Button
"gCTAQuitBtn"Frame 40Symbol 411 Button
"gCTASubmitBtn"Frame 40Symbol 416 Button
"gCTAKewlboxBtn"Frame 40Symbol 419 Button
"gCTAScoreText"Frame 40Symbol 420 EditableText
"gmail1"Frame 40Symbol 421 EditableText
"gmail2"Frame 40Symbol 422 EditableText
"gmail3"Frame 40Symbol 423 EditableText
"gmail4"Frame 40Symbol 424 EditableText
"gmail5"Frame 40Symbol 425 EditableText
"gCTAAd"Frame 40Symbol 431 MovieClip {Rambo_fla.CTAADDCLIP_39}
"gLegal"Frame 50Symbol 434 MovieClip
"gPrivacy"Frame 55Symbol 438 MovieClip
"gRules"Frame 60Symbol 442 MovieClip
"gOkBtn"Symbol 194 MovieClip {LevelSummary} Frame 1Symbol 180 Button
"gMsgText"Symbol 194 MovieClip {LevelSummary} Frame 1Symbol 182 EditableText
"gTitleText"Symbol 194 MovieClip {LevelSummary} Frame 1Symbol 184 EditableText
"gStartingScore"Symbol 194 MovieClip {LevelSummary} Frame 1Symbol 189 EditableText
"gLevelScore"Symbol 194 MovieClip {LevelSummary} Frame 1Symbol 190 EditableText
"gAccuracy"Symbol 194 MovieClip {LevelSummary} Frame 1Symbol 191 EditableText
"gBonus"Symbol 194 MovieClip {LevelSummary} Frame 1Symbol 192 EditableText
"gFinalScore"Symbol 194 MovieClip {LevelSummary} Frame 1Symbol 193 EditableText
"gMsgText"Symbol 197 MovieClip {Tip} Frame 1Symbol 195 EditableText
"gTitleText"Symbol 197 MovieClip {Tip} Frame 1Symbol 196 EditableText
"boundingBox_mc"Symbol 204 MovieClip {fl.video.FLVPlayback} Frame 1Symbol 200 MovieClip
"kewlboxLogo"Symbol 450 MovieClip {Rambo_fla.LogoLaunchPage_45} Frame 1Symbol 447 MovieClip {Rambo_fla.kewlboxanimatedlogo_46}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1231 bytes "<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns ..."

Labels

"LOAD"Frame 2
"TITLE"Frame 6
"GAME"Frame 12
"Q1"Frame 13
"Q2"Frame 18
"Q3"Frame 23
"Q4"Frame 28
"TURN"Frame 31
"IBR"Frame 36
"CTA"Frame 40
"EXIT"Frame 45
"LEGAL"Frame 50
"PRIVACY"Frame 55
"RULES"Frame 60
"LAUNCH"Frame 65
"DOWN"Symbol 72 MovieClip {Soldier3} Frame 1
"START"Symbol 72 MovieClip {Soldier3} Frame 5
"UP"Symbol 72 MovieClip {Soldier3} Frame 6
"SHOOT"Symbol 72 MovieClip {Soldier3} Frame 12
"DIE"Symbol 72 MovieClip {Soldier3} Frame 23
"DOWN"Symbol 105 MovieClip {Soldier4} Frame 1
"START"Symbol 105 MovieClip {Soldier4} Frame 5
"UP"Symbol 105 MovieClip {Soldier4} Frame 6
"SHOOT"Symbol 105 MovieClip {Soldier4} Frame 12
"DIE"Symbol 105 MovieClip {Soldier4} Frame 23
"DOWN"Symbol 138 MovieClip {Soldier2} Frame 1
"START"Symbol 138 MovieClip {Soldier2} Frame 5
"UP"Symbol 138 MovieClip {Soldier2} Frame 6
"SHOOT"Symbol 138 MovieClip {Soldier2} Frame 12
"DIE"Symbol 138 MovieClip {Soldier2} Frame 23
"DOWN"Symbol 170 MovieClip {Soldier1} Frame 1
"START"Symbol 170 MovieClip {Soldier1} Frame 5
"UP"Symbol 170 MovieClip {Soldier1} Frame 6
"SHOOT"Symbol 170 MovieClip {Soldier1} Frame 12
"DIE"Symbol 170 MovieClip {Soldier1} Frame 23
"P00"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 1
"P00s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 3
"P10"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 6
"P10s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 8
"P20"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 11
"P20s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 13
"P30"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 16
"P30s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 18
"P40"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 21
"P40s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 23
"P50"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 26
"P50s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 28
"P60"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 31
"P60s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 33
"P70"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 36
"P70s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 38
"P80"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 41
"P80s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 43
"P01"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 46
"P01s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 48
"P11"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 51
"P11s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 53
"P21"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 56
"P21s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 58
"P31"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 61
"P31s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 63
"P41"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 66
"P41s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 68
"P51"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 71
"P51s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 73
"P61"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 76
"P61s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 78
"P71"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 81
"P71s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 83
"P81"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 86
"P81s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 88
"P02"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 91
"P02s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 93
"P12"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 96
"P12s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 98
"P22"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 101
"P22s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 103
"P32"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 106
"P32s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 108
"P42"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 111
"P42s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 113
"P52"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 116
"P52s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 118
"P62"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 121
"P62s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 123
"P72"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 126
"P72s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 128
"P82"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 131
"P82s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 133
"P03"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 136
"P03s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 138
"P13"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 141
"P13s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 143
"P23"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 146
"P23s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 148
"P33"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 151
"P33s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 153
"P43"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 156
"P43s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 158
"P53"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 161
"P53s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 163
"P63"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 166
"P63s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 168
"P73"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 171
"P73s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 173
"P83"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 176
"P83s"Symbol 311 MovieClip {Rambo_fla.TheGun_16} Frame 178
"LEFT"Symbol 349 MovieClip {Rambo_fla.NearMissIndicator_26} Frame 2
"RIGHT"Symbol 349 MovieClip {Rambo_fla.NearMissIndicator_26} Frame 22
"BACK"Symbol 349 MovieClip {Rambo_fla.NearMissIndicator_26} Frame 42
"FRONT"Symbol 356 MovieClip {Rambo_fla.DamageIndicator_27} Frame 2
"LEFT"Symbol 356 MovieClip {Rambo_fla.DamageIndicator_27} Frame 15
"RIGHT"Symbol 356 MovieClip {Rambo_fla.DamageIndicator_27} Frame 28
"BACK"Symbol 356 MovieClip {Rambo_fla.DamageIndicator_27} Frame 41




http://swfchan.com/10/47667/info.shtml
Created: 1/5 -2019 09:59:28 Last modified: 1/5 -2019 09:59:28 Server time: 22/12 -2024 23:32:10