Section 1
//ArchiveButton_14 (betamax_fla.ArchiveButton_14)
package betamax_fla {
import flash.text.*;
import flash.display.*;
public dynamic class ArchiveButton_14 extends MovieClip {
public var label:TextField;
public function ArchiveButton_14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package betamax_fla
Section 2
//ShareButtonBG_10 (betamax_fla.ShareButtonBG_10)
package betamax_fla {
import flash.display.*;
public dynamic class ShareButtonBG_10 extends MovieClip {
public function ShareButtonBG_10(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package betamax_fla
Section 3
//ShareIcons_9 (betamax_fla.ShareIcons_9)
package betamax_fla {
import flash.display.*;
public dynamic class ShareIcons_9 extends MovieClip {
public function ShareIcons_9(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
}
}
}//package betamax_fla
Section 4
//Debug (com.arthropod.Debug)
package com.arthropod {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.system.*;
public class Debug {
private static const MEMORY_OPERATION:String = "debugMemory";
public static const NAME:String = "Debug";
private static const ERROR_OPERATION:String = "debugError";
private static const CLEAR_OPERATION:String = "debugClear";
private static const BITMAP_OPERATION:String = "debugBitmapData";
public static const VERSION:String = "0.74";
private static const TYPE:String = "app";
private static const ARRAY_OPERATION:String = "debugArray";
private static const DOMAIN:String = "com.carlcalderon.Arthropod";
private static const OBJECT_OPERATION:String = "debugObject";
private static const WARNING_OPERATION:String = "debugWarning";
private static const CONNECTION:String = "arthropod";
private static const CHECK:String = ".161E714B6C1A76DE7B9865F88B32FCCE8FABA7B5.1";
private static const LOG_OPERATION:String = "debug";
public static var LIGHT_BLUE:uint = 0xCCCC;
public static var secureDomain:String = "*";
public static var password:String = "CDC309AF";
public static var allowLog:Boolean = true;
public static var BLUE:uint = 6710988;
public static var GREEN:uint = 0xCC00;
public static var ignoreStatus:Boolean = true;
public static var RED:uint = 0xCC0000;
public static var secure:Boolean = false;
public static var YELLOW:uint = 0xCCCC00;
public static var PINK:uint = 0xCC00CC;
private static var lc:LocalConnection = new LocalConnection();
private static var hasEventListeners:Boolean = false;
public static function memory():Boolean{
return (send(MEMORY_OPERATION, System.totalMemory, null));
}
public static function error(_arg1):Boolean{
return (send(ERROR_OPERATION, String(_arg1), 0xCC0000));
}
public static function warning(_arg1):Boolean{
return (send(WARNING_OPERATION, String(_arg1), 0xCCCC00));
}
private static function send(_arg1:String, _arg2, _arg3):Boolean{
var operation = _arg1;
var value = _arg2;
var prop = _arg3;
if (!secure){
lc.allowInsecureDomain("*");
} else {
lc.allowDomain(secureDomain);
};
if (!hasEventListeners){
if (ignoreStatus){
lc.addEventListener(StatusEvent.STATUS, ignore);
} else {
lc.addEventListener(StatusEvent.STATUS, status);
};
hasEventListeners = true;
};
if (allowLog){
try {
lc.send((((((TYPE + "#") + DOMAIN) + CHECK) + ":") + CONNECTION), operation, password, value, prop);
return (true);
} catch(e) {
return (false);
};
};
return (false);
}
public static function bitmap(_arg1, _arg2:String=null):Boolean{
var _local3:BitmapData = new BitmapData(100, 100, true, 0xFFFFFF);
var _local4:Matrix = new Matrix();
var _local5:Number = (100 / ((_arg1.width)>=_arg1.height) ? _arg1.width : _arg1.height);
_local4.scale(_local5, _local5);
_local3.draw(_arg1, _local4, null, null, null, true);
var _local6:Rectangle = new Rectangle(0, 0, Math.floor((_arg1.width * _local5)), Math.floor((_arg1.height * _local5)));
return (send(BITMAP_OPERATION, _local3.getPixels(_local6), {bounds:_local6, lbl:_arg2}));
}
public static function object(_arg1):Boolean{
return (send(OBJECT_OPERATION, _arg1, null));
}
public static function clear():Boolean{
return (send(CLEAR_OPERATION, 0, 0));
}
private static function ignore(_arg1:StatusEvent):void{
}
public static function log(_arg1, _arg2:uint=0xFEFEFE):Boolean{
return (send(LOG_OPERATION, String(_arg1), _arg2));
}
public static function array(_arg1:Array):Boolean{
return (send(ARRAY_OPERATION, _arg1, null));
}
public static function snapshot(_arg1:Stage, _arg2:String=null):Boolean{
if (_arg1){
return (bitmap(_arg1, _arg2));
};
return (false);
}
private static function status(_arg1:StatusEvent):void{
trace(("Arthropod status:\n" + _arg1.toString()));
}
}
}//package com.arthropod
Section 5
//ggCom (com.nielsen.ggCom)
package com.nielsen {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
public class ggCom extends MovieClip {
private var ggLoaded:Boolean;// = false
private var ggConnectionName:String;
private var ggHasStage:Boolean;// = false
private var GGMAXQUEUESIZE:Number;// = 10000
private var GGSWFADDRESS:String;
private var ggLoader:Loader;
public var _nolggGlobalParams:Object;
private var ggEventQueue:Array;
private var GGSWFLOADERRORADDRESS:String;// = "http://dz.glanceguide.com/errl.php"
private var ggConnection:LocalConnection;
private var GGSWFLOADRETRY:Number;// = 2
private var ggLoadRetry:Number;// = 0
private var GGSWFCONNECTIONRETRY:Number;// = 5
private var ggConnectionRetry:Number;// = 0
private var enableJSinterface:Boolean;// = false
private var ggPlayerType;// = "gen3flvplayer"
private static var ggComCreate:Boolean = false;
private static var ggComInstance:ggCom = null;
public function ggCom(){
_nolggGlobalParams = {clientid:"us-601685", vcid:"c01", msgint:""};
ggConnection = new LocalConnection();
ggLoader = new Loader();
ggEventQueue = new Array();
super();
if (!ggComCreate){
return;
};
setNOLconfigparams();
GGSWFADDRESS = (("http://secure-" + _nolggGlobalParams.sfcode) + ".imrworldwide.com/novms/gn/3/ggce302.swf");
Security.allowDomain(GGSWFADDRESS);
Security.allowInsecureDomain(GGSWFADDRESS);
if (((enableJSinterface) && (ExternalInterface.available))){
ExternalInterface.addCallback("ggPCM", PCM);
};
ggConnection.addEventListener(StatusEvent.STATUS, onGGSwfConnectionStatus);
loadGGSWF();
}
public function setStage(_arg1:Object){
_arg1.stage.addChild(this);
ggHasStage = true;
}
function setVideoInfo(_arg1):void{
PM("videoInfo", _arg1);
}
private function onLoadGGSwfIoErrorHandler(_arg1:IOErrorEvent):void{
if (ggLoadRetry < GGSWFLOADRETRY){
ggLoadRetry++;
loadGGSWF();
} else {
sendLoadGGSWFFail();
};
}
private function onLoadGGSwfHandler(_arg1:Event):void{
this.addChild(ggLoader);
setTimeout(makeGGSwfConnection, 500);
}
function setNOLconfigparams(){
_nolggGlobalParams.sfcode = "us";
_nolggGlobalParams.cisuffix = "";
_nolggGlobalParams.prod = "sc";
}
private function emptyEventQueue():void{
var _local1:* = ggEventQueue.length;
var _local2:* = 0;
while (_local2 < _local1) {
ggConnection.send(ggConnectionName, "ggProcessMetricAC3", ggEventQueue[_local2], ggEventQueue[(_local2 + 1)], ggEventQueue[(_local2 + 2)], ggEventQueue[(_local2 + 3)], ggEventQueue[(_local2 + 4)], ggEventQueue[(_local2 + 5)]);
_local2 = (_local2 + 6);
};
ggEventQueue.length = 0;
}
private function makeGGSwfConnection(){
var _local1:*;
var _local2:*;
if (ggConnectionRetry < GGSWFCONNECTIONRETRY){
_local1 = "";
if (ggHasStage){
for (_local2 in _nolggGlobalParams) {
if (((!((root.loaderInfo.parameters[("nolgg_" + _local2)] == null))) && (!((root.loaderInfo.parameters[("nolgg_" + _local2)] == ""))))){
_nolggGlobalParams[_local2] = root.loaderInfo.parameters[("nolgg_" + _local2)];
};
};
PM(51, root.loaderInfo.url);
};
for (_local2 in _nolggGlobalParams) {
_local1 = (_local1 + (((((("<" + _local2) + ">") + _nolggGlobalParams[_local2]) + "</") + _local2) + ">"));
};
ggConnectionName = ggLoader.content.name;
ggConnection.send(ggConnectionName, "ggInitializeAC3", ggPlayerType, getUserID(), _local1);
};
}
public function getUserID():String{
return (null);
}
private function loadGGSWF(){
ggLoader = new Loader();
ggLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadGGSwfHandler);
ggLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadGGSwfIoErrorHandler);
ggLoader.load(new URLRequest(GGSWFADDRESS));
}
private function ggSwfConnectionSuccess(){
ggLoaded = true;
emptyEventQueue();
}
private function onGGSwfConnectionStatus(_arg1:StatusEvent):void{
if (ggLoaded){
return;
};
switch (_arg1.level){
case "status":
ggSwfConnectionSuccess();
break;
case "error":
ggConnectionRetry++;
makeGGSwfConnection();
break;
};
}
private function sendLoadGGSWFFail(){
ggLoader = new Loader();
ggLoader.load(new URLRequest(((((((GGSWFLOADERRORADDRESS + "?clientid=") + _nolggGlobalParams.clientid) + "&code=ggLoadFailed&cts=") + (new Date().getTimezoneOffset() / -60)) + ",") + new Date().getTime())));
}
public function PCM(_arg1, ... _args):void{
PM(_arg1, _args[0], _args[1], _args[2], _args[3]);
}
public function PM(_arg1, ... _args):void{
if (ggLoaded){
ggConnection.send(ggConnectionName, "ggProcessMetricAC3", _arg1, new Date().getTime(), _args[0], _args[1], _args[2], _args[3]);
} else {
if (ggEventQueue.length < GGMAXQUEUESIZE){
ggEventQueue.push(_arg1);
ggEventQueue.push(new Date().getTime());
ggEventQueue.push(_args[0]);
ggEventQueue.push(_args[1]);
ggEventQueue.push(_args[2]);
ggEventQueue.push(_args[3]);
};
};
}
public static function getInstance():ggCom{
if (ggComInstance == null){
ggComCreate = true;
ggComInstance = new (ggCom);
ggComCreate = false;
};
return (ggComInstance);
}
}
}//package com.nielsen
Section 6
//CHLogo (com.vidplayer.gui.maincontrols.CHLogo)
package com.vidplayer.gui.maincontrols {
import flash.display.*;
public dynamic class CHLogo extends MovieClip {
}
}//package com.vidplayer.gui.maincontrols
Section 7
//CHMainControls (com.vidplayer.gui.maincontrols.CHMainControls)
package com.vidplayer.gui.maincontrols {
import flash.display.*;
public class CHMainControls extends Controller {
public var toggleover:Boolean;// = false
private var logoshift:Number;// = 0
public function CHMainControls(_arg1:Stage, _arg2:String):void{
super(_arg1, _arg2);
}
override public function redraw(_arg1:Number, _arg2:Number, _arg3:int=0):void{
var tempw = _arg1;
var temph = _arg2;
var border = _arg3;
var pbw:Number = (playbarbg.width = (tempw - 20));
var pbh:Number = playbarbg.height;
y = (((temph - pbh) + border) + 1);
x = (((tempw - pbw) / 2) + border);
if (show_fullscreen){
var _local5 = fullscreenbutton;
with (_local5) {
visible = true;
x = (((pbw - width) - 5) - logoshift);
y = ((pbh - height) / 2);
};
volumecontrols.x = ((fullscreenbutton.x - volumecontrols.width) - 5);
} else {
fullscreenbutton.visible = false;
volumecontrols.x = (((pbw - volumecontrols.width) - 5) - logoshift);
};
volumecontrols.visible = (tempw > 240);
volumecontrols.y = ((pbh - volumecontrols.height) / 2);
_local5 = seekcontrols;
with (_local5) {
x = ((togglebutton.x + togglebutton.width) + 10);
seek_total.height = (pbh - 10);
y = Math.round(((pbh - seek_total.height) / 2));
};
if (tempw >= 240){
volumecontrols.visible = true;
seekcontrols.seek_total.width = ((volumecontrols.x - seekcontrols.x) - 15);
} else {
volumecontrols.visible = (fullscreenbutton.visible = false);
seekcontrols.seek_total.width = ((pbw - seekcontrols.x) - 15);
};
seekcontrols.redraw();
}
}
}//package com.vidplayer.gui.maincontrols
Section 8
//Controller (com.vidplayer.gui.maincontrols.Controller)
package com.vidplayer.gui.maincontrols {
import com.vidplayer.*;
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import com.vidplayer.vidstuff.*;
import flash.ui.*;
public class Controller extends Sprite {
public var togglebutton:ToggleButton;
public var keepon2:Boolean;// = false
public var idletime:int;// = 0
public var keepon:Boolean;// = false
public var fullscreenbutton:FullScreen;
public var seekcontrols:SeekControls;
public var prerollagain:Boolean;// = false
public var _root:BasePlayer;
public var keepbones:Boolean;// = false
public var lockmode:Boolean;// = false
public var volumecontrols;
public var idleTimer:Timer;
public var show_fullscreen:Boolean;
public var checkidle:Boolean;// = false
public var playbarbg:PlayBarBG;
public var vidshrunk:Boolean;// = false
public var _stage:Stage;
public function Controller(_arg1:Stage, _arg2:String, _arg3:Boolean=false):void{
var _local4:DisplayObject;
idleTimer = new Timer(1200, 1);
playbarbg = new PlayBarBG();
togglebutton = new ToggleButton();
seekcontrols = new SeekControls();
fullscreenbutton = new FullScreen();
super();
this.name = "controller";
buttonMode = true;
_stage = _arg1;
_root = BasePlayer(_stage.getChildAt(0));
if (!_arg3){
volumecontrols = new VolumeControls(_arg2);
for each (_local4 in [playbarbg, togglebutton, seekcontrols, volumecontrols, fullscreenbutton]) {
addChild(_local4);
};
};
lockmode = false;
idleTimer.addEventListener(TimerEvent.TIMER, idlecheck);
idleTimer.start();
this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
_stage.addChild(this);
}
public function changelockmode(_arg1:String):void{
if (_arg1 != "bones"){
lockmode = (togglebutton.lock1 = (seekcontrols.lock2 = (_arg1 == "true")));
} else {
keepbones = (lockmode = (seekcontrols.lock2 = true));
togglebutton.lock1 = false;
};
}
public function control_mUp(_arg1:Event):void{
if (visible){
idleTimer.reset();
idleTimer.start();
};
seekcontrols.mouseisup();
volumecontrols.mouseisup();
controls_to_stream("mouseisdown", "false");
}
public function fullscreenchanged():void{
if ((((_stage.displayState == "fullScreen")) || ((fullscreenbutton.currentFrame == 2)))){
if (_stage.displayState == "fullScreen"){
_root.ggEvent(10, [1]);
} else {
_root.ggEvent(10, [0]);
};
fullscreenbutton.toggle();
controls_to_stream("sendprogress");
redraw(_root.st_w, _root.st_h);
};
}
public function controls_to_video(_arg1:String, _arg2="none", _arg3:Boolean=false):void{
var _local4:String = (_arg3) ? "stream_ad" : "stream";
if (_stage.getChildByName(_local4)){
if (_arg2 == "none"){
var _local5 = BaseVideo(_stage.getChildByName(_local4));
_local5[_arg1]();
} else {
_local5 = BaseVideo(_stage.getChildByName(_local4));
_local5[_arg1](_arg2);
};
};
}
public function onAddedToStage(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
this.addEventListener(MouseEvent.CLICK, control_mClick);
this.addEventListener(MouseEvent.MOUSE_DOWN, control_mDown);
redraw(_root.st_w, _root.st_h);
}
public function controlforceshow():void{
if (((((((((_root.is_video_on) || (lockmode))) && (!(prerollagain)))) && (!(_root.is_preroll_on)))) && (!(vidshrunk)))){
Mouse.show();
this.visible = true;
if (((keepon) && ((fullscreenbutton.currentFrame == 2)))){
alpha = 0.7;
} else {
alpha = 1;
};
idleTimer.reset();
idleTimer.start();
if (_stage.getChildIndex(this) > 0){
_stage.setChildIndex(this, (_stage.numChildren - 1));
};
_root.shift_for_controls(((togglebutton.height * -1) - 1));
controls_to_video("logosynch", 4);
};
}
public function idlecheck(_arg1:TimerEvent):void{
if (((_root.is_video_on) || (_root.is_postroll_on))){
hide();
_root.hide_more();
};
}
public function toggle_vidshrunk(_arg1:String):void{
vidshrunk = ((_arg1)=="true") ? true : false;
}
public function showprerollagain(_arg1:Boolean):void{
prerollagain = _arg1;
}
public function control_mClick(_arg1:MouseEvent):void{
var event = _arg1;
switch (event.target){
case fullscreenbutton:
if (fullscreenbutton.currentFrame == 2){
_stage.displayState = "normal";
alpha = 1;
} else {
_stage.displayState = "fullScreen";
alpha = 0.7;
};
break;
case togglebutton:
var _local3 = togglebutton;
with (_local3) {
if (!lock1){
_root.dispatch_play_state(-1, false, true);
} else {
if (((_root.has_postroll) || (_root.postrollclass._is_playing))){
_root.postrollclass.postroll_toggle();
};
toggle(_root.postrollclass._is_playing);
};
};
break;
};
}
public function play_state(_arg1:Boolean):void{
if (_arg1){
keepon2 = false;
togglebutton.toggle(true);
} else {
togglebutton.toggle(false);
};
}
public function hide():void{
if (((!(keepon)) && (!(keepon2)))){
TweenLite.to(this, 0.4, {alpha:0, onComplete:controlforcehide});
controls_to_video("logosynch", 2);
_root.shift_for_controls(0);
};
}
public function control_mDown(_arg1:MouseEvent):void{
var event = _arg1;
if (visible){
idleTimer.reset();
};
if (((!(seekcontrols.lock2)) && ((event.target.parent == seekcontrols)))){
var _local3 = seekcontrols;
with (_local3) {
if (!downonme){
controls_to_stream("startseek");
};
downonme = true;
doubledown = true;
controls_to_stream("mouseisdown", "true");
if (event.target == timebubble){
timebubblexoffset = (mouseX - timebubble.x);
downonbubble = true;
} else {
downonbubble = false;
};
seekchange();
};
} else {
if ((((event.target.parent == volumecontrols)) || ((event.target == volumecontrols)))){
_local3 = volumecontrols;
with (_local3) {
downonme = true;
volchange();
};
};
};
}
public function vidshrink(_arg1:String):void{
if (_arg1 == "true"){
vidshrunk = true;
controlforcehide();
Mouse.show();
} else {
vidshrunk = false;
};
}
public function controlforcehide():void{
if (((vidshrunk) || ((((((((((((((((mouseX > 0)) && ((mouseX < _root.st_w)))) && ((mouseY > 0)))) && ((mouseY < _root.st_h)))) || (lockmode))) || (!(_root.is_video_on)))) && (!(keepon)))) && (!(keepon2)))))){
Mouse.hide();
this.visible = false;
alpha = 0;
_root.shift_for_controls(0);
controls_to_video("logosynch", 3);
};
}
public function redraw(_arg1:Number, _arg2:Number, _arg3:int=0):void{
}
public function showfullscreen(_arg1:Boolean):void{
show_fullscreen = _arg1;
redraw(_root.st_w, _root.st_h);
}
public function controls_to_stream(_arg1:String, _arg2="none", _arg3:Boolean=false):void{
var _local4:String = (_arg3) ? "stream_ad" : "stream";
if (_stage.getChildByName(_local4)){
if (_arg2 == "none"){
var _local5 = Stream(_stage.getChildByName(_local4));
_local5[_arg1]();
} else {
_local5 = Stream(_stage.getChildByName(_local4));
_local5[_arg1](_arg2);
};
};
}
public function show():void{
idleTimer.reset();
idleTimer.start();
idleTimer.start();
if (((((((_root.is_video_on) || (lockmode))) && (((!(visible)) || ((alpha < 0.95)))))) && (!(vidshrunk)))){
this.visible = true;
if (((keepon) && ((fullscreenbutton.currentFrame == 2)))){
TweenLite.to(this, 0.4, {alpha:0.7, onComplete:controlforceshow});
} else {
TweenLite.to(this, 0.4, {alpha:1, onComplete:controlforceshow});
};
_root.shift_for_controls(((togglebutton.height * -1) - 1));
controls_to_video("logosynch", 1);
};
}
}
}//package com.vidplayer.gui.maincontrols
Section 9
//FullScreen (com.vidplayer.gui.maincontrols.FullScreen)
package com.vidplayer.gui.maincontrols {
import flash.display.*;
public class FullScreen extends MovieClip {
public function FullScreen():void{
addFrameScript(0, frame1, 1, frame2);
}
public function toggle():void{
this.gotoAndStop(((this.currentFrame == 1)) ? 2 : 1);
}
function frame2(){
stop();
}
function frame1(){
stop();
}
}
}//package com.vidplayer.gui.maincontrols
Section 10
//PlayBarBG (com.vidplayer.gui.maincontrols.PlayBarBG)
package com.vidplayer.gui.maincontrols {
import flash.display.*;
public dynamic class PlayBarBG extends Sprite {
}
}//package com.vidplayer.gui.maincontrols
Section 11
//SeekControls (com.vidplayer.gui.maincontrols.SeekControls)
package com.vidplayer.gui.maincontrols {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.geom.*;
public class SeekControls extends Sprite {
public var date_concat:Boolean;// = false
public var the_ad_bar:Seek_Loaded;
public var downonbubble:Boolean;// = false
public var timebubblexoffset;// = 0
public var streamduration:Number;// = 0
public var downonme:Boolean;// = false
public var loadedpercent:Number;// = 0
public var downtimer:Timer;
public var seek_scrubber:Seek_Scrubber;
public var seek_loaded:Seek_Loaded;
public var lock2:Boolean;// = false
public var downtime:Number;// = 0
public var timebubble:TimeBubble;
public var doubledown:Boolean;// = false
public var progresspercent:Number;// = 0
public var progresstime:Number;// = 0
public var seek_total:Seek_Total;
public function SeekControls():void{
var _local1:DisplayObject;
seek_total = new Seek_Total();
seek_loaded = new Seek_Loaded();
seek_scrubber = new Seek_Scrubber();
timebubble = new TimeBubble();
downtimer = new Timer(80, 1);
the_ad_bar = new Seek_Loaded();
super();
for each (_local1 in [seek_total, seek_loaded, seek_scrubber, timebubble]) {
addChild(_local1);
};
timebubble.mouseChildren = false;
the_ad_bar.visible = false;
addChild(the_ad_bar);
}
public function onStreamLoading(_arg1:Number):void{
loadedpercent = _arg1;
seek_loaded.width = ((seek_total.width - 3.5) * _arg1);
}
public function video_forcefinish():void{
seek_scrubber.width = seek_loaded.width;
timebubbleupdate();
}
public function ad_bar(_arg1:Number):void{
var _local2:ColorTransform = new ColorTransform(1, 1, 1, 1, 128, 128, 128, 0);
the_ad_bar.width = 1;
the_ad_bar.height = seek_loaded.height;
the_ad_bar.x = (seek_total.x + (seek_total.width * _arg1));
the_ad_bar.y = seek_loaded.y;
the_ad_bar.transform.colorTransform = _local2;
the_ad_bar.visible = true;
}
public function onStreamProgress(_arg1:Array):void{
progresspercent = _arg1[1];
progresstime = _arg1[0];
seek_scrubber.width = (_arg1[1]) ? Math.round(((seek_total.width - 3.5) * progresspercent)) : 0;
timebubbleupdate();
}
public function seekagain(_arg1:TimerEvent):void{
downtimer.removeEventListener(TimerEvent.TIMER, seekagain);
downtimer.stop();
downtimer.reset();
seekchange();
}
public function timebubbleupdate():void{
var _local2 = timebubble;
with (_local2) {
x = (seek_scrubber.x + seek_scrubber.width);
timecode_txt.text = secondsToMinutes(progresstime);
if (date_concat){
timecode_txt.text = timecode_txt.text.substr(1, 4);
};
};
}
public function secondsToMinutes(_arg1){
if (!_arg1){
_arg1 = 0;
};
var _local2:* = Math.floor((_arg1 / 60));
_arg1 = Math.floor((_arg1 - (_local2 * 60)));
return (((((_local2 < 10)) ? ("0" + _local2) : _local2 + ":") + ((_arg1 < 10)) ? ("0" + _arg1) : _arg1));
}
public function mouseisup():void{
var _local1:Boolean;
if (((downonme) && (!(lock2)))){
_local1 = (((seek_scrubber.width / seek_loaded.width))>0.99) ? true : false;
Controller(this.parent).controls_to_video("video_stopseek", _local1);
downonbubble = false;
};
downonme = false;
}
public function onStreamMetaData(_arg1):void{
streamduration = _arg1.duration;
}
public function reset_playbar():void{
seek_scrubber.width = 1;
progresstime = 0;
timebubbleupdate();
}
public function seekchange():void{
var newseek:Number;
var tempdur:Number;
if (((downonme) && (!(lock2)))){
newseek = 0;
if (downonbubble){
seek_scrubber.width = Math.max(Math.min(((mouseX - timebubblexoffset) - 2), seek_loaded.width), 0);
} else {
seek_scrubber.width = Math.max(Math.min((mouseX - 2), seek_loaded.width), 0);
};
if (seek_scrubber.width <= 3.5){
seek_scrubber.width = 1;
};
tempdur = streamduration;
try {
var _local2 = Controller(this.parent)._root;
with (_local2) {
tempdur = (is_postroll_on) ? postrollclass.duration : mainvid.duration;
};
} catch(e:Error) {
};
progresstime = ((seek_scrubber.width / (seek_total.width - 5)) * tempdur);
timebubbleupdate();
newseek = ((seek_scrubber.width - 1) / (seek_total.width - 5));
Controller(this.parent).controls_to_video("video_seek", newseek, Controller(this.parent)._root.is_postroll_on);
if (seek_scrubber.width >= seek_loaded.width){
mouseisup();
Controller(this.parent).controls_to_stream("forcefinish", "none", Controller(this.parent)._root.is_postroll_on);
video_forcefinish();
};
};
}
public function redraw():void{
var _local2 = seek_loaded;
with (_local2) {
height = (seek_scrubber.height = (seek_total.height - 3.5));
y = (seek_scrubber.y = (((seek_total.height - height) / 2) + 0.5));
x = (seek_scrubber.x = 2);
width = Math.max(Math.round((loadedpercent * (seek_total.width - 3.5))), 1);
};
seek_scrubber.width = Math.round((progresspercent * (seek_total.width - 3.5)));
timebubble.y = seek_scrubber.y;
timebubbleupdate();
}
}
}//package com.vidplayer.gui.maincontrols
Section 12
//SloMoControls (com.vidplayer.gui.maincontrols.SloMoControls)
package com.vidplayer.gui.maincontrols {
import flash.display.*;
public dynamic class SloMoControls extends MovieClip {
}
}//package com.vidplayer.gui.maincontrols
Section 13
//TBTMainControls (com.vidplayer.gui.maincontrols.TBTMainControls)
package com.vidplayer.gui.maincontrols {
import flash.display.*;
import fl.motion.*;
public class TBTMainControls extends Controller {
public var c:Color;
private var logoshift:Number;// = 0
public function TBTMainControls(_arg1:Stage, _arg2:String):void{
c = new Color();
super(_arg1, _arg2);
seekcontrols.date_concat = true;
}
public function changecolor(_arg1:Number):void{
var _local2:DisplayObject;
c.setTint(_arg1, 1);
for each (_local2 in [togglebutton.vidplayshape, togglebutton.vidpauseshape, volumecontrols.volume_needle.volneedlebg, seekcontrols.seek_scrubber]) {
_local2.transform.colorTransform = c;
};
}
override public function redraw(_arg1:Number, _arg2:Number, _arg3:int=0):void{
var pbw:Number;
var tempw = _arg1;
var temph = _arg2;
var border = _arg3;
pbw = (playbarbg.width = ((tempw - 40) - togglebutton.width));
var pbh:Number = playbarbg.height;
y = ((temph - pbh) - 20);
x = (((tempw - pbw) - togglebutton.width) / 2);
var _local5 = togglebutton;
with (_local5) {
y = (pbh - height);
playbarbg.x = (x + width);
volumecontrols.x = ((((pbw + width) - volumecontrols.width) - 8) - logoshift);
};
_local5 = fullscreenbutton;
with (_local5) {
x = (((volumecontrols.x - width) - 10) - logoshift);
y = ((pbh - height) / 2);
};
volumecontrols.visible = (tempw > 240);
volumecontrols.y = ((pbh - volumecontrols.height) / 2);
if (tempw >= 240){
volumecontrols.visible = true;
fullscreenbutton.visible = show_fullscreen;
seekcontrols.seek_total.width = ((volumecontrols.x - seekcontrols.x) - 15);
} else {
volumecontrols.visible = (fullscreenbutton.visible = false);
seekcontrols.seek_total.width = ((pbw - seekcontrols.x) - 15);
};
_local5 = seekcontrols;
with (_local5) {
x = ((togglebutton.x + togglebutton.width) + 13);
y = ((pbh - seek_total.height) / 2);
seek_total.width = (seek_total.width - (fullscreenbutton.visible) ? 25 : 5);
seek_total.height = (pbh - 10);
redraw();
};
}
}
}//package com.vidplayer.gui.maincontrols
Section 14
//ToggleButton (com.vidplayer.gui.maincontrols.ToggleButton)
package com.vidplayer.gui.maincontrols {
import flash.display.*;
public class ToggleButton extends Sprite {
public var vidplayshape:MovieClip;
public var lock1:Boolean;// = false
public var vidpauseshape:MovieClip;
public function ToggleButton():void{
mouseChildren = false;
this.toggle(true);
}
public function toggle(_arg1:Boolean=false):void{
vidplayshape.visible = !(_arg1);
vidpauseshape.visible = _arg1;
}
}
}//package com.vidplayer.gui.maincontrols
Section 15
//VolumeControls (com.vidplayer.gui.maincontrols.VolumeControls)
package com.vidplayer.gui.maincontrols {
import flash.display.*;
import com.vidplayer.utilities.loader.*;
import flash.external.*;
public class VolumeControls extends Sprite {
public var volume_scale:Volume_Scale;
public var volume_bg:Shape;
public var muted:Boolean;// = false
public var volerrorsent:Boolean;// = false
public var volume_needle:Volume_Needle;
public var downonme:Boolean;// = false
public var mainserver:String;// = "www.collegehumor.com"
public function VolumeControls(_arg1:String):void{
var d_o:DisplayObject;
var mainserv = _arg1;
volume_scale = new Volume_Scale();
volume_needle = new Volume_Needle();
volume_bg = new Shape();
super();
mainserver = mainserv;
var _local3 = volume_bg.graphics;
with (_local3) {
beginFill(0, 0);
drawRect(0, 0, volume_scale.width, volume_needle.height);
endFill();
};
for each (d_o in [volume_bg, volume_scale, volume_needle]) {
addChild(d_o);
};
volume_needle.mouseChildren = false;
volume_scale.y = ((volume_bg.height - volume_scale.height) / 2);
}
public function sendnewvolume(_arg1:Number):void{
var vol = _arg1;
var request = "";
var loader:GCSafeURLLoader = new GCSafeURLLoader();
var _local3 = loader;
with (_local3) {
try {
if (Controller(parent)._root.jQuery_branch){
request = ExternalInterface.call("jument.cookie.set", "moogaloop_volume", vol);
} else {
request = ExternalInterface.call("createCookie", "moogaloop_volume", vol, 90);
};
} catch(e:Error) {
};
};
}
public function mouseisup():void{
var _local1:uint;
if (downonme){
_local1 = Math.round(((volume_needle.x / volume_bg.width) * 100));
sendnewvolume(_local1);
downonme = false;
Controller(this.parent)._root.ggEvent(11, [_local1]);
};
}
public function volchange():void{
var _local1:uint;
if (downonme){
volume_needle.x = Math.max(Math.min(mouseX, (volume_bg.width - (volume_needle.width / 2))), (volume_bg.x + (volume_needle.width / 2)));
_local1 = (Math.round(((volume_needle.x / (volume_bg.width - volume_needle.width)) * 100)) - 14);
Controller(this.parent).controls_to_video("volume_adjusted", _local1);
};
}
public function volset(_arg1:Number){
volume_needle.x = ((_arg1 / 100) * volume_bg.width);
}
}
}//package com.vidplayer.gui.maincontrols
Section 16
//OutroButtonTBT (com.vidplayer.gui.outro.OutroButtonTBT)
package com.vidplayer.gui.outro {
import flash.text.*;
import flash.display.*;
public class OutroButtonTBT extends MovieClip {
public var label:TextField;
public var BGBox:MovieClip;
public function OutroButtonTBT():void{
addFrameScript(0, frame1);
buttonMode = true;
mouseChildren = false;
}
function frame1(){
stop();
}
}
}//package com.vidplayer.gui.outro
Section 17
//OutroInputBox (com.vidplayer.gui.outro.OutroInputBox)
package com.vidplayer.gui.outro {
import flash.text.*;
import flash.events.*;
import flash.display.*;
public class OutroInputBox extends MovieClip {
private var tfc:TextFieldColor;
public var label:TextField;
public var bgbox:MovieClip;
public var input:TextField;
public function OutroInputBox(_arg1:Boolean=true):void{
tfc = new TextFieldColor(input);
tfc.selectionColor = 10938367;
if (_arg1){
input.addEventListener(MouseEvent.CLICK, focus_on);
input.addEventListener(TextEvent.TEXT_INPUT, highlight_input);
};
}
public function focus_on(_arg1:MouseEvent):void{
var event = _arg1;
var _local3 = input;
with (_local3) {
addEventListener(FocusEvent.FOCUS_OUT, focus_off);
removeEventListener(MouseEvent.CLICK, focus_on);
};
input.stage.focus = input;
input.setSelection(0, input.length);
}
public function highlight_input(_arg1:TextEvent):void{
_arg1.preventDefault();
}
public function focus_off(_arg1:FocusEvent):void{
var event = _arg1;
var _local3 = input;
with (_local3) {
removeEventListener(FocusEvent.FOCUS_OUT, focus_off);
addEventListener(MouseEvent.CLICK, focus_on);
setSelection(0, 0);
};
}
}
}//package com.vidplayer.gui.outro
Section 18
//OutroLogo (com.vidplayer.gui.outro.OutroLogo)
package com.vidplayer.gui.outro {
import flash.display.*;
public dynamic class OutroLogo extends MovieClip {
}
}//package com.vidplayer.gui.outro
Section 19
//OutroTBT (com.vidplayer.gui.outro.OutroTBT)
package com.vidplayer.gui.outro {
import flash.text.*;
import com.vidplayer.*;
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import com.vidplayer.utilities.*;
import com.vidplayer.utilities.loader.*;
import com.vidplayer.gui.maincontrols.*;
import com.vidplayer.vidstuff.*;
public class OutroTBT extends Sprite {
private var load_and_carousel:Boolean;// = true
private var sharelist:Array;
private var sharebtns:Array;
public var prevloader:GCSafeURLLoader;
private var vid_id:String;
private var preload:int;// = 5
private var bgboxes;
public var prevarch:Boolean;// = false
private var shiftdown:Number;// = 0
private var bgboxL:VidStripSide;
public var strip_overlay:Shape;
private var bgboxR:VidStripSide;
public var id_min:int;// = 100000
private var trigger:Boolean;// = false
private var mainserver:String;// = "www.todaysbigthing.com"
public var bgcolor:Number;// = 2987963
public var id_max:int;// = 0
public var _root:Moogaloop;
public var nextarch:Boolean;// = false
public var pausecontrols_on:Boolean;// = false
private var numrecs:uint;
public var vid_strip:VidStripTBT;
public var labelformat:TextFormat;
public var isembed:Boolean;// = false
public var share_overlay:ShareOverlay;
private var xml_config:XML;
private var vidrecs:Array;
private var middlevidindex:int;// = 0
private var redraw_timer:Timer;
private var _stage:Stage;
public function OutroTBT(_arg1:Stage, _arg2:XML, _arg3:String, _arg4:String):void{
vid_strip = new VidStripTBT();
share_overlay = new ShareOverlay();
vidrecs = new Array();
sharebtns = new Array();
bgboxes = new Array();
bgboxL = new VidStripSide();
bgboxR = new VidStripSide();
redraw_timer = new Timer(100, 5);
strip_overlay = new Shape();
labelformat = new TextFormat();
prevloader = new GCSafeURLLoader();
super();
_stage = _arg1;
_root = Moogaloop(_stage.getChildAt(0));
isembed = (BasePlayer.playertype == "embed");
xml_config = _arg2;
vid_id = _arg3;
mainserver = _arg4;
addEventListener(Event.ADDED_TO_STAGE, onAddedtoStage);
_stage.addChild(this);
}
public function redraw(_arg1:Number, _arg2:Number):void{
var tempheight:*;
var stw = _arg1;
var sth = _arg2;
var vidratio:Number = (4 / 3);
var _local4 = vid_strip;
with (_local4) {
if (stw > ((sth - shiftdown) * vidratio)){
width = ((sth - shiftdown) * vidratio);
height = (sth - shiftdown);
} else {
width = stw;
height = (stw / vidratio);
};
if (isembed){
width = stw;
};
x = ((stw - width) / 2);
y = (shiftdown + (((sth - shiftdown) - height) / 2));
if (BaseVideo(_stage.getChildByName("stream"))){
BaseVideo(_stage.getChildByName("stream")).shrunkvidx(VidStripBG.width, VidStripBG.height);
};
};
_local4 = share_overlay;
with (_local4) {
var _local5 = bigBG;
with (_local5) {
width = 480;
height = 360;
x = (littleBG.x - 38);
y = (littleBG.y - 28);
};
width = vid_strip.width;
height = vid_strip.height;
x = vid_strip.x;
y = vid_strip.y;
bigBG.width = (bigBG.width * (stw / vid_strip.width));
tempheight = ((bigBG.height * shiftdown) / vid_strip.height);
bigBG.height = (bigBG.height * (sth / vid_strip.height));
bigBG.x = (littleBG.x + ((littleBG.width - bigBG.width) / 2));
bigBG.y = ((littleBG.y + ((littleBG.height - bigBG.height) / 2)) - (tempheight / 2));
};
if (isembed){
redraw_bgboxes(stw, sth);
};
redraw_recommend();
}
public function CloseClick(_arg1:MouseEvent){
share_overlay.visible = false;
}
public function shiftdownforbanner(_arg1:Number):void{
shiftdown = _arg1;
redraw(_root.st_w, _root.st_h);
var _local2:* = 0;
while (_local2 < vidrecs.length) {
vidrecs[_local2].redraw_box(vidrecs[_local2].width);
_local2++;
};
}
public function goto_site(_arg1:String, _arg2:Boolean=false):void{
Schmoozy.gotosite(_arg1, _arg2);
}
public function redraw_sharelist():void{
sharebtns[0].x = (sharebtns[1].x = 55);
sharebtns[0].y = (sharebtns[2].y = 261.5);
sharebtns[2].x = (sharebtns[3].x = 293);
sharebtns[1].y = (sharebtns[3].y = 291.5);
}
public function ShareClick(_arg1:MouseEvent){
_stage.setChildIndex(share_overlay, (_stage.numChildren - 1));
share_overlay.visible = true;
}
public function vidrecsfromxml():void{
var k:int;
var prevxml:*;
var tcolor:*;
numrecs = 1;
middlevidindex = 0;
if (xml_config != "BIG Thing could not be found."){
vidrecs[0] = new RecommendVidTBT(xml_config, true, bgcolor, 0, this);
};
var oldest_ever:Boolean;
var _local2 = vid_strip;
with (_local2) {
for each (prevxml in xml_config.prev_item) {
if ((((prevxml == "End of Video List")) || ((int(prevxml.item_id) == 0)))){
oldest_ever = true;
} else {
vidrecs[vidrecs.length] = new RecommendVidTBT(prevxml, false, bgcolor, vidrecs.length, this);
};
};
};
k = 0;
while (k < vidrecs.length) {
addChild(vidrecs[k]);
vidrecs[k].sharebtn.addEventListener(MouseEvent.CLICK, ShareClick);
k = (k + 1);
};
k = 0;
while (k < 2) {
bgboxes[k] = new Shape();
_local2 = bgboxes[k].graphics;
with (_local2) {
if (isembed){
tcolor = 0;
beginFill(tcolor, 1);
} else {
beginFill(bgcolor, 0);
};
drawRect(0, 0, 1, 1);
endFill();
};
addChild(bgboxes[k]);
k = (k + 1);
};
if (!isembed){
bgboxL.alpha = (bgboxR.alpha = 0);
};
addChild(bgboxL);
addChild(bgboxR);
}
public function onAddedtoStage(_arg1:Event):void{
var tempcolor:Number;
var e = _arg1;
if (!isembed){
tempcolor = _root.bgcolor;
bgcolor = ((tempcolor)>0) ? tempcolor : bgcolor;
var _local3 = strip_overlay.graphics;
with (_local3) {
beginFill(bgcolor, 1);
drawRect(0, 0, vid_strip.VidStripBG.width, vid_strip.VidStripBG.height);
endFill();
};
_local3 = vid_strip.VidStripBG;
with (_local3) {
addChild(strip_overlay);
};
};
addChild(vid_strip);
vidrecsfromxml();
labelformat.letterSpacing = 0.8;
_local3 = share_overlay;
with (_local3) {
embede.label.text = "Embed Code";
embedl.label.text = "Link URL";
embede.label.setTextFormat(labelformat);
embedl.label.setTextFormat(labelformat);
embede.input.text = (xml_config.embed_code) ? xml_config.embed_code : "";
};
var tempstr:String = String(xml_config.embed_code);
while (tempstr.indexOf("\n") != -1) {
tempstr = tempstr.replace("\n", "");
};
while (tempstr.indexOf("\r") != -1) {
tempstr = tempstr.replace("\r", "");
};
while (tempstr.indexOf("\t") != -1) {
tempstr = tempstr.replace("\t", "");
};
_local3 = share_overlay;
with (_local3) {
embede.input.text = tempstr;
embedl.input.text = (xml_config.url) ? xml_config.url : "";
var _local4 = close_btn;
with (_local4) {
buttonMode = true;
addEventListener(MouseEvent.CLICK, CloseClick);
};
};
loadsharelist(xml_config.title);
fillsharebuttons();
share_overlay.visible = false;
_stage.addChild(share_overlay);
share_overlay.name = "overlay";
redraw(_root.st_w, _root.st_h);
}
public function fillsharebuttons():void{
var _local1:*;
for (_local1 in sharelist) {
sharebtns[_local1] = new ShareButtonTBT(_stage, sharelist[_local1]);
share_overlay.addChild(sharebtns[_local1]);
};
redraw_sharelist();
}
public function play_state(_arg1:Boolean){
if (_arg1){
visible = false;
} else {
redraw(_root.st_w, _root.st_h);
};
}
public function redraw_bgboxes(_arg1:Number, _arg2:Number):void{
var _local3:DisplayObject;
if (isembed){
for each (_local3 in [bgboxes[0], bgboxes[1], bgboxR, bgboxL]) {
setChildIndex(_local3, (numChildren - 1));
};
bgboxL.width = (bgboxR.width = (vid_strip.x + 1));
bgboxL.height = (bgboxR.height = (_arg2 + 1));
bgboxR.x = ((vid_strip.x + vid_strip.width) - 0.5);
bgboxes[0].width = (bgboxes[1].width = (_arg1 + 1));
bgboxes[0].height = (bgboxes[1].height = (vid_strip.y + 1));
bgboxes[1].y = ((vid_strip.y + vid_strip.height) - 0.5);
};
}
public function loadsharelist(_arg1:String):void{
var _local2:String = Schmoozy.gotourl;
sharelist = [["Facebook", ("http://www.facebook.com/share.php?u=" + _local2)], ["Digg", (((("http://digg.com/submit?url=" + _local2) + "&title=") + encodeURIComponent(_arg1)) + "&media=video&topic=comedy")], ["StumbleUpon", ((("http://www.stumbleupon.com/submit?url=" + _local2) + "&title=") + encodeURIComponent(_arg1))], ["MySpace", "http://www.myspace.com/index.cfm", "postto", _arg1, xml_config.embed_code, "", 7]];
}
public function video_pressed():void{
var _local2 = _root;
with (_local2) {
video_on();
dispatch_play_state(1);
};
if (Controller(_stage.getChildByName("controller"))){
Controller(_stage.getChildByName("controller")).seekcontrols.reset_playbar();
};
}
public function redraw_recommend():void{
var beginx:Number = vid_strip.x;
var beginy:Number = vid_strip.y;
var beginw:Number = vid_strip.width;
var beginh:Number = vid_strip.height;
var i:int;
while (i < vidrecs.length) {
var _local2 = vidrecs[i];
with (_local2) {
if (order == 0){
BGBox.width = (beginw * 0.3);
BGBox.height = beginh;
x = beginx;
y = beginy;
alpha = 1;
emphasize(true, width);
vid_strip.alpha = 0.05;
divider.width = BGBox.width;
divider.height = BGBox.height;
divider.alpha = 1;
BGBox.alpha = 0.1;
} else {
width = (((beginw * 123) / 180) * overwidth());
height = (((beginh * 44) / 180) * overheight());
x = (beginx + ((beginw * 37) / 120));
y = (beginy + ((beginh * (1 + (59.5 * (vidrecs[i].order - 1)))) / 240));
emphasize(false, width);
};
};
vidrecs[i].redraw_box(vidrecs[i].width);
i = (i + 1);
};
if (_root.mainvid){
_local2 = vidrecs[0].recothumb;
with (_local2) {
_root.mainvid.tbt_shrinkdims = [(x + (width / 2)), (y + (height / 2)), 0, 0];
};
};
}
}
}//package com.vidplayer.gui.outro
Section 20
//OutroToggleButton (com.vidplayer.gui.outro.OutroToggleButton)
package com.vidplayer.gui.outro {
import flash.text.*;
import flash.display.*;
public class OutroToggleButton extends MovieClip {
public var boxbg:MovieClip;
public var replayshape:MovieClip;
public var newplayshape:MovieClip;
public var buttontext:TextField;
public function OutroToggleButton():void{
addFrameScript(0, frame1);
buttonMode = true;
}
function frame1(){
stop();
}
}
}//package com.vidplayer.gui.outro
Section 21
//RecommendVidTBT (com.vidplayer.gui.outro.RecommendVidTBT)
package com.vidplayer.gui.outro {
import flash.text.*;
import flash.events.*;
import flash.display.*;
import fl.motion.*;
import flash.filters.*;
import com.vidplayer.utilities.*;
import com.vidplayer.utilities.loader.*;
public class RecommendVidTBT extends MovieClip {
public var recomonth:TextField;
public var outro_toggle:OutroToggleButton;
public var divider:MovieClip;
public var sharebtn:OutroButtonTBT;
private var fulldesc:String;// = ""
private var themonths:Array;
public var thisvid_id:int;// = 0
private var fulltitle:String;// = ""
public var nothumb:Boolean;// = false
public var lastinqueue:Boolean;// = false
public var recoXML:XML;
public var bgcolor:Number;// = 1667209
public var BGBox:MovieClip;
private var _parent:OutroTBT;
public var ismainvid:Boolean;// = false
private var titleformat:TextFormat;
public var order:int;// = 0
public var textcolor:Number;// = 1667209
public var recothumb:GCSafeLoader;
public var recotitle:TextField;
public var archivebtn:MovieClip;
public var recoday:TextField;
public var clickable:Boolean;// = true
public var c:Color;
private var didntload:Boolean;// = false
public var yellowcolor:Number;// = 0
private var thumbnum:Number;// = 1
private var isembed:Boolean;// = false
private var error_nothumb:Boolean;// = false
public function RecommendVidTBT(_arg1:XML, _arg2:Boolean, _arg3:Number, _arg4:int, _arg5:OutroTBT):void{
var the_XML = _arg1;
var ismain = _arg2;
var $bgcolor = _arg3;
var $order = _arg4;
var $parent = _arg5;
outro_toggle = new OutroToggleButton();
recothumb = new GCSafeLoader();
titleformat = new TextFormat();
themonths = ["JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"];
c = new Color();
super();
recoXML = the_XML;
addChild(outro_toggle);
ismainvid = ismain;
order = $order;
outro_toggle.alpha = 0.9;
_parent = $parent;
BGBox.alpha = 0;
BGBox.width = 440;
c.setTint($bgcolor, 1);
recomonth.alpha = (recoday.alpha = 2);
if (!ismain){
outro_toggle.removeChild(outro_toggle.buttontext);
buttonMode = true;
mouseChildren = false;
outro_toggle.replayshape.visible = false;
this.addEventListener(MouseEvent.CLICK, ViewReco);
this.addEventListener(MouseEvent.ROLL_OVER, RollOver);
archivebtn.visible = false;
} else {
BGBox.alpha = 0.8;
buttonMode = false;
outro_toggle.newplayshape.visible = false;
outro_toggle.addEventListener(MouseEvent.CLICK, onToggleClick);
outro_toggle.mouseChildren = (archivebtn.mouseChildren = (sharebtn.mouseChildren = false));
outro_toggle.buttonMode = (archivebtn.buttonMode = (sharebtn.buttonMode = true));
recothumb.addEventListener(MouseEvent.CLICK, onToggleClick);
recomonth.visible = (recoday.visible = (recotitle.visible = false));
outro_toggle.addEventListener(MouseEvent.ROLL_OVER, RollOver);
sharebtn.addEventListener(MouseEvent.ROLL_OVER, RollOver);
archivebtn.addEventListener(MouseEvent.ROLL_OVER, RollOver);
archivebtn.addEventListener(MouseEvent.CLICK, onArchiveClick);
outro_toggle.alpha = (sharebtn.alpha = (archivebtn.alpha = 0.9));
this.outro_toggle.filters = (recothumb.filters = (sharebtn.filters = [new DropShadowFilter(1, 135, 0, 0.2, 4, 4, 2, 2)]));
archivebtn.filters = [new DropShadowFilter(1, 0, 0, 0.2, 2, 2, 2, 2)];
};
var _local7 = outro_toggle;
with (_local7) {
if (replayshape){
replayshape.transform.colorTransform = c;
};
if (newplayshape){
newplayshape.transform.colorTransform = c;
};
};
if (ismain){
divider.transform.colorTransform = c;
};
bgcolor = dividecolor($bgcolor, 0.9);
textcolor = dividecolor($bgcolor);
if ($bgcolor == 15787315){
yellowcolor = 0;
};
trickleXML();
}
public function dividecolor(_arg1:Number, _arg2:Number=0.558):Number{
var _local3:Number = (_arg1 >> 16);
var _local4:Number = (_arg1 ^ (_local3 << 16));
var _local5:Number = (_local4 >> 8);
var _local6:Number = (_local4 ^ (_local5 << 8));
_local3 = (_local3 * _arg2);
_local5 = (_local5 * _arg2);
_local6 = (_local6 * _arg2);
_arg1 = (((_local3 << 16) ^ (_local5 << 8)) ^ _local6);
return (_arg1);
}
public function RollOver(_arg1:MouseEvent):void{
_arg1.target.addEventListener(MouseEvent.ROLL_OUT, RollOut);
if (ismainvid){
_arg1.target.alpha = 1;
} else {
BGBox.alpha = 0.14;
};
}
public function unload_thumb():void{
recothumb.unload();
nothumb = true;
}
public function loadRecoThumbError(){
nothumb = true;
if (!didntload){
_parent._root.debug(("Couldn't load thumb for recommended video #" + String(order)), 16777096);
};
}
public function redraw_box(_arg1:Number):void{
var recow:Number;
var recox:Number;
var recoy:Number;
var tempw = _arg1;
var shiftdown:int;
try {
shiftdown = (_parent.isembed) ? 30 : 0;
} catch(e:Error) {
};
if (!ismainvid){
outro_toggle.buttontext.visible = false;
BGBox.height = ((128 * (360 - shiftdown)) / 360);
recotitle.autoSize = "left";
outro_toggle.visible = false;
outro_toggle.height = ((BGBox.height * 56) / 128);
outro_toggle.width = ((BGBox.width * 70) / 440);
if (order == 0){
sharebtn.height = 18.8;
sharebtn.width = 66;
} else {
sharebtn.height = 28.2;
sharebtn.width = 99;
};
if (((recothumb) && (!(nothumb)))){
recothumb.x = 115;
recothumb.height = (BGBox.height - 15);
recothumb.width = ((recothumb.height * 96) / 75);
recothumb.y = ((BGBox.height - recothumb.height) / 2);
recotitle.x = (sharebtn.x = ((recothumb.x + recothumb.width) + 16));
recotitle.y = (recothumb.y + 15);
outro_toggle.x = (recothumb.x + ((recothumb.width - outro_toggle.width) / 2));
outro_toggle.y = (recothumb.y + ((recothumb.height - outro_toggle.height) / 2));
recomonth.y = (BGBox.y + 16);
recoday.y = (((recothumb.y + recothumb.height) - recoday.height) + 18);
} else {
recotitle.x = (sharebtn.x = 195);
recotitle.y = 13;
outro_toggle.x = 120;
outro_toggle.y = ((BGBox.height / 2) - 35);
recomonth.y = (BGBox.y + 16);
recoday.y = (BGBox.y + 45);
};
recotitle.text = fulltitle;
var _local3 = titleformat;
with (_local3) {
size = 18;
bold = true;
color = 0xDDDDDD;
};
recotitle.setTextFormat(titleformat);
_local3 = titleformat;
with (_local3) {
color = 0;
size = 14;
bold = false;
};
recotitle.autoSize = "left";
recotitle.width = ((BGBox.width - recotitle.x) - 20);
while (recotitle.numLines > 4) {
recotitle.text = (recotitle.text.substr(0, (recotitle.text.length - 5)) + "...");
_local3 = titleformat;
with (_local3) {
color = yellowcolor;
size = 14;
bold = true;
};
recotitle.setTextFormat(titleformat);
};
recotitle.width = (recotitle.width + 10);
} else {
if (((recothumb) && (!(nothumb)))){
_local3 = recothumb;
with (_local3) {
width = (BGBox.width - 20);
height = ((width * 75) / 110);
x = 10;
y = ((BGBox.height - height) / 20);
recotitle.x = (sharebtn.x = ((x + width) + 8));
recotitle.y = (y - 5);
};
};
recow = recothumb.width;
recox = recothumb.x;
recoy = recothumb.y;
if (recow == 0){
recow = (BGBox.width - 20);
recox = 10;
};
_local3 = outro_toggle;
with (_local3) {
width = Math.min((recow - 20), 120);
height = (width / 3);
boxbg.width = 170;
buttontext.visible = true;
x = (recox + ((recow - width) / 2));
y = ((recoy + recothumb.height) + 15);
};
_local3 = sharebtn;
with (_local3) {
width = (outro_toggle.width - 18);
height = ((outro_toggle.width * 32) / 150);
x = (recox + ((recow - width) / 2));
y = ((outro_toggle.y + outro_toggle.height) + 13);
};
_local3 = archivebtn;
with (_local3) {
width = this.BGBox.width;
height = ((width * 36) / 265);
y = (this.BGBox.height - height);
x = 0;
};
};
}
public function parsemonth(_arg1:Number):String{
return (themonths[(_arg1 - 1)]);
}
public function onToggleClick(_arg1:MouseEvent):void{
if (_parent.isembed){
_parent.goto_site("vidurl");
} else {
_parent.video_pressed();
};
}
public function emphasize(_arg1:Boolean, _arg2:Number, _arg3:Boolean=false):void{
isembed = _parent.isembed;
if (_arg3){
_arg2 = (_arg2 * overwidth());
};
if (ismainvid){
recothumb.alpha = 1;
titleformat.color = 0;
sharebtn.height = 18.8;
sharebtn.width = 66;
sharebtn.visible = (isembed) ? true : false;
} else {
sharebtn.height = 28.2;
sharebtn.width = 99;
recothumb.alpha = 2;
titleformat.color = bgcolor;
sharebtn.visible = ismainvid;
sharebtn.alpha = 1;
titleformat.bold = true;
titleformat.size = 30;
recomonth.setTextFormat(titleformat);
titleformat.size = 60;
recoday.setTextFormat(titleformat);
recotitle.setTextFormat(titleformat);
divider.visible = ((order)>1) ? true : false;
};
redraw_box(_arg2);
}
public function loadRecoThumbComplete(){
addChild(recothumb);
if (ismainvid){
recothumb.addEventListener(MouseEvent.CLICK, onToggleClick);
};
setChildIndex(outro_toggle, (numChildren - 1));
redraw_box(width);
}
public function ViewReco(_arg1:MouseEvent):void{
var _local2:Boolean;
_local2 = !(_parent.isembed);
_parent.goto_site(recoXML.url, _local2);
}
public function loadRecoThumb(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, loadRecoThumb);
var _local2:String = String(recoXML.thumbnail);
if ((((_local2.indexOf("png") > -1)) || ((_local2.indexOf("jpg") > -1)))){
recothumb.loadthis(recoXML.thumbnail, loadRecoThumbComplete, loadRecoThumbError);
} else {
nothumb = true;
if (!didntload){
_parent._root.debug(("Couldn't load thumb for recommended video #" + String(order)), 16777096);
};
};
}
public function trickleXML():void{
if (ismainvid){
thisvid_id = (recoXML.item_id) ? recoXML.item_id : 0;
} else {
thisvid_id = (recoXML.id) ? recoXML.id : 0;
};
recotitle.text = (recoXML.title) ? recoXML.title : " ";
if (recoXML.title == " "){
_parent._root.debug(("Couldn't load XML for recommended video #" + String(order)), 16777096);
didntload = true;
};
fulltitle = recotitle.text;
var _local1:String = String(recoXML.date);
var _local2:Array = ((_local1)!="") ? _local1.split("-") : [" ", " ", " "];
recomonth.text = ((_local1)!="") ? parsemonth(_local2[1]) : " ";
recoday.text = ((_local1)!="") ? _local2[2].substr(0, 2) : " ";
recotitle.autoSize = "left";
titleformat.size = 18;
titleformat.color = 0;
titleformat.bold = true;
recotitle.setTextFormat(titleformat);
titleformat.size = 80;
recoday.setTextFormat(titleformat);
titleformat.size = 40;
recomonth.setTextFormat(titleformat);
this.addEventListener(Event.ADDED_TO_STAGE, loadRecoThumb);
}
public function onArchiveClick(_arg1:MouseEvent):void{
var _local2:String = (isembed) ? "www.todaysbigthing.com" : _parent._root.SERVER;
Schmoozy.gotosite((("http://" + _local2) + "/archive"), (isembed) ? false : true);
}
public function RollOut(_arg1:MouseEvent):void{
_arg1.target.removeEventListener(MouseEvent.ROLL_OUT, RollOut);
if (ismainvid){
_arg1.target.alpha = 0.9;
} else {
BGBox.alpha = 0;
};
}
public function overwidth():Number{
return (((Math.max((BGBox.x + BGBox.width), (sharebtn.x + sharebtn.width), (recothumb.x + recothumb.width), (recomonth.x + recomonth.width), (recoday.x + recoday.width), (recotitle.x + recotitle.width)) - Math.min(BGBox.x, sharebtn.x, recothumb.x, recomonth.x, recoday.x, recotitle.x)) / BGBox.width));
}
public function overheight():Number{
return (((Math.max((BGBox.y + BGBox.height), (sharebtn.y + sharebtn.height), (recothumb.y + recothumb.height), (recomonth.y + recomonth.height), (recoday.y + recoday.height), (recotitle.y + recotitle.height)) - Math.min(BGBox.y, sharebtn.y, recothumb.y, recomonth.y, recoday.y, recotitle.y)) / BGBox.height));
}
}
}//package com.vidplayer.gui.outro
Section 22
//ShareButton (com.vidplayer.gui.outro.ShareButton)
package com.vidplayer.gui.outro {
import flash.text.*;
import com.vidplayer.*;
import flash.events.*;
import flash.display.*;
import com.vidplayer.utilities.*;
public class ShareButton extends MovieClip {
public var _root:Moogaloop;
private var thelabel:String;
private var theurl:String;
public var bgbox:MovieClip;
public var info:Array;
public var titleformat:TextFormat;
public var label:TextField;
public var icon:MovieClip;
public var _stage:Stage;
public function ShareButton(_arg1:Stage, _arg2:Array):void{
var thestage = _arg1;
var theinfo = _arg2;
titleformat = new TextFormat();
info = new Array();
super();
_stage = thestage;
_root = Moogaloop(_stage.getChildAt(0));
buttonMode = true;
mouseChildren = false;
info = theinfo;
titleformat.bold = true;
var _local4 = label;
with (_local4) {
autoSize = "left";
text = info[0];
autoSize = "none";
setTextFormat(titleformat);
bgbox.width = ((x + 14) + (length * 9));
width = (bgbox.width - x);
thelabel = text.toLowerCase();
};
icon.gotoAndStop(thelabel);
theurl = info[1];
this.addEventListener(MouseEvent.ROLL_OVER, on_rollover);
this.addEventListener(MouseEvent.CLICK, on_click);
reset_state();
}
public function stupid_post():void{
theurl = ((((((((theurl + "?c=") + encodeURIComponent(info[4])) + "&u=") + encodeURIComponent(info[5])) + "&l=") + encodeURIComponent(info[6])) + "&t=") + encodeURIComponent(info[3]));
Schmoozy.gotosite(theurl);
}
public function reset_state():void{
bgbox.gotoAndStop("out");
}
public function on_rollover(_arg1:MouseEvent){
this.addEventListener(MouseEvent.ROLL_OUT, on_rollout);
bgbox.gotoAndStop("over");
}
public function on_click(_arg1:MouseEvent=null){
_root.trackingPixel((("action/embedded_share_" + thelabel) + "_submit"));
if (info.length < 3){
Schmoozy.gotosite(theurl);
} else {
stupid_post();
};
}
public function on_rollout(_arg1:MouseEvent){
this.removeEventListener(MouseEvent.ROLL_OUT, on_rollout);
reset_state();
}
public function swap_info(_arg1:Array){
info = _arg1;
theurl = info[1];
}
}
}//package com.vidplayer.gui.outro
Section 23
//ShareButtonTBT (com.vidplayer.gui.outro.ShareButtonTBT)
package com.vidplayer.gui.outro {
import flash.events.*;
import flash.display.*;
public class ShareButtonTBT extends ShareButton {
public function ShareButtonTBT(_arg1:Stage, _arg2:Array):void{
super(_arg1, _arg2);
}
override public function on_rollover(_arg1:MouseEvent){
this.addEventListener(MouseEvent.ROLL_OUT, on_rollout);
super.titleformat.color = 8184063;
label.setTextFormat(super.titleformat);
}
override public function reset_state():void{
super.titleformat.color = 0xFFFFFF;
label.setTextFormat(super.titleformat);
}
}
}//package com.vidplayer.gui.outro
Section 24
//ShareOverlay (com.vidplayer.gui.outro.ShareOverlay)
package com.vidplayer.gui.outro {
import flash.text.*;
import flash.display.*;
public dynamic class ShareOverlay extends MovieClip {
public var embede:OutroInputBox;
public var bigBG:MovieClip;
public var ShareText:TextField;
public var PostText:TextField;
public var embedl:OutroInputBox;
public var close_btn:MovieClip;
public var littleBG:MovieClip;
}
}//package com.vidplayer.gui.outro
Section 25
//TextFieldColor (com.vidplayer.gui.outro.TextFieldColor)
package com.vidplayer.gui.outro {
import flash.text.*;
import flash.filters.*;
public class TextFieldColor {
private var $textField:TextField;
private var $selectedColor:uint;
private var $textColor:uint;
private var $selectionColor:uint;
private var colorMatrixFilter:ColorMatrixFilter;
private static const byteToPerc:Number = 0.00392156862745098;
public function TextFieldColor(_arg1:TextField, _arg2:uint=0, _arg3:uint=0, _arg4:uint=0){
$textField = _arg1;
colorMatrixFilter = new ColorMatrixFilter();
$textColor = _arg2;
$selectionColor = _arg3;
$selectedColor = _arg4;
updateFilter();
}
private function updateFilter():void{
$textField.textColor = 0xFF0000;
var _local1:Array = splitRGB($selectionColor);
var _local2:Array = splitRGB($textColor);
var _local3:Array = splitRGB($selectedColor);
var _local4:int = _local1[0];
var _local5:int = _local1[1];
var _local6:int = _local1[2];
var _local7:Number = ((((_local2[0] - 0xFF) - _local1[0]) * byteToPerc) + 1);
var _local8:Number = ((((_local2[1] - 0xFF) - _local1[1]) * byteToPerc) + 1);
var _local9:Number = ((((_local2[2] - 0xFF) - _local1[2]) * byteToPerc) + 1);
var _local10:Number = (((((_local3[0] - 0xFF) - _local1[0]) * byteToPerc) + 1) - _local7);
var _local11:Number = (((((_local3[1] - 0xFF) - _local1[1]) * byteToPerc) + 1) - _local8);
var _local12:Number = (((((_local3[2] - 0xFF) - _local1[2]) * byteToPerc) + 1) - _local9);
colorMatrixFilter.matrix = [_local7, _local10, 0, 0, _local4, _local8, _local11, 0, 0, _local5, _local9, _local12, 0, 0, _local6, 0, 0, 0, 1, 0];
$textField.filters = [colorMatrixFilter];
}
public function set textColor(_arg1:uint):void{
$textColor = _arg1;
updateFilter();
}
public function get textField():TextField{
return ($textField);
}
public function set selectionColor(_arg1:uint):void{
$selectionColor = _arg1;
updateFilter();
}
public function get selectedColor():uint{
return ($selectedColor);
}
public function set selectedColor(_arg1:uint):void{
$selectedColor = _arg1;
updateFilter();
}
public function get selectionColor():uint{
return ($selectionColor);
}
public function set textField(_arg1:TextField):void{
$textField = _arg1;
}
public function get textColor():uint{
return ($textColor);
}
private static function splitRGB(_arg1:uint):Array{
return ([((_arg1 >> 16) & 0xFF), ((_arg1 >> 8) & 0xFF), (_arg1 & 0xFF)]);
}
}
}//package com.vidplayer.gui.outro
Section 26
//VidDivider (com.vidplayer.gui.outro.VidDivider)
package com.vidplayer.gui.outro {
import flash.display.*;
public dynamic class VidDivider extends Sprite {
}
}//package com.vidplayer.gui.outro
Section 27
//VidStripSide (com.vidplayer.gui.outro.VidStripSide)
package com.vidplayer.gui.outro {
import flash.display.*;
public dynamic class VidStripSide extends Sprite {
}
}//package com.vidplayer.gui.outro
Section 28
//VidStripTBT (com.vidplayer.gui.outro.VidStripTBT)
package com.vidplayer.gui.outro {
import flash.display.*;
public class VidStripTBT extends Sprite {
public var VidStripBG:MovieClip;
public function VidStripTBT():void{
redraw_strip();
}
public function redraw_strip(){
VidStripBG.height = 360;
VidStripBG.width = 480;
}
}
}//package com.vidplayer.gui.outro
Section 29
//BasePausedBtn (com.vidplayer.gui.pausecontrols.BasePausedBtn)
package com.vidplayer.gui.pausecontrols {
import flash.text.*;
import com.vidplayer.*;
import flash.events.*;
import flash.display.*;
public class BasePausedBtn extends Sprite {
public var _root:Moogaloop;
public var textlabel:String;// = ""
public var labelformat:TextFormat;
public var rightside:Boolean;// = false
public var label:TextField;
public var initwidth:Number;
public var initheight:Number;
public var firsttime:Boolean;// = true
public var _stage:Stage;
public function BasePausedBtn(_arg1:Stage, _arg2:Moogaloop, _arg3:String, _arg4:Boolean=false):void{
labelformat = new TextFormat();
super();
_root = _arg2;
visible = false;
_stage = _arg1;
rightside = _arg4;
buttonMode = true;
label.text = (textlabel = _arg3);
labelformat.letterSpacing = 0.2;
labelformat.color = 0xFFFFFF;
label.setTextFormat(labelformat);
this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
_stage.addChild(this);
}
public function onAddedToStage(_arg1:Event){
this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
alpha = 0.7;
initheight = height;
initwidth = width;
this.addEventListener(MouseEvent.CLICK, onClick);
this.addEventListener(MouseEvent.ROLL_OVER, onRollOver);
redraw(_root.st_w, _root.st_h);
}
public function play_state(_arg1:Boolean=false):void{
if (_arg1){
visible = (firsttime = false);
} else {
if (!firsttime){
_stage.setChildIndex(this, (_stage.numChildren - 1));
alpha = 0;
visible = true;
TweenLite.to(this, 0.3, {alpha:0.7});
};
};
_stage.setChildIndex(this, (_stage.numChildren - 1));
}
public function redraw(_arg1:Number, _arg2:Number):void{
y = (((_arg2 - height) / 2) + _root.border);
if ((((_arg1 > 120)) && ((_arg2 > 65)))){
if (_arg1 > 180){
width = Math.min((_arg1 / 5), 88);
x = ((_arg1 / 2) + _root.border);
x = (x + (rightside) ? (45 + (width * 0.08)) : (-45 - (width * 1.08)));
} else {
width = 35;
x = (rightside) ? (((_arg1 - 5) - width) + _root.border) : (5 + _root.border);
};
height = (width * 0.457);
} else {
width = (height = 0);
};
}
public function onClick(_arg1:MouseEvent):void{
var event = _arg1;
var lowlabel:String = label.text.toLowerCase();
var _local3 = _root;
with (_local3) {
trackingPixel((("action/embedded_" + lowlabel) + "_click"));
dispatch_play_state(0, true);
try {
outro.showoutro();
shrinkit(lowlabel);
outro.hide_ads();
} catch(e:Error) {
};
};
}
public function onRollOver(_arg1:MouseEvent):void{
this.addEventListener(MouseEvent.ROLL_OUT, onRollOut);
alpha = 1;
labelformat.color = 0xFFFFFF;
label.setTextFormat(labelformat);
}
public function onRollOut(_arg1:MouseEvent):void{
this.removeEventListener(MouseEvent.ROLL_OUT, onRollOut);
alpha = 0.7;
labelformat.color = 0xFFFFFF;
label.setTextFormat(labelformat);
}
}
}//package com.vidplayer.gui.pausecontrols
Section 30
//BigPlayBtn (com.vidplayer.gui.pausecontrols.BigPlayBtn)
package com.vidplayer.gui.pausecontrols {
import com.vidplayer.*;
import flash.events.*;
import flash.display.*;
public class BigPlayBtn extends Sprite {
public var _root:Moogaloop;
public var initheight:uint;
public var initwidth:uint;
public var _stage:Stage;
public function BigPlayBtn(_arg1:Stage, _arg2:Moogaloop):void{
this.name = "bigplaybtn";
buttonMode = true;
_stage = _arg1;
_root = _arg2;
initheight = 70;
initwidth = 88.7;
alpha = 0.7;
visible = false;
this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
_stage.addChild(this);
}
public function onClick(_arg1:MouseEvent):void{
_root.dispatch_play_state(-1, false, true);
}
public function play_state(_arg1:Boolean):void{
visible = !(_arg1);
_stage.setChildIndex(this, (_stage.numChildren - 1));
redraw(_root.st_w, _root.st_h);
}
public function onRollOver(_arg1:MouseEvent):void{
alpha = 1;
this.addEventListener(MouseEvent.ROLL_OUT, onRollOut);
}
public function onAddedToStage(_arg1:Event){
this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
this.addEventListener(MouseEvent.CLICK, onClick);
this.addEventListener(MouseEvent.ROLL_OVER, onRollOver);
redraw(_root.st_w, _root.st_h);
}
public function onRollOut(_arg1:MouseEvent):void{
this.removeEventListener(MouseEvent.ROLL_OUT, onRollOut);
alpha = 0.7;
}
public function redraw(_arg1:Number, _arg2:Number):void{
if ((((_arg1 < 80)) || ((_arg2 < 80)))){
width = initwidth;
height = initheight;
} else {
if ((_arg1 - 100) <= initwidth){
width = Math.max(Math.min(initwidth, (_arg1 - 70)), 20);
height = ((width * initheight) / initwidth);
};
if ((_arg2 - 100) <= initheight){
height = Math.min(Math.max(Math.min(initheight, (_arg2 - 70)), 20), height);
width = ((height * initwidth) / initheight);
};
};
x = (((_arg1 - width) / 2) + _root.border);
y = (((_arg2 - height) / 2) + _root.border);
}
}
}//package com.vidplayer.gui.pausecontrols
Section 31
//VideoTitle (com.vidplayer.gui.pausecontrols.VideoTitle)
package com.vidplayer.gui.pausecontrols {
import flash.text.*;
import com.vidplayer.*;
import flash.display.*;
public class VideoTitle extends MovieClip {
public var _root:Moogaloop;
public var bg:MovieClip;
public var titleformat:TextFormat;
public var title:TextField;
public var titleBG:MovieClip;
public var _stage:Stage;
public function VideoTitle(_arg1:Stage, _arg2:Moogaloop):void{
titleformat = new TextFormat();
super();
alpha = 1;
titleBG.buttonMode = true;
_stage = _arg1;
_root = _arg2;
redraw(_arg1.x, _arg2.st_w, _arg2.st_h);
}
public function changetitle(_arg1:String):void{
var newtitle = _arg1;
var _local3 = title;
with (_local3) {
text = newtitle;
autoSize = "left";
titleformat.bold = true;
setTextFormat(titleformat);
};
}
public function titleforcehide():void{
visible = false;
}
public function redraw(_arg1:Number, _arg2:Number, _arg3:Number):void{
var goop:*;
var stx = _arg1;
var stw = _arg2;
var sth = _arg3;
x = stx;
bg.width = stw;
var _local5 = title;
with (_local5) {
width = ((bg.width - 100) - x);
titleformat.size = 16;
setTextFormat(titleformat);
goop = 16;
autoSize = "left";
while (((((x + width) > (bg.width - 105))) && ((goop > 11)))) {
goop = (goop - 1);
titleformat.size = goop;
setTextFormat(titleformat);
};
if ((x + width) > (bg.width - 105)){
autoSize = "none";
width = ((bg.width - 103) - x);
};
titleBG.width = width;
};
visible = (((bg.width > 160)) && ((sth > 60)));
}
}
}//package com.vidplayer.gui.pausecontrols
Section 32
//NotFound (com.vidplayer.gui.NotFound)
package com.vidplayer.gui {
import flash.text.*;
import flash.display.*;
public dynamic class NotFound extends Sprite {
public var message_text:TextField;
}
}//package com.vidplayer.gui
Section 33
//GarbageCollectionShield (com.vidplayer.utilities.loader.GarbageCollectionShield)
package com.vidplayer.utilities.loader {
import flash.utils.*;
public class GarbageCollectionShield {
private static var _dict:Dictionary = new Dictionary();
public function add(_arg1:Object):void{
GarbageCollectionShield._dict[_arg1] = true;
}
public function remove(_arg1:Object):void{
delete GarbageCollectionShield._dict[_arg1];
}
}
}//package com.vidplayer.utilities.loader
Section 34
//GCSafeLoader (com.vidplayer.utilities.loader.GCSafeLoader)
package com.vidplayer.utilities.loader {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class GCSafeLoader extends Loader {
public var thisreq:String;
public var errFunc:Function;
public var loadfailcount:int;// = 0
public var compFunc:Function;
public var tryonce:Boolean;// = false
private static var _gcShield:GarbageCollectionShield = new GarbageCollectionShield();
public function stop_listeners():void{
var _local2 = contentLoaderInfo;
with (_local2) {
if (hasEventListener(Event.COMPLETE)){
removeEventListener(Event.COMPLETE, _allowGarbageCollection);
removeEventListener(IOErrorEvent.IO_ERROR, _errored);
};
};
}
public function loadthis(_arg1:String, _arg2:Function=null, _arg3:Function=null, _arg4:Boolean=false):void{
var req = _arg1;
var $compFunc = _arg2;
var $errFunc = _arg3;
var $tryonce = _arg4;
var _local6 = contentLoaderInfo;
with (_local6) {
addEventListener(Event.COMPLETE, _allowGarbageCollection);
addEventListener(IOErrorEvent.IO_ERROR, _errored);
};
GCSafeLoader._gcShield.add(this);
thisreq = req;
compFunc = $compFunc;
errFunc = $errFunc;
tryonce = $tryonce;
super.load(new URLRequest(req));
}
public function _errored(_arg1:Event):void{
var e = _arg1;
loadfailcount++;
if ((((loadfailcount < 3)) && (!(tryonce)))){
if (thisreq){
super.load(new URLRequest(thisreq));
};
} else {
var _local3 = contentLoaderInfo;
with (_local3) {
removeEventListener(Event.COMPLETE, _allowGarbageCollection);
removeEventListener(IOErrorEvent.IO_ERROR, _errored);
};
if (errFunc){
errFunc();
} else {
dispatchEvent(new Event("noload"));
};
_allowGarbageCollection(e);
};
}
private function _allowGarbageCollection(_arg1:Event):void{
var e = _arg1;
var _local3 = contentLoaderInfo;
with (_local3) {
removeEventListener(Event.COMPLETE, _allowGarbageCollection);
removeEventListener(IOErrorEvent.IO_ERROR, _errored);
};
if (compFunc){
compFunc();
};
GCSafeLoader._gcShield.remove(e.currentTarget);
}
}
}//package com.vidplayer.utilities.loader
Section 35
//GCSafeURLLoader (com.vidplayer.utilities.loader.GCSafeURLLoader)
package com.vidplayer.utilities.loader {
import flash.events.*;
import flash.net.*;
public class GCSafeURLLoader extends URLLoader {
public var thisreq:String;
public var is_important:Boolean;// = false
public var loadfailcount:int;// = 0
public var thisurlreq:URLRequest;
private static var _gcShield:GarbageCollectionShield = new GarbageCollectionShield();
public function GCSafeURLLoader(_arg1:URLRequest=null){
this.addEventListener(Event.COMPLETE, _allowGarbageCollection);
this.addEventListener(IOErrorEvent.IO_ERROR, _errored);
this.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _errored);
super(_arg1);
}
public function _errored(_arg1:Event):void{
loadfailcount++;
var _local2:int = (is_important) ? 6 : 3;
if (loadfailcount < _local2){
super.load(thisurlreq);
} else {
dispatchEvent(new Event("noload"));
GCSafeURLLoader._allowGarbageCollection(_arg1);
};
}
public function loadthis(_arg1:String, _arg2:Boolean=false, _arg3:URLVariables=null):void{
is_important = _arg2;
GCSafeURLLoader._gcShield.add(this);
thisreq = _arg1;
thisurlreq = new URLRequest(thisreq);
if (_arg3){
thisurlreq.data = _arg3;
thisurlreq.method = URLRequestMethod.POST;
};
super.load(thisurlreq);
}
private static function _allowGarbageCollection(_arg1:Event):void{
GCSafeURLLoader._gcShield.remove(_arg1.currentTarget);
}
}
}//package com.vidplayer.utilities.loader
Section 36
//Schmoozy (com.vidplayer.utilities.Schmoozy)
package com.vidplayer.utilities {
import flash.utils.*;
import flash.net.*;
import com.vidplayer.utilities.loader.*;
public class Schmoozy {
private static const BASE64_CHARS:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
public static var gotourl = "http://www.collegehumor.com";
public function Schmoozy():void{
}
public static function gotosite(_arg1:String, _arg2:Boolean=false):void{
var _local3:String = (_arg2) ? "_self" : "_blank";
if (_arg1 == "vidurl"){
_arg1 = gotourl;
};
navigateToURL(new URLRequest(_arg1), _local3);
}
public static function encode(_arg1:String):String{
var _local2:ByteArray = new ByteArray();
_local2.writeUTFBytes(_arg1);
return (encodeByteArray(_local2));
}
public static function loadurl(_arg1:String):void{
var stat_url = _arg1;
var loader:GCSafeURLLoader = new GCSafeURLLoader();
try {
loader.loadthis(stat_url);
} catch(error:Error) {
};
}
private static function encodeByteArray(_arg1:ByteArray):String{
var _local3:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local2 = "";
var _local4:Array = new Array(4);
_arg1.position = 0;
while (_arg1.bytesAvailable > 0) {
_local3 = new Array();
_local5 = 0;
while ((((_local5 < 3)) && ((_arg1.bytesAvailable > 0)))) {
_local3[_local5] = _arg1.readUnsignedByte();
_local5++;
};
_local4 = [((_local3[0] & 252) >> 2), (((_local3[0] & 3) << 4) | (_local3[1] >> 4)), (((_local3[1] & 15) << 2) | (_local3[2] >> 6)), (_local3[2] & 63)];
_local6 = _local3.length;
while (_local6 < 3) {
_local4[(_local6 + 1)] = 64;
_local6++;
};
_local7 = 0;
while (_local7 < 4) {
_local2 = (_local2 + BASE64_CHARS.charAt(_local4[_local7]));
_local7++;
};
};
return (_local2);
}
}
}//package com.vidplayer.utilities
Section 37
//AdaptvCallback (com.vidplayer.vidstuff.TPA.AdaptvCallback)
package com.vidplayer.vidstuff.TPA {
import com.vidplayer.*;
public class AdaptvCallback {
public var _root:BasePlayer;
public function AdaptvCallback(_arg1:BasePlayer):void{
_root = _arg1;
}
public function pauseVideo(){
_root.dispatch_play_state(0, true, true);
_root.loadercircle_toggle(false);
TweenLite.to(_root.chmaincontrols, 0.05, {autoAlpha:0});
}
public function handleAdEvent(_arg1:Object){
_root.debug(((String(_arg1.type) + " ") + String(_arg1.adFormat)));
switch (_arg1.type){
case "adClick":
switch (_arg1.adFormat){
case "preroll":
break;
case "overlay":
_root.dispatch_play_state(0);
break;
case "postroll":
_root.dispatch_play_state(0);
break;
};
break;
case "adDisplay":
switch (_arg1.adFormat){
case "preroll":
break;
case "overlay":
break;
case "postroll":
break;
};
break;
case "adDisplayComplete":
switch (_arg1.adFormat){
case "preroll":
break;
case "overlay":
break;
case "postroll":
if (BasePlayer.playertype != "infinity"){
_root.has_postroll = false;
};
_root.is_postroll_on = false;
TweenLite.to(_root.background, 0.8, {alpha:1, onComplete:_root.alldone});
break;
};
break;
};
}
public function playVideo(){
if (!_root.mainvid._is_playing){
TweenLite.to(_root.background, 0.8, {alpha:1, onComplete:_root.dispatch_play_state, onCompleteParams:[1, false, true]});
};
}
}
}//package com.vidplayer.vidstuff.TPA
Section 38
//AdaptvPlayer (com.vidplayer.vidstuff.TPA.AdaptvPlayer)
package com.vidplayer.vidstuff.TPA {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.net.*;
import com.vidplayer.utilities.loader.*;
import flash.system.*;
public class AdaptvPlayer extends Sprite {
private var sendConnection:LocalConnection;
private var loader:GCSafeLoader;
private var targetHeight:Number;// = -1
private var shouldCallInitialize:Boolean;
private var setStatusTimer:Timer;
private var config:Object;
private var targetWidth:Number;// = -1
private var callback:Object;
private var isLoaded:Boolean;// = false
private var isAdPlayerLoaded:Boolean;// = false
private var setStatusObject:Object;
private var tmrSetStatus:Timer;
private var recvConnName:String;
private var recvConnection:LocalConnection;
private var adPlayerURL:String;// = "http://redir.adap.tv/redir/client/AdPlayer.swf"
private var statusMethod:Function;
private var sendConnName:String;
public function AdaptvPlayer(_arg1:Object, _arg2:Object, _arg3=undefined):void{
loader = new GCSafeLoader();
super();
Security.allowDomain("*");
this.config = _arg1;
this.callback = _arg2;
if (this.config != null){
shouldCallInitialize = true;
};
initializeLocalConnections();
generateConnectionNames();
_arg1.inConnName = sendConnName;
_arg1.outConnName = recvConnName;
adPlayerURL = addParamsToURL(adPlayerURL, {inConnName:sendConnName, outConnName:recvConnName});
if (_arg3 != null){
adPlayerURL = addParamsToURL(adPlayerURL, {adaptvintegrate:_arg3});
};
var _local4:Timer = new Timer(3000, 1);
_local4.addEventListener("timer", adPlayerLoadingTimeout);
_local4.start();
loader.loadthis(adPlayerURL, handleAdPlayerLoaded, ioErrorHandler);
addChild(loader);
}
private function sendInitData():void{
if (isLoaded){
try {
sendConnection.send(sendConnName, "initialize", config, null);
shouldCallInitialize = false;
} catch(error:Error) {
};
};
}
public function setSize(_arg1:Number, _arg2:Number):void{
var _local3:Boolean = (((this.targetWidth == _arg1)) && ((Math.abs((this.targetHeight - _arg2)) < 28)));
if (!isLoaded){
this.targetWidth = _arg1;
this.targetHeight = _arg2;
return;
};
if (!_local3){
sendConnection.send(sendConnName, "setSize", _arg1, _arg2);
};
}
private function adPlayerLoadingTimeout(_arg1:TimerEvent):void{
if (!isLoaded){
playVideo();
this.parent.removeChild(this);
};
}
public function initialize(_arg1:Object, _arg2:Object):void{
this.config = _arg1;
this.callback = _arg2;
shouldCallInitialize = true;
sendInitData();
}
public function shift(_arg1:Number):void{
setSize(targetWidth, (targetHeight + _arg1));
}
public function stopSetStatus():void{
if (((tmrSetStatus) && (tmrSetStatus.running))){
tmrSetStatus.stop();
};
}
public function setStatusRateLimiter(_arg1:TimerEvent):void{
if (shouldCallInitialize){
sendInitData();
};
sendConnection.send(sendConnName, "setStatus", setStatusObject);
}
private function initializeLocalConnections():void{
sendConnection = new LocalConnection();
recvConnection = new LocalConnection();
sendConnection.addEventListener(StatusEvent.STATUS, function (_arg1:StatusEvent):void{
});
sendConnection.allowDomain("*");
sendConnection.allowInsecureDomain("*");
recvConnection.addEventListener(StatusEvent.STATUS, function (_arg1:StatusEvent):void{
});
recvConnection.allowDomain("*");
recvConnection.allowInsecureDomain("*");
}
public function pauseVideo():void{
callback.pauseVideo();
}
public function playVideo():void{
callback.playVideo();
}
public function startSetStatus(_arg1:Function):void{
this.statusMethod = _arg1;
if (((tmrSetStatus) && (tmrSetStatus.running))){
tmrSetStatus.stop();
};
tmrSetStatus = new Timer(1000, 0);
tmrSetStatus.addEventListener(TimerEvent.TIMER, onSetStatus);
tmrSetStatus.start();
}
private function statusErrorHandler(_arg1:StatusEvent):void{
}
public function viewCovered():void{
}
private function addParamsToURL(_arg1:String, _arg2:Object):String{
var _local4:String;
var _local5:String;
var _local3:String = _arg1;
if (_local3.indexOf("?") == -1){
_local4 = "?";
} else {
_local4 = "&";
};
for (_local5 in _arg2) {
if (((((!((_local5 == null))) && (!((_arg2[_local5] == null))))) && (((!((typeof(_arg2[_local5]) == "number"))) || (!(isNaN(_arg2[_local5]))))))){
_local3 = (_local3 + _local4);
_local3 = (_local3 + _local5);
_local3 = (_local3 + "=");
_local3 = (_local3 + escape(_arg2[_local5]));
_local4 = "&";
};
};
return (_local3);
}
public function handleVpaidEvent(_arg1:Object):void{
callback.handleVpaidEvent(_arg1);
}
private function generateRandomString(_arg1:int):String{
var _local4:String;
if (_arg1 <= 0){
return (null);
};
var _local2 = "_";
var _local3:int;
while (_local3 < (_arg1 - 1)) {
_local4 = new String(Math.floor((Math.random() * 10)));
_local2 = (_local2 + _local4);
_local3++;
};
return (_local2);
}
private function handleAdPlayerLoaded():void{
isLoaded = true;
isAdPlayerLoaded = true;
setStatusTimer = new Timer(1000);
setStatusTimer.addEventListener("timer", setStatusRateLimiter);
setStatusTimer.start();
if (((!((this.targetWidth == -1))) || (!((this.targetHeight == -1))))){
setSize(targetWidth, targetHeight);
};
if (shouldCallInitialize){
sendInitData();
};
}
private function generateConnectionNames():void{
Security.allowDomain("*");
sendConnName = generateRandomString(20);
recvConnName = generateRandomString(19);
recvConnection.connect(recvConnName);
recvConnection.client = this;
}
public function setStatusCallback():void{
}
private function onSetStatus(_arg1:TimerEvent){
this.setStatus(statusMethod());
}
private function ioErrorHandler():void{
callback.playVideo();
isAdPlayerLoaded = true;
}
public function adAvailable(_arg1:Boolean):void{
}
public function handleAdEvent(_arg1:Object):void{
callback.handleAdEvent(_arg1);
}
public function setStatus(_arg1:Object):Object{
if (!isLoaded){
return (null);
};
Security.allowDomain("*");
this.setStatusObject = _arg1;
return (null);
}
}
}//package com.vidplayer.vidstuff.TPA
Section 39
//Atlas (com.vidplayer.vidstuff.TPA.Atlas)
package com.vidplayer.vidstuff.TPA {
import com.vidplayer.*;
import flash.events.*;
import flash.display.*;
import com.vidplayer.utilities.loader.*;
public class Atlas extends MovieClip {
public static var _root:Moogaloop;
public static var $request_string:String = "";
public static var atlas_loader:GCSafeURLLoader = new GCSafeURLLoader();
public static var $response_string:String = "";
public static var functionend_string:String = "');}";
public static var $primary_request:String = "http://iacas.adbureau.net/bserverf/AAMALL/site=collegehumor.com/pageid=";
public static var failcount:int = 0;
public static var $response_postroll:Array = new Array();
public static var $response_overlay:Array = new Array();
public static var $response_array:Array = new Array();
public function Atlas(_arg1:Moogaloop):void{
_root = _arg1;
}
public function got_response(_arg1:Event):void{
var _local8:String;
var _local9:int;
var _local10:int;
var _local2:Boolean;
var _local3:Array = [0, 0];
var _local4:Array = [0, 0];
var _local5:Boolean;
var _local6:Boolean;
$response_string = atlas_loader.data;
var _local7:Array = $response_string.split("\\r\\n");
for each (_local8 in _local7) {
if (_local8.length > 0){
$response_array.push(_local8);
};
};
_local9 = $response_array.length;
if (_local9 == 1){
if (failcount < 2){
failcount++;
atlas_loader.loadthis($request_string);
} else {
got_error();
};
} else {
if (_local9 == 4){
_root.debug("No embeddable ads", 0xFFCC00);
} else {
atlas_loader.addEventListener(Event.COMPLETE, got_response);
atlas_loader.removeEventListener("noload", got_error);
if (String($response_array[1]).indexOf(functionend_string) > -1){
_local5 = false;
_local3 = [2, (_local9 - 2)];
};
if ((((String($response_array[(_local9 - 1)]).indexOf(functionend_string) > -1)) && ((String($response_array[(_local9 - 2)]).indexOf(functionend_string) > -1)))){
_local6 = false;
_local4 = [1, (_local9 - 3)];
};
if (((_local6) && (_local5))){
_local4[0] = 1;
_local10 = 0;
while (_local10 < _local9) {
if (String($response_array[_local10]).indexOf(functionend_string) > -1){
_local4[1] = (_local10 - 1);
break;
};
_local10++;
};
_local3 = [(_local10 + 1), (_local9 - 2)];
};
_local10 = _local3[0];
while (_local10 < _local3[1]) {
_local7 = String($response_array[_local10]).split("\\\"");
_root.flash_variable(_local7[1], _local7[3]);
_local10++;
};
_local10 = _local4[0];
while (_local10 < _local4[1]) {
_local7 = String($response_array[_local10]).split("\\\"");
_root.flash_variable(_local7[1], _local7[3]);
_local10++;
};
};
};
}
public function got_error(_arg1:Event=null):void{
atlas_loader.addEventListener(Event.COMPLETE, got_response);
atlas_loader.removeEventListener("noload", got_error);
_root.debug("No embeddable ads", 0xFFCC00);
}
public function fill_atlas(_arg1:String="R", _arg2:Boolean=false, _arg3:String="", _arg4:String="", _arg5:Boolean=true):void{
var _local15:Array;
var _local16:String;
$request_string = "";
var _local6:Array = new Array(["POSTROLL", _arg3], ["OVERLAY", _arg4]);
var _local7:int = (Math.random() * 1000000000);
var _local8 = "";
var _local9:int;
var _local10:int;
while (_local10 < 10) {
_local8 = (_local8 + String(Math.round((Math.random() * 9))));
_local10++;
};
_local9 = int(_local8);
$primary_request = ($primary_request + ((_local7 + "/random=") + _local9));
var _local11:String = (_arg2) ? "ORIGINAL_CONTENT" : "VIDEO_CONTENT";
_local11 = ("/AREA=" + String(_local11).toUpperCase());
var _local12:String = ("/RATING=" + String(_arg1).toUpperCase());
if (_local11 != ""){
$primary_request = ($primary_request + _local11);
};
$primary_request = ($primary_request + _local12);
if (_arg5){
$primary_request = ($primary_request + "/LOCATION=EMBED");
};
if (_arg2){
_local16 = "/keyword=chwidescreen ch-originals ch-sketches";
$primary_request = ($primary_request + _local16);
};
var _local13 = 1;
var _local14:Array = new Array();
for each (_local15 in _local6) {
if (_local15[1] != ""){
$primary_request = ($primary_request + ((("/AAMB" + _local13) + "/aamsz=") + _local15[0]));
if (Number(_local15[0]) > 0){
$primary_request = ($primary_request + ("/CCID=" + Number(_local15[0])));
};
_local13++;
};
};
$request_string = ($request_string + $primary_request);
atlas_loader.addEventListener(Event.COMPLETE, got_response);
atlas_loader.addEventListener("noload", got_error);
atlas_loader.loadthis($request_string);
}
}
}//package com.vidplayer.vidstuff.TPA
Section 40
//gAd (com.vidplayer.vidstuff.TPA.gAd)
package com.vidplayer.vidstuff.TPA {
import com.vidplayer.*;
import flash.events.*;
import flash.display.*;
import com.vidplayer.utilities.*;
import com.vidplayer.utilities.loader.*;
import flash.ui.*;
import flash.system.*;
public class gAd {
public var active:Boolean;// = false
public var _stage:Stage;
public var testing:Boolean;// = false
public var loader:GCSafeLoader;
public var swfURL:String;// = "http://pagead2.googlesyndication.com/pagead/scache/googlevideoadslibraryas3.swf"
public var minimized;// = false
public var vizmez_type:String;// = "gPostroll"
public var ready:Boolean;// = false
public var ad_name:String;// = "google"
public var playing:Boolean;// = false
public var type:String;// = "video"
public var enabled:Boolean;// = false
public var firsttimeshown:Boolean;// = true
public var _root:Moogaloop;
public var loading:Boolean;// = false
public var disable_mousemove:Boolean;// = false
public var player:MovieClip;
public var autoplay:Boolean;// = false
public var loadonclick:Boolean;// = false
public var pause_mainvid:Boolean;// = false
public var maxduration:String;// = "30000"
public function gAd(_arg1:String="video"):void{
loader = new GCSafeLoader();
super();
type = _arg1;
vizmez_type = ((type)=="video") ? "gPostroll" : "gOverlay";
}
public function onAdSkip():void{
}
public function delegate(_arg1:Object, _arg2:Function):Function{
var scope = _arg1;
var handler = _arg2;
var fn:Function = function (){
return (handler.apply(scope, arguments));
};
return (fn);
}
public function resumeStream():void{
if (!_root.mainvid._is_playing){
if (type == "video"){
_root.dispatch_play_state(1, false, true);
} else {
TweenLite.to(_root.background, 0.8, {alpha:1, onComplete:_root.dispatch_play_state, onCompleteParams:[1]});
};
};
disable_mousemove = false;
}
public function shift(_arg1:Number, _arg2:Boolean=false):void{
if (((ready) && (!((type == "video"))))){
if (_arg2){
loader.y = (_arg1 + _root.border);
} else {
TweenLite.to(loader, 0.3, {y:(_arg1 + _root.border)});
};
};
}
public function pauseStream():void{
if (type == "video"){
_root.dispatch_play_state(0, true, true);
disable_mousemove = true;
shift(0, true);
TweenLite.to(_root.chmaincontrols, 0.5, {autoAlpha:0});
};
}
public function stateChange(_arg1:String, _arg2:String):void{
if (_arg2 == "buffering"){
_root.loadercircle_toggle(false);
_stage.setChildIndex(player, (_stage.numChildren - 1));
};
if (_arg2 == "playing"){
Mouse.show();
_root.loadercircle_toggle(false);
_stage.setChildIndex(player, (_stage.numChildren - 1));
if (minimized){
_root.VMStats.adevent(vizmez_type, "restore");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "restore"));
_root.ggEvent(21, [swfURL, 1]);
minimized = false;
} else {
_root.VMStats.adevent(vizmez_type, "play");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "play"));
_root.ggEvent(13, [_root.mainvid._stream.time, swfURL]);
};
};
if (_arg2 == "completed"){
completed();
};
}
public function vidlengthcheck():Boolean{
var _local1:int = ((type)=="video") ? 60 : 30;
if (((_root.mainvid) && ((((_root.mainvid.duration >= _local1)) || ((BasePlayer.playerbrand == "TBT")))))){
return (true);
};
return (false);
}
public function play():void{
playing = true;
if (_root.chmaincontrols.visible){
shift(((_root.chmaincontrols.togglebutton.height * -1) - 1), true);
};
player.playAds();
_root.debug("GoogAd started", 0xFFAA00);
if (type == "video"){
if (_root.postroll_tracking_pixel){
_root.ad_pixels(_root.postroll_tracking_pixel);
};
if (_root.postroll_tracking_pixel){
_root.ad_pixels(_root.postroll_vericount_pixel);
};
} else {
if (_root.overlay_tracking_pixel){
_root.ad_pixels(_root.overlay_tracking_pixel);
};
if (_root.overlay_vericount_pixel){
_root.ad_pixels(_root.overlay_vericount_pixel);
};
};
player.pauseContentVideo = delegate(this, pauseStream);
player.resumeContentVideo = delegate(this, resumeStream);
player.onStateChange = delegate(this, stateChange);
player.onAdClick = delegate(this, onAdClick);
player.onError = delegate(this, onError);
player.onError = delegate(this, onError);
player.onAdSkip = delegate(this, onAdSkip);
_root.VMStats.adviewed(vizmez_type);
_root.ggEvent(13, [_root.mainvid._stream.time, swfURL]);
}
public function onAdsRequestResult(_arg1:Object):void{
var callbackObj = _arg1;
if (callbackObj.success){
_root.debug("GoogAd received", 0xFFAA00);
loading = false;
ready = true;
player = callbackObj.ads[0].getAdPlayerMovieClip();
player.setSize(_root.st_w, _root.st_h);
player.setX(_root.border);
player.setY(_root.border);
player.load();
if (autoplay){
if (type == "video"){
_root.watch_gPostroll();
} else {
play();
};
};
} else {
if (type == "video"){
_root.mainvid.vid_overlay.visible = true;
};
try {
_root.chmaincontrols.seekcontrols.ad_bar.visible = false;
} catch(e:Error) {
};
enabled = false;
active = false;
loading = false;
if (type == "video"){
_root.has_postroll = false;
_root.postrollclass._filename = "";
};
_root.debug(("GoogAd error: " + String(callbackObj.errorMsg)), 0xFFCC00);
};
}
public function sendAdRequest(_arg1:Event=null){
var _local2:Object = loader.content;
var _local3:Object = new Object();
_local3.videoId = _root.video_id;
if (testing){
_local3.videoPublisherId = "ca-video-afvtest";
_local3.adtest = "on";
} else {
_local3.videoPublisherId = "ca-video-pub-8476936509202305";
_local3.adtest = "off";
};
_local3.videoFlvUrl = _root.mainvid.flv;
_local3.videoDescriptionUrl = String(Schmoozy.gotourl);
_local3.channels = [""];
_local3.pubWidth = _root.st_w;
_local3.pubHeight = _root.st_h;
if (type == "video"){
_local3.adType = "video";
_local3.maxTotalAdDuration = maxduration;
_local3.channels = ["CollegeHumor_PostRolls"];
} else {
_local3.adType = "graphical_overlay";
_local3.channels = ["CollegeHumor_Overlays"];
};
_root.debug(("GoogAds request: " + String(_local3.channels[0])), 0xFFAA00);
_local2.requestAds(_local3, onAdsRequestResult);
}
public function completed():void{
if (type == "video"){
if (BasePlayer.playertype != "infinity"){
enabled = false;
_root.has_postroll = false;
} else {
autoplay = false;
active = false;
};
playing = false;
_root.is_postroll_on = false;
ready = false;
if (!_root.dammit_what_now){
TweenLite.to(_root.background, 0.8, {alpha:1, onComplete:_root.alldone});
};
} else {
_root.chmaincontrols.seekcontrols.the_ad_bar.visible = false;
playing = false;
ready = false;
active = false;
enabled = false;
if (player){
player.destroy();
};
};
_root.VMStats.adevent(vizmez_type, "close");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "close"));
_root.VMStats.adevent(vizmez_type, "complete");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "complete"));
_root.ggEvent(14, [_root.mainvid._stream.time]);
}
public function load():void{
var _local1:Boolean = vidlengthcheck();
if (((_local1) && (!(_root.kill_ze_ads)))){
Security.allowDomain("http://pagead2.googlesyndication.com");
loader = new GCSafeLoader();
loading = true;
loader.loadthis(swfURL, sendAdRequest);
_stage.addChild(loader);
firsttimeshown = false;
} else {
_root.debug("Google disabled, video too short", 0xFFCC00);
enabled = (active = (ready = false));
_root.postrollclass._filename = "";
if (((!((type == "video"))) && (_root.chmaincontrols.seekcontrols.the_ad_bar))){
_root.chmaincontrols.seekcontrols.the_ad_bar.visible = false;
};
if (_root.is_postroll_on){
_root.alldone();
};
};
}
public function onError():void{
stateChange("playing", "completed");
}
public function onAdClick():void{
if (type == "video"){
pause_mainvid = true;
_root.autoplay = false;
} else {
_root.dispatch_play_state(0);
};
disable_mousemove = false;
_root.VMStats.adevent(vizmez_type, "clickthrough");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "clickthrough"));
_root.ggEvent(21, [swfURL, 3]);
_root.ggEvent(22, [("google " + type)]);
_root.VMStats.adevent(vizmez_type, "minimize");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "minimize"));
_root.ggEvent(21, [swfURL, 2]);
}
}
}//package com.vidplayer.vidstuff.TPA
Section 41
//ssAd (com.vidplayer.vidstuff.TPA.ssAd)
package com.vidplayer.vidstuff.TPA {
import com.vidplayer.*;
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.geom.*;
import com.vidplayer.utilities.*;
import com.vidplayer.utilities.loader.*;
import flash.system.*;
public class ssAd {
public var active:Boolean;// = false
public var minimized:Boolean;// = false
public var loader:GCSafeLoader;
public var testing:Boolean;// = false
public var darkener:Timer;
public var errorTimer:Timer;
public var ready:Boolean;// = false
public var vizmez_type:String;// = "ssOverlay"
public var ad_name:String;// = "scanscout"
public var retry:Boolean;// = false
public var highpixel:String;// = ""
public var old_ad_vars:Array;
public var lowpixel:String;// = ""
public var _root:Moogaloop;
public var loading:Boolean;// = false
public var enabled:Boolean;// = false
public var type:String;// = "video"
public var URL:String;// = "http://media.scanscout.com/ads/ss_ads3.swf"
public var has_sspostroll:Boolean;// = false
public var ad_vars:Array;
public var disable_mousemove:Boolean;// = false
public var player;
public var loadonclick:Boolean;// = false
public var delayed:int;// = 0
public var startbutnotplay:Boolean;// = false
public var pause_mainvid:Boolean;// = false
public var player2;
public var highlow:int;// = 2
public var darkened:Boolean;// = false
public var _stage:Stage;
public function ssAd(_arg1:String):void{
darkener = new Timer(200, 3);
ad_vars = new Array();
old_ad_vars = new Array();
errorTimer = new Timer(2000, 1);
super();
type = _arg1;
vizmez_type = ((type)=="video") ? "ssPostroll" : "ssOverlay";
}
private function onPrerollStarted(_arg1:Object):void{
onPause();
_root.mainvid.seek(0);
}
public function initiateScanscout():void{
if (((!(ready)) && (!(_root.kill_ze_ads)))){
if (type != "video"){
Security.allowDomain("media.scanscout.com");
loader = new GCSafeLoader();
_stage.addChild(loader);
loader.loadthis(URL, notifyOverlayLoad, failedAdsLoad);
_root.debug("ScanScout Overlay started", 0xFFCC00);
} else {
preload_vars();
if ((((delayed == 2)) && (((_root.has_postroll) || (has_sspostroll))))){
_root.mainvid.hold_play();
startPreroll();
delayed = 0;
has_sspostroll = false;
} else {
if (delayed == 0){
delayed = 1;
};
};
};
};
}
private function onPrerollCompleted(_arg1:Object):void{
completed();
onResume();
}
private function onClosed(_arg1:Object){
_root.VMStats.adevent(vizmez_type, "close");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "close"));
darken();
}
public function shift(_arg1:Number, _arg2:Boolean=false):void{
if (_arg2){
loader.y = _arg1;
} else {
TweenLite.to(loader, 0.3, {y:(_arg1 + _root.border)});
};
}
private function onBauShown(_arg1:Object):void{
if (darkened){
darken();
};
}
private function preload_vars():void{
var _local1:String;
var _local2:String;
old_ad_vars = ad_vars;
if (delayed < 2){
ad_vars[1] = ["ss_pageURL", String(Schmoozy.gotourl)];
ad_vars[2] = ["ss_mediaId", _root.video_id];
ad_vars[3] = ["ss_mediaURL", _root.mainvid.flv];
ad_vars[4] = ["ss_mediaTitle", _root.mainvid.xmltitle];
_local1 = getDescription();
_local2 = getKeywords();
ad_vars[5] = ["ss_mediaDescription", _local1];
ad_vars[6] = ["ss_mediaKeywords", _local2];
ad_vars[7] = ["ss_mediaCategories", ""];
ad_vars[8] = ["ss_usePreroll", "true"];
ad_vars[9] = ["ss_maxPrerollDuration", "15"];
} else {
ad_vars[3] = ["ss_mediaURL", _root.mainvid.flv];
};
}
private function notifyPostrollLoad(_arg1:Event=null):void{
var _local2:Array;
var _local3:Array;
if (!retry){
player = _arg1.target.content;
player.addEventListener("ss_noPrerollAds", onNoPrerollAds);
player.addEventListener("ss_prerollCompleted", onPrerollCompleted);
player.addEventListener("ss_prerollStarted", onPrerollStarted);
for each (_local2 in ad_vars) {
player.setParam(_local2[0], _local2[1]);
};
player.setParam("ss_maxPrerollDuration", 30);
player.setSize(_root.st_w, _root.st_h);
player.setParam("ss_partnerId", "56411");
loader.x = _root.border;
ready = true;
loader.y = _root.border;
player.launch();
startbutnotplay = true;
errorTimer.addEventListener(TimerEvent.TIMER, checkError);
errorTimer.start();
} else {
for each (_local3 in ad_vars) {
player.setParam(_local3[0], _local3[1]);
};
player.setParam("ss_maxPrerollDuration", 30);
player.setSize(_root.st_w, _root.st_h);
player.setParam("ss_partnerId", "56266");
player.launch();
startbutnotplay = true;
errorTimer.addEventListener(TimerEvent.TIMER, checkError);
errorTimer.start();
};
}
private function oneauShown(_arg1:Object){
if (minimized){
_root.VMStats.adevent(vizmez_type, "restore");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "restore"));
minimized = false;
} else {
_root.VMStats.adevent(vizmez_type, "invitation");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "invitation"));
};
darken();
_root.ggEvent(21, [URL, 1]);
}
private function darken(_arg1:Object=null):void{
if (!darkened){
darkener.start();
} else {
loader.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
darkened = false;
};
}
public function getKeywords():String{
if (_root.mainvid.xmltags){
return (_root.mainvid.xmltags.join(","));
};
return ("");
}
private function failedAdsLoad(_arg1:Event):void{
_root.debug("ScanScout Error", 0xFFCC00);
_root.mainvid.vid_overlay.visible = true;
onResume();
}
private function onNoPrerollAds(_arg1:Object=null):void{
startbutnotplay = false;
highlow--;
if (highlow == 1){
_root.debug("Scanscout: no high tag, retrying", 0xFFCC00);
errorTimer.reset();
retry = true;
player.close();
notifyPostrollLoad();
} else {
_root.debug("no Scanscout ads", 0xFFCC00);
completed();
onResume();
};
}
public function completed():void{
retry = false;
highlow = 2;
_root.mainvid.dontplay = false;
if (type == "video"){
enabled = (active = false);
};
player.close();
loader.unload();
_root.has_postroll = false;
ready = false;
startbutnotplay = false;
if (_root.mainvid._stream){
_root.ggEvent(14, [_root.mainvid._stream.time]);
};
_root.VMStats.adevent(vizmez_type, "close");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "close"));
}
private function notifyOverlayLoad(_arg1:Event=null):void{
var timer:Timer;
var description:String;
var keywords:String;
var e = _arg1;
try {
_root.debug("ScanScout Overlay loaded", 0xFFCC00);
player = loader.content;
timer = new Timer(1000);
timer.addEventListener(TimerEvent.TIMER, videoTimeUpdate);
timer.start();
player.addEventListener("ss_pause", onPause);
player.addEventListener("ss_resume", onResume);
player.addEventListener("ss_bauShown", onbauShown);
player.addEventListener("ss_bauHidden", onHidden);
player.addEventListener("ss_bauClosedByUser", onClosed);
player.addEventListener("ss_eauShown", oneauShown);
player.addEventListener("ss_eauHidden", onHidden);
player.addEventListener("ss_eauClosedByUser", onClosed);
player.setParam("ss_partnerId", "56266");
player.setParam("ss_pageURL", String(Schmoozy.gotourl));
player.setParam("ss_mediaId", _root.video_id);
player.setParam("ss_mediaURL", _root.mainvid.flv);
player.setParam("ss_mediaTitle", _root.mainvid.xmltitle);
description = getDescription();
player.setParam("ss_mediaDescription", description);
keywords = getKeywords();
player.setParam("ss_mediaKeywords", keywords);
player.setParam("ss_mediaCategories", "");
player.setParam("ss_adDesign", "bannerGrayBorder");
player.setParam("ss_bugPlacement", "right-bottom");
player.setSize(_root.st_w, _root.st_h);
loader.x = _root.border;
ready = true;
loader.y = _root.border;
if (_root.chmaincontrols.alpha > 0){
loader.y = (((_root.chmaincontrols.togglebutton.height * -1) - 1) + _root.border);
};
darkener.addEventListener(TimerEvent.TIMER, tint);
player.launch();
_root.VMStats.adviewed(vizmez_type);
_root.VMStats.adevent(vizmez_type, "play");
if (_root.mainvid){
_root.ggEvent(13, [_root.mainvid._stream.time, URL]);
};
} catch(e:Error) {
ready = (active = (enabled = false));
};
}
public function getDescription():String{
if (_root.mainvid.xmldescription){
return (_root.mainvid.xmldescription);
};
return ("");
}
public function videoTimeUpdate(_arg1:TimerEvent=null):void{
player.videoTimeUpdate(Math.round(_root.mainvid._stream.time));
}
public function startPreroll():void{
if (!ready){
Security.allowDomain("media.scanscout.com");
loader = new GCSafeLoader();
_stage.addChild(loader);
loader.loadthis(URL, notifyPostrollLoad, failedAdsLoad);
TweenLite.to(_root.chmaincontrols, 0.5, {autoAlpha:0});
_root.debug("ScanScout Preroll started", 0xFFCC00);
};
}
private function onPause(_arg1:Object=null):void{
_root.dispatch_play_state(0, true, true);
_root.loadercircle_toggle(false);
disable_mousemove = true;
shift(0, true);
TweenLite.to(_root.chmaincontrols, 0.5, {autoAlpha:0});
}
public function checkError(_arg1:TimerEvent):void{
var _local2:String;
errorTimer.removeEventListener(TimerEvent.TIMER, checkError);
if (startbutnotplay){
_local2 = ((highlow)>2) ? highpixel : lowpixel;
_root.ad_pixels(_local2);
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "play"));
_root.VMStats.adviewed(vizmez_type);
_root.VMStats.adevent(vizmez_type, "play");
if (_root.mainvid){
_root.ggEvent(13, [_root.mainvid._stream.time, URL]);
};
} else {
if (retry){
onNoPrerollAds();
};
};
}
private function onResume(_arg1:Object=null):void{
if (!_root.mainvid._is_playing){
TweenLite.to(_root.background, 0.8, {alpha:1, onComplete:_root.dispatch_play_state, onCompleteParams:[1, false, true]});
};
disable_mousemove = false;
}
private function onHidden(_arg1:Object){
_root.VMStats.adevent(vizmez_type, "minimize");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "minimize"));
minimized = true;
darken();
_root.ggEvent(21, [URL, 2]);
}
private function onbauShown(_arg1:Object){
if (minimized){
_root.VMStats.adevent(vizmez_type, "restore");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "restore"));
minimized = false;
} else {
_root.VMStats.adevent(vizmez_type, "clickthrough");
_root.trackingPixel(((((("$1ads/" + ad_name) + "/") + type) + "/") + "clickthrough"));
_root.ggEvent(21, [URL, 3]);
_root.ggEvent(22, [("scanscout " + type)]);
};
darken();
_root.ggEvent(21, [URL, 1]);
}
public function tint(_arg1:TimerEvent=null):void{
loader.transform.colorTransform = new ColorTransform(0.75, 0.75, 0.75, 1, 0, 0, 0, 0);
darkener.reset();
darkened = true;
}
}
}//package com.vidplayer.vidstuff.TPA
Section 42
//VizMez (com.vidplayer.vidstuff.TPA.VizMez)
package com.vidplayer.vidstuff.TPA {
import com.vidplayer.*;
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import com.vmc.integration.*;
import com.vidplayer.vidstuff.*;
public class VizMez {
public var _root:BasePlayer;
public var gOverlay_info:Object;
public var firsttime:Boolean;// = true
public var postroll_info:Object;
public var newadInfo:Boolean;// = true
public var waiting_timer:Timer;
public var ssPostroll_info:Object;
public var clipInfo:Object;
public var temptempnode:Object;
public var gPostroll_info:Object;
public var adInfo:Object;
public var ssOverlay_info:Object;
public var newclipInfo:Boolean;// = true
public var _stage:Stage;
public static var ready:Boolean = false;
public static var swapping:Boolean = false;
public static var waiting:int = 0;
public function VizMez():void{
clipInfo = new Object();
adInfo = new Object();
postroll_info = new Object();
gPostroll_info = new Object();
ssPostroll_info = new Object();
ssOverlay_info = new Object();
gOverlay_info = new Object();
waiting_timer = new Timer(100, 0);
super();
}
public function getadInfo(_arg1:String="gOverlay"):void{
var _local6:Object;
var _local7:String;
var _local8:Array;
var _local2:int;
var _local3 = "";
var _local4 = "";
var _local5 = "";
switch (_arg1){
case "postroll":
_local2 = 15000;
_local3 = "LPO";
_local4 = _root.postrollclass._filename;
_local5 = _root.postrollclass.postthumbimage;
break;
case "gOverlay":
_local6 = gOverlay_info;
_local2 = 15000;
_local3 = "NLOIS";
break;
case "ssPostroll":
_local6 = ssPostroll_info;
_local2 = 15000;
_local3 = "LPO";
case "ssOverlay":
_local6 = ssOverlay_info;
_local2 = 15000;
_local3 = "NLOI";
break;
case "gPostroll":
_local6 = gPostroll_info;
_local2 = 15000;
_local3 = "LPO";
break;
};
_local6 = {id:_local4, adFormat:_local3, contentLinkId:_root.video_id, flvSourceUrl:_local4, thumbnailUrl:_local5, title:"none", category:"ads", description:"none", tags:""};
switch (_arg1){
case "postroll":
if (_local4 != ""){
_local7 = _local4.substring((_local4.indexOf("clients/") + 8));
_local8 = _local7.split("/");
_local6.brand = _local8[0];
_local6.campaign = _local8[1];
};
postroll_info = _local6;
break;
case "gPostroll":
gPostroll_info = _local6;
break;
case "gOverlay":
gOverlay_info = _local6;
break;
case "ssOverlay":
ssOverlay_info = _local6;
break;
case "ssPostroll":
ssOverlay_info = _local6;
break;
};
_root.debug((("VizMez " + _arg1) + " enabled"), 16772744);
}
public function send_dur(_arg1:Number):void{
temptempnode.setClipDuration((_arg1 * 1000));
}
public function conversion(_arg1:String="gOverlay", _arg2:int=1):void{
var _local3:Object = APILoader.getRemoteNode(_arg1, "ad");
_local3.logConversion(_arg2);
}
public function initPlayer():void{
}
public function mute():void{
var _local1:Object = APILoader.getRemoteNode();
_local1.logMute();
}
public function clipviewed():Boolean{
var _local1:Object;
if (((((clipInfo.id) && (newclipInfo))) && (ready))){
_local1 = APILoader.getRemoteNode();
APILoader.getVMCUtility().instrumentGenericTimer({property:getMainVidPosition, target:this, units:"seconds"}, _local1);
_local1.clipViewed(clipInfo);
newclipInfo = false;
_root.debug(("VizMez clipViewed: " + _root.video_id), 16772744);
return (true);
};
if (firsttime){
};
return (false);
}
private function getPostrollPosition():Number{
if (_root.postrollclass){
return (_root.postrollclass._stream.time);
};
return (0);
}
public function init(_arg1:BasePlayer, _arg2:Stage):void{
if (!_root){
_root = _arg1;
};
if (!_stage){
_stage = _arg2;
};
var _local3 = 1;
switch (BasePlayer.playertype){
case "bones":
_local3 = 2;
break;
case "internal":
_local3 = 3;
break;
case "infinity":
break;
case "embed":
_local3 = 5;
break;
case "boxad":
_local3 = 6;
break;
case "adventure":
_local3 = 7;
break;
default:
break;
};
var _local4:Object = {id:_local3, name:("collegehumor " + BasePlayer.playertype), width:_root.st_w, height:_root.st_h, autoPlay:_root.autoplay, autoRewind:false, continuousPlay:_root.cont_play};
var _local5:Object = {callback:initPlayer, target:this, accountKey:"999d06282f4811de93270019b9f1584b", playerInfo:_local4, netStream:_root.mainvid._stream, server:"http://video.od.visiblemeasures.com"};
APILoader.load(_local5);
_root.debug("VizMez initialized", 16772744);
firsttime = false;
if (BasePlayer.playertype != "boxad"){
if (_root.gOverlay.enabled){
getadInfo("gOverlay");
};
if (_root.gPostroll.enabled){
getadInfo("gPostroll");
};
if (((((((_root.has_postroll) || (_root.had_postroll))) && (!((_root.postrollclass._filename == ""))))) && (!(_root.gPostroll.enabled)))){
getadInfo("postroll");
};
if (_root.ssOverlay.enabled){
if (_root.ssOverlay.type == "video"){
getadInfo("ssPostroll");
} else {
getadInfo("ssOverlay");
};
};
};
}
public function customevent(_arg1:String=""):void{
var _local2:Object = APILoader.getRemoteNode();
_local2.logCustomEvent(_arg1);
}
public function continue_video():void{
switch (waiting){
case 2:
trace("~~~VIZMEZ READY, RESUMING");
BaseVideo(_root.mainvid).play_after_vizmez();
break;
case 1:
trace("~~~VIZMEZ READY, RESUMING");
BaseVideo(_root.mainvid).load_after_vizmez();
break;
};
}
private function getMainVidPosition():Number{
if (_root.mainvid){
return (_root.mainvid._stream.time);
};
return (0);
}
public function check_ready(_arg1:TimerEvent):void{
if (ready){
waiting_timer.reset();
waiting_timer.removeEventListener(TimerEvent.TIMER, check_ready);
continue_video();
};
}
public function share(_arg1:String=""):void{
var _local2:Object = APILoader.getRemoteNode();
switch (_arg1){
case "link":
_local2.logReferLink();
break;
case "email":
_local2.logReferEmail();
break;
case "embed":
_local2.logReferEmbed();
break;
};
}
public function start_checking():void{
waiting_timer.addEventListener(TimerEvent.TIMER, check_ready);
waiting_timer.start();
}
public function getclipInfo():void{
var _local1:Array;
var _local2:Object;
var _local3:String;
var _local4:String;
if (clipInfo.id != _root.video_id){
newclipInfo = true;
_root.debug(("VizMez newInfo: " + _root.video_id), 16772744);
_local1 = String(_root.xml_config.video.tags).split(",");
_local2 = _root.mainvid.ggparse(_local1, _root.xml_config.video.rating);
_local3 = _local2.category;
_local4 = _local2.subcategory;
clipInfo = {id:_root.video_id, title:_root.xml_config.video.caption, category:_local3, franchise:_local4, tags:_local1, description:_root.xml_config.video.description, flvSourceUrl:_root.xml_config.video.file, thumbnailUrl:_root.xml_config.video.thumbnail, brand:"CollegeHumor", custom1:_root.xml_config.video.rating};
};
}
public function adviewed(_arg1:String="gOverlay"):void{
var _local2:Object;
var _local3:Object;
if (_root.vizmezon){
switch (_arg1){
case "postroll":
_local2 = postroll_info;
break;
case "gPostroll":
_local2 = gPostroll_info;
case "gOverlay":
_local2 = gOverlay_info;
break;
case "ssOverlay":
_local2 = ssOverlay_info;
break;
case "ssPostroll":
_local2 = ssOverlay_info;
break;
};
_local3 = APILoader.getRemoteNode(_arg1, "ad");
if (_arg1 != "postroll"){
_local3.adImpression(_local2);
} else {
APILoader.getVMCUtility().instrumentGenericTimer({property:getPostrollPosition, target:this, units:"seconds"}, _local3);
_local3.clipViewed(_local2);
_local3.setClipDuration((_root.postrollclass.duration * 1000));
temptempnode = _local3;
};
_root.debug((("VizMez " + _arg1) + " started"), 16772744);
};
}
public function adevent(_arg1:String="gOverlay", _arg2:String=""):void{
var tempnode:Object;
var type = _arg1;
var event = _arg2;
if (_root.vizmezon){
if (event == "postroll_click"){
tempnode = APILoader.getRemoteNode(type, "ad");
tempnode.adVideoClickThrough();
_root.debug(((("VizMez " + type) + " event: ") + String(event)), 16772744);
} else {
try {
tempnode = APILoader.getRemoteNode(type, "ad");
switch (event){
case "play":
tempnode.adImpressionPlayed();
break;
case "minimize":
tempnode.adMinimize();
break;
case "close":
tempnode.adClose();
break;
case "complete":
tempnode.adImpressionCompleted();
break;
case "restore":
tempnode.adRestore();
break;
case "invitation":
tempnode.adAcceptInvitation();
conversion(type, 3);
break;
case "clickthrough":
tempnode.adClickThrough();
conversion(type, 2);
break;
};
_root.debug(((("VizMez " + type) + " event: ") + String(event)), 16772744);
} catch(e:Error) {
};
};
};
}
}
}//package com.vidplayer.vidstuff.TPA
Section 43
//BaseVideo (com.vidplayer.vidstuff.BaseVideo)
package com.vidplayer.vidstuff {
import com.vidplayer.*;
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import com.vidplayer.vidstuff.TPA.*;
import com.vidplayer.utilities.loader.*;
import fl.motion.easing.*;
public class BaseVideo extends Stream {
public var vid:Video;
public var shrunk:Boolean;// = false
public var vid_overlay:Sprite;
public var shiftdown:Number;// = 0
public var pixel_url:String;
public var stripheight:Number;// = 160
public var empty_duration:Boolean;// = false
public var shrinktime:Number;// = 0.5
public var redrawdims:Array;
public var stupidmainthumbframe:Sprite;
public var tempsubcat:String;// = ""
public var flv:String;
public var xml_config:XML;
public var playtrackready:Boolean;// = true
public var xmlrating:int;// = 5
public var adaptvplayer:AdaptvPlayer;
public var xmldescription:String;// = ""
public var tempcat:String;// = ""
public var shrinkparam1:Number;// = 190
public var shrinkparam2:Number;// = 250
public var adaptv_firsttime:Boolean;// = true
public var tbt_shrinkdims:Array;
public var vidratio:Number;
public var outro_mask:Shape;
public var xmltitle:String;// = ""
public var preroll:Boolean;// = false
public var xmlduration:Number;// = 0
public var show_logo:Boolean;
public var stripwidth:Number;// = 160
public var xmltags:Array;
public var nc:NetConnection;
public var thumbnail_loaded;// = false
public var thumbURL:String;
public var mainthumb:GCSafeLoader;
public var prerollagain:Boolean;// = false
public var _root:BasePlayer;
public var showshrunkthumb:Boolean;// = false
public var unshrinking:Boolean;// = false
public var adaptvconfig:Object;
public var adaptvcallback:AdaptvCallback;
public var tempcensuscat:String;// = ""
public var ggmeta:String;// = ""
public var didntload:Boolean;// = false
public var vid_loaded;// = false
public var thumbratio:Number;
public var _stage:Stage;
public function BaseVideo(_arg1:Stage, _arg2:BasePlayer, _arg3:XML):void{
var thestage = _arg1;
var $root = _arg2;
var xml_arg = _arg3;
xmltags = new Array("");
mainthumb = new GCSafeLoader();
vid_overlay = new Sprite();
stupidmainthumbframe = new Sprite();
outro_mask = new Shape();
nc = new NetConnection();
vid = new Video();
redrawdims = new Array();
tbt_shrinkdims = new Array(0, 0, 0, 0);
_stage = thestage;
_root = $root;
nc.connect(null);
AssignXMLVars(xml_arg);
var initvol:Number = (((!((String(xml_arg.volume) == ""))) || (!((_root.mainvol == 50))))) ? xml_arg.volume : 50;
super(thestage, flv, nc);
vid.smoothing = true;
super.setVideo(vid);
if (BasePlayer.playerbrand != "LS"){
volume_set(initvol);
};
vidratio = (_root.st_w / _root.st_h);
var _local5 = vid_overlay;
with (_local5) {
var _local6 = graphics;
with (_local6) {
beginFill(0, 0);
drawRect(x, y, width, height);
endFill();
};
addChild(vid);
buttonMode = true;
addEventListener(MouseEvent.CLICK, onVideoClick);
};
_local5 = outro_mask.graphics;
with (_local5) {
beginFill(0, 1);
drawRect(vid_overlay.x, vid_overlay.y, vid_overlay.width, vid_overlay.height);
endFill();
};
vid_overlay.visible = (mainthumb.visible = (outro_mask.visible = false));
onAddedToStage();
}
public function onVideoClick(_arg1:Event){
if (!shrunk){
_root.dispatch_play_state(-1, false, true);
} else {
if (BasePlayer.playertype != "bones"){
_root.video_pressed();
};
};
}
public function toggleshrunkthumb(_arg1:Boolean):void{
mainthumb.visible = (stupidmainthumbframe.visible = _arg1);
showshrunkthumb = _arg1;
}
public function shrunkvidx(_arg1:Number, _arg2:Number):void{
stripwidth = _arg1;
stripheight = _arg2;
redraw(_root.st_w, _root.st_h);
}
public function play_state_more(_arg1:Boolean):void{
}
public function getredrawdims(_arg1:Number, _arg2:Number, _arg3:Boolean=false):void{
var _local4:Number = (_arg3) ? thumbratio : vidratio;
if (!_local4){
_local4 = (thumbratio = (4 / 3));
};
if (_arg1 > (_arg2 * _local4)){
redrawdims[2] = (_arg2 * _local4);
redrawdims[3] = _arg2;
} else {
redrawdims[2] = _arg1;
redrawdims[3] = (_arg1 / _local4);
};
redrawdims[0] = (((_arg1 - redrawdims[2]) / 2) + _root.border);
redrawdims[1] = (((_arg2 - redrawdims[3]) / 2) + _root.border);
}
public function startVideo():void{
_root.tpacheck_3();
_root.video_on();
if (((((_root.ssOverlay) && (_root.ssOverlay.ready))) && ((_root.ssOverlay.type == "video")))){
} else {
_root.dispatch_play_state(1);
};
}
public function showprerollagain(_arg1:Boolean):void{
prerollagain = _arg1;
}
override public function prepare_video(_arg1:Boolean=false):void{
var swapped = _arg1;
super.seek(0);
vid_overlay.visible = false;
if (shrunk){
unshrink_from_outro();
};
if (swapped){
super.swapstream();
swapped = false;
super.swapped_hideandwait = true;
thumbnail_loaded = false;
var _local3 = mainthumb;
with (_local3) {
stop_listeners();
unload();
};
_root.autoplay = true;
};
ggmeta = (((((((((((((("<uurl>http://www.collegehumor.com/video:" + _root.video_id) + "</uurl><vidtype>content</vidtype><censuscategory>") + xmltitle) + "</censuscategory><category>") + tempsubcat) + "</category><subcategory>") + tempcat) + "</subcategory><length>") + xmlduration) + "<length><title>") + xmltitle) + "</title><imageurl>") + thumbURL) + "</imageurl>");
_root.ggEvent(3, [_filename, "content", ggmeta]);
_root.ggEvent(23, [xmlrating]);
if (_root.autoplay){
if (_root.vizmezon){
if (VizMez.ready){
load_after_vizmez();
} else {
if (VizMez.waiting == 0){
trace("~~~HOLDING FOR VIZMEZ");
};
VizMez.waiting = 1;
_root.VMStats.start_checking();
};
} else {
adaptv_init();
super.load();
};
};
loadMainThumb();
}
override public function newRatio():void{
super.streamheight = ((super.streamheight)<80) ? (super.streamwidth / vidratio) : super.streamheight;
if (super.streamwidth < 80){
super.streamheight = _root.st_h;
super.streamwidth = _root.st_w;
};
vidratio = (super.streamwidth / super.streamheight);
redraw(_root.st_w, _root.st_h);
if (unshrinking){
unshrink_from_outro();
};
}
public function adaptv_parse():void{
adaptvconfig = {key:"integration_test", zid:"4377", adaptag:"partner, tag1", videoPlayerId:"moogaloop", companionId:"companiondiv", context:"key1%3Dvalue1%2Ckey2%3Dvalue2", id:_root.video_id, title:xmltitle, htmlDebug:"true", duration:xmlduration, url:_filename, description:xmldescription, keywords:"test,video,adaptv", categories:"category1,category2", width:String(_root.st_w), height:String(_root.st_h), htmlX:"0", htmlY:"0"};
}
public function loadMainThumb():void{
if (((thumbURL) && (!(thumbnail_loaded)))){
mainthumb.loadthis(thumbURL, loadMainThumbComplete, loadMainThumbError);
};
}
public function shrink_for_outro():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
shrunk = true;
var _local5:Number = _root.st_w;
var _local6:Number = _root.st_h;
if (BasePlayer.playerbrand == "CH"){
stream_to_controls("vidshrink", "this", "true");
if (showshrunkthumb){
mainthumb.visible = (stupidmainthumbframe.visible = true);
};
useHandCursor = false;
_local2 = ((10 + shiftdown) + _root.border);
_local4 = Math.max(Math.min(((_local6 - shrinkparam1) - shiftdown), 105), 40);
_local4 = Math.max(Math.min((((_local5 - shrinkparam2) * 68) / 90), _local4), ((40 * 68) / 90));
_local3 = ((_local4 * 90) / 68);
_local1 = ((10 + ((stripwidth - _local3) / 2)) + _root.border);
if ((_local5 - _local3) < 240){
_local3 = Math.max((_local5 - 260), 40);
_local4 = (_local3 / (90 / 68));
_local1 = (10 + ((stripwidth - _local3) / 2));
};
if (_local5 <= 240){
_local1 = ((stripwidth - _local3) / 2);
};
vid_overlay.mask = outro_mask;
outro_mask.visible = true;
TweenLite.to(outro_mask, shrinktime, {ease:Quartic.easeOut, x:(23 + _root.border), y:_local2, width:(stripwidth - 26), height:_local4});
_local3 = (_local4 * vidratio);
_local1 = (10 + ((stripwidth - _local3) / 2));
if (_local5 <= 240){
_local1 = (_local1 - 10);
};
TweenLite.to(vid_overlay, shrinktime, {ease:Quartic.easeOut, x:_local1, y:_local2, width:_local3, height:_local4, onUpdate:shrunkthumb});
} else {
_local2 = tbt_shrinkdims[1];
_local4 = tbt_shrinkdims[3];
_local3 = tbt_shrinkdims[2];
_local1 = tbt_shrinkdims[0];
TweenLite.to(vid_overlay, 0.3, {ease:Quartic.easeOut, x:_local1, y:_local2, width:_local3, height:_local4});
};
}
public function logosynch(_arg1:int):void{
}
public function onThumbClick(_arg1:Event){
if (!shrunk){
_root.dispatch_play_state(-1, false, true);
startVideo();
} else {
if (BasePlayer.playertype != "bones"){
_root.video_pressed();
};
};
}
public function shiftdownforbanner(_arg1:Number){
shiftdown = _arg1;
shrinktime = 0;
}
public function onAddedToStage():void{
var d_o:*;
mainthumb.visible = false;
var _local2 = stupidmainthumbframe;
with (_local2) {
buttonMode = true;
addEventListener(MouseEvent.CLICK, onThumbClick);
var _local3 = graphics;
with (_local3) {
beginFill(0, 0);
drawRect(0, 0, 1, 1);
endFill();
};
};
_local2 = _stage;
with (_local2) {
for each (d_o in [outro_mask, this, vid_overlay, mainthumb, stupidmainthumbframe]) {
addChild(d_o);
};
};
prepare_video();
}
public function loadMainThumbComplete(){
if (!mainthumb.visible){
thumbratio = (mainthumb.width / mainthumb.height);
getredrawdims(_root.st_w, _root.st_h, true);
var _local2 = stupidmainthumbframe;
with (_local2) {
x = redrawdims[0];
y = redrawdims[1];
width = redrawdims[2];
height = redrawdims[3];
};
thumbnail_loaded = true;
if (_root.autoplay){
stupidmainthumbframe.visible = false;
} else {
pause();
_root.dispatch_play_state(0);
};
};
if (!_root.has_preroll){
video_ready();
};
redraw(_root.st_w, _root.st_h);
}
public function video_seek(_arg1:Number):void{
super._stream.pause();
super._timer_stream.stop();
super.seek(_arg1);
}
public function video_stopseek(_arg1:Boolean=false):void{
if (((super._is_playing) && (!(dontplay)))){
super.resume();
};
if (startseek_time >= 0){
_root.ggEvent(8, [startseek_time, (_arg1) ? this.duration : _stream.time]);
};
startseek_time = -1;
}
public function unshrink_from_outro():void{
if (BasePlayer.playerbrand == "CH"){
stream_to_controls("vidshrink", "this", "false");
getredrawdims(_root.st_w, _root.st_h);
vid_overlay.mask = null;
outro_mask.visible = false;
var _local2 = outro_mask;
with (_local2) {
x = redrawdims[0];
y = redrawdims[1];
width = redrawdims[2];
height = redrawdims[3];
};
if (thumbnail_loaded){
toggleshrunkthumb(false);
};
shrunk = false;
};
useHandCursor = true;
unshrinking = true;
var shrinky:Number = ((BasePlayer.playerbrand)=="CH") ? 0.6 : 0.4;
TweenLite.to(vid_overlay, shrinky, {ease:Quartic.easeOut, x:redrawdims[0], y:redrawdims[1], width:redrawdims[2], height:redrawdims[3], onComplete:unshrinking_false});
}
public function play_state(_arg1:Boolean):void{
if (_arg1){
if (((thumbnail_loaded) && (!(shrunk)))){
if (mainthumb.visible){
adaptv_init();
};
mainthumb.visible = (stupidmainthumbframe.visible = false);
};
if (!prerollagain){
super.play();
if ((((_stream.time == 0)) || ((_stream.time == duration)))){
super.stream_to_controls("controlforceshow");
};
super.stream_to_controls("changelockmode", "this", "false");
} else {
_root.dispatch_prerollagain(true);
super.stream_to_controls("reset_playbar", "seekcontrols");
super.stream_to_controls("controlforcehide");
if (_root.has_preroll){
_root.prerollclass.PreRollStart();
};
};
if (shrunk){
unshrink_from_outro();
};
if (playtrackready){
_root.playtracking();
playtrackready = false;
};
} else {
super.pause();
};
play_state_more(_arg1);
}
public function volume_set(_arg1:Number):void{
_root.volume_set(_arg1);
super.setVolume(_arg1);
}
public function adaptv_stop(){
if (adaptv_firsttime){
adaptvplayer.stopSetStatus();
};
}
public function ggparse(_arg1:Array, _arg2:String):Object{
var _local6:String;
var _local3 = "UGC";
var _local4 = "";
if (_arg2 == ""){
_arg2 = _root.rating;
};
if (_arg1.length == 0){
_arg1 = xmltags;
};
if (_root.chtv){
_local3 = "Original";
for each (_local6 in _arg1) {
if ((((_local4 == "")) || ((_local4 == "Sketches")))){
switch (_local6.toLowerCase()){
case "ch music":
_local4 = "Music";
break;
case "ch sketches":
_local4 = "Sketches";
break;
case "ch animations":
_local4 = "Animations";
break;
case "hardly working":
_local4 = "Hardly Working";
break;
case "jake and amir":
_local4 = "Jake and Amir";
break;
case "bleep bloop":
_local4 = "Bleep Bloop";
break;
case "prank war":
_local4 = "Prank War";
break;
case "chlive, ch live":
_local4 = "CH Live";
break;
case "streeter theeter":
_local4 = "Streeter Theeter";
break;
default:
break;
};
};
};
_local4 = ((_local4)!="") ? _local4 : "Other";
} else {
_local4 = _local3;
};
switch (_arg2){
case "pg":
xmlrating = 1;
break;
case "nsfa":
xmlrating = 2;
break;
case "r":
xmlrating = 3;
break;
case "unrated":
xmlrating = 4;
break;
default:
xmlrating = 5;
break;
};
var _local5:Object = new Object();
_local5 = {category:_local3, subcategory:_local4, rating:_arg2};
return (_local5);
}
public function load_after_vizmez():void{
var _local1:Boolean = _root.VMStats.clipviewed();
adaptv_init();
TweenLite.to(_root.background, 0.1, {alpha:1, onComplete:super.load});
}
public function adaptv_init():void{
if (_root.adaptv){
adaptvcallback = new AdaptvCallback(_root);
adaptv_parse();
if (adaptv_firsttime){
adaptvplayer = new AdaptvPlayer(adaptvconfig, adaptvcallback);
adaptv_firsttime = false;
_stage.addChild(adaptvplayer);
} else {
adaptvplayer.initialize(adaptvconfig, adaptvcallback);
};
adaptvplayer.startSetStatus(this.adaptv_status);
};
}
public function video_ready():void{
var _local1:Boolean;
_root.resize();
if (!swapped_hideandwait){
if (((_root.ssOverlay) && ((_root.ssOverlay.delayed < 2)))){
vid_overlay.visible = true;
};
};
_root.tpacheck_1();
_root.video_on();
if (!_root.autoplay){
mainthumb.visible = true;
_root.dispatch_play_state(0);
} else {
_local1 = _root.tpacheck_2();
if (_local1){
mainthumb.visible = true;
_root.dispatch_play_state(0);
} else {
_root.playstater(true);
startVideo();
};
};
}
public function shrunkthumb():void{
if (showshrunkthumb){
_stage.setChildIndex(mainthumb, (_stage.numChildren - 1));
_stage.setChildIndex(stupidmainthumbframe, (_stage.numChildren - 1));
var _local2 = mainthumb;
with (_local2) {
x = (stupidmainthumbframe.x = Math.max(outro_mask.x, vid_overlay.x));
y = (stupidmainthumbframe.y = outro_mask.y);
height = (stupidmainthumbframe.height = outro_mask.height);
width = (stupidmainthumbframe.width = Math.min(outro_mask.width, vid_overlay.width));
};
};
}
public function AssignXMLVars(_arg1:XML):void{
var _local3:*;
var _local4:Array;
if (BasePlayer.playerbrand != "TBT"){
xml_config = _arg1;
_local3 = xml_config.video;
flv = _local3.file;
if (((!(flv)) || ((flv == "")))){
_root.debug("There is no video filename in the XML.", 16720418);
_root.notfound.visible = true;
};
show_logo = (xml_config.watermark == 1);
pixel_url = xml_config.tracking_pixel;
thumbURL = (((_local3.thumbnail) && (!((_local3.thumbnail == ""))))) ? _local3.thumbnail : "http://www.collegehumor.com/artwork/default/jester_master.gif";
xmltitle = (_local3.caption) ? _local3.caption : "";
xmldescription = (_local3.description) ? _local3.description : "";
if (_local3.chtv){
_root.chtv = (_local3.chtv == "true");
};
if (_local3.rating){
_root.rating = String(_local3.rating);
};
if (_local3.tags){
_local4 = String(_local3.tags).split(",");
_local4.pop();
xmltags = _local4;
};
if (_local3.duration < 100){
empty_duration = true;
} else {
xmlduration = (Number(_local3.duration) / 1000);
};
} else {
flv = _arg1.flv;
thumbURL = _arg1.thumbnail;
xml_config = null;
};
xml_config = null;
var _local2:Object = ggparse(xmltags, _root.rating);
tempcat = _local2.category;
tempsubcat = _local2.subcategory;
xmlrating = _local2.rating;
}
public function parse_video(_arg1):void{
AssignXMLVars(_arg1);
super.sideload(flv);
}
override public function streamMetaData(_arg1:Object):void{
var _local2:GCSafeURLLoader;
var _local3:URLVariables;
super.streamMetaData(_arg1);
if ((((BasePlayer.playerbrand == "CH")) && (empty_duration))){
empty_duration = false;
_local2 = new GCSafeURLLoader();
_local3 = new URLVariables();
_local3.dur = (this.duration * 1000);
_local3.id = _root.video_id;
_local2.loadthis((("http://" + _root.SERVER) + "/jument.index.php?controller=video&view=store_video_duration&render_mode=ajax"), false, _local3);
};
}
public function redraw(_arg1:Number, _arg2:Number):void{
var stw = _arg1;
var sth = _arg2;
if (mainthumb.visible){
getredrawdims(stw, sth, true);
var _local4 = mainthumb;
with (_local4) {
x = (stupidmainthumbframe.x = redrawdims[0]);
y = (stupidmainthumbframe.y = redrawdims[1]);
width = (stupidmainthumbframe.width = redrawdims[2]);
height = (stupidmainthumbframe.height = redrawdims[3]);
};
};
if (BasePlayer.playerbrand == "CH"){
if (!unshrinking){
if (!shrunk){
getredrawdims(stw, sth);
_local4 = vid_overlay;
with (_local4) {
width = (outro_mask.width = redrawdims[2]);
height = (outro_mask.height = redrawdims[3]);
x = (outro_mask.x = redrawdims[0]);
y = (outro_mask.y = redrawdims[1]);
};
} else {
_local4 = vid_overlay;
with (_local4) {
vid_overlay.mask = outro_mask;
outro_mask.visible = true;
y = (outro_mask.y = (10 + shiftdown));
height = Math.max(Math.min(((sth - shiftdown) - shrinkparam1), 105), 40);
height = Math.max(Math.min((((stw - shrinkparam2) * 68) / 90), height), ((40 * 68) / 90));
width = ((height * 90) / 68);
x = ((10 + ((stripwidth - width) / 2)) + _root.border);
if ((stw - width) < 240){
width = Math.max((stw - 240), 40);
height = (width / (90 / 68));
x = ((10 + ((stripwidth - width) / 2)) + _root.border);
};
if (_root.st_w <= 240){
x = (((stripwidth - width) / 2) + _root.border);
};
outro_mask.height = height;
width = (height * vidratio);
x = ((10 + ((stripwidth - width) / 2)) + _root.border);
if (_root.st_h <= 240){
x = (x - 10);
};
outro_mask.width = (stripwidth - 26);
outro_mask.x = (23 + _root.border);
};
};
};
if (((mainthumb) && (shrunk))){
shrunkthumb();
};
} else {
if (!shrunk){
getredrawdims(stw, sth);
_local4 = vid_overlay;
with (_local4) {
width = redrawdims[2];
height = redrawdims[3];
x = redrawdims[0];
y = redrawdims[1];
};
};
};
if (adaptvplayer){
adaptvplayer.setSize(stw, sth);
};
}
public function loadMainThumbError():void{
if (!didntload){
_root.debug("Couldn't load main thumbnail", 0xFFFF00);
didntload = true;
};
mainthumb.visible = false;
if (_root.autoplay){
stupidmainthumbframe.visible = false;
} else {
pause();
_root.dispatch_play_state(0);
};
thumbnail_loaded = false;
if (!_root.has_preroll){
video_ready();
};
redraw(_root.st_w, _root.st_h);
}
public function volume_adjusted(_arg1:Number):void{
super.setVolume(_arg1);
if (_root.has_postroll){
_root.postrollclass.volume_adjusted(_arg1);
};
}
public function unshrinking_false():void{
unshrinking = false;
}
public function adaptv_status(){
return ({time:_stream.time, complete:(_is_complete == 2)});
}
}
}//package com.vidplayer.vidstuff
Section 44
//EmbeddedVideo (com.vidplayer.vidstuff.EmbeddedVideo)
package com.vidplayer.vidstuff {
import com.vidplayer.*;
import flash.events.*;
import flash.display.*;
import com.vidplayer.utilities.*;
import com.vidplayer.gui.maincontrols.*;
import com.vidplayer.gui.pausecontrols.*;
public class EmbeddedVideo extends BaseVideo {
private var logofirsthide:Boolean;// = true
private var url:String;
private var thelogo:CHLogo;
public var videotitle:VideoTitle;
public function EmbeddedVideo(_arg1:Stage, _arg2:Moogaloop, _arg3:XML):void{
var thestage = _arg1;
var $root = _arg2;
var xml_arg = _arg3;
thelogo = new CHLogo();
_stage = thestage;
videotitle = new VideoTitle(_stage, $root);
var _local5 = thelogo;
with (_local5) {
visible = false;
buttonMode = true;
addEventListener(MouseEvent.CLICK, to_mainsite);
addEventListener(MouseEvent.ROLL_OVER, logoover);
};
_stage.addChild(thelogo);
super(thestage, $root, xml_arg);
if (BasePlayer.playerbrand == "CH"){
super.shrinkparam1 = 180;
super.shrinkparam2 = 240;
videotitle.changetitle(xml_arg.video.caption);
} else {
videotitle.changetitle(xml_arg.title);
};
videotitle.titleBG.addEventListener(MouseEvent.CLICK, onVideoClick);
if (BasePlayer.playerbrand == "CH"){
super.shiftdown = 30;
} else {
super.shiftdown = 30;
};
}
override public function shrunkthumb():void{
super.shrunkthumb();
_stage.setChildIndex(videotitle, (_stage.numChildren - 1));
}
override public function onAddedToStage():void{
var d_o:*;
super.mainthumb.visible = false;
var _local2 = super.stupidmainthumbframe;
with (_local2) {
buttonMode = true;
addEventListener(MouseEvent.CLICK, super.onThumbClick);
var _local3 = graphics;
with (_local3) {
beginFill(0, 0);
drawRect(0, 0, 1, 1);
endFill();
};
};
_local2 = _stage;
with (_local2) {
for each (d_o in [super.outro_mask, this, super.vid_overlay, super.mainthumb, super.stupidmainthumbframe]) {
addChild(d_o);
};
};
super.prepare_video();
loadTitle(true);
}
public function logoout(_arg1:MouseEvent):void{
thelogo.removeEventListener(MouseEvent.ROLL_OUT, logoout);
if (super._is_playing){
thelogo.alpha = 0.8;
};
}
public function to_mainsite(_arg1:MouseEvent):void{
Schmoozy.gotosite(("http://" + _root.SERVER));
}
override public function play_state_more(_arg1:Boolean):void{
if (_arg1){
if (((super.thumbnail_loaded) && (!(super.shrunk)))){
videotitle.titleforcehide();
logofirsthide = false;
};
redraw_logo(false, _root.st_w, _root.st_h);
TweenLite.to(videotitle, 0.4, {y:(videotitle.height * -1), onComplete:hidetitle});
} else {
videotitle.visible = true;
redraw_logo(true, _root.st_w, _root.st_h);
TweenLite.to(thelogo, 0.4, {y:7});
TweenLite.to(videotitle, 0.4, {y:0});
if (super.shrunk){
super.unshrink_from_outro();
};
};
}
override public function logosynch(_arg1:int):void{
if (_stage.getChildAt((_stage.numChildren - 1)).name != "overlay"){
_stage.setChildIndex(thelogo, (_stage.numChildren - 1));
};
switch (_arg1){
case 1:
if (thelogo.alpha < 0.7){
TweenLite.to(thelogo, 0.4, {alpha:0.8});
};
break;
case 2:
if ((((thelogo.alpha > 0)) && (super._is_playing))){
TweenLite.to(thelogo, 0.4, {alpha:0});
};
break;
case 3:
if (super._is_playing){
thelogo.alpha = 0;
};
break;
case 4:
if (thelogo.alpha < 0.7){
thelogo.alpha = 0.8;
};
default:
break;
};
}
public function redraw_logo(_arg1:Boolean, _arg2:Number, _arg3:Number):void{
var ratio:*;
var top = _arg1;
var stw = _arg2;
var sth = _arg3;
if ((((stw > 160)) && ((sth > 60)))){
var _local5 = thelogo;
with (_local5) {
visible = (logofirsthide) ? false : true;
if (BasePlayer.playerbrand == "CH"){
width = 95;
height = 19.9;
} else {
ratio = (height / width);
width = 120;
height = (width * ratio);
};
x = (((_stage.x + stw) - width) - 4.5);
y = (top) ? 7 : 7;
alpha = (top) ? 1 : 0.8;
};
if (_stage.getChildAt((_stage.numChildren - 1)).name != "overlay"){
_stage.setChildIndex(thelogo, (_stage.numChildren - 1));
};
} else {
thelogo.visible = false;
};
}
override public function onVideoClick(_arg1:Event){
if (!shrunk){
onEmbedClick();
} else {
_root.video_pressed();
};
}
private function loadTitle(_arg1:Boolean):void{
var show = _arg1;
var _local3 = videotitle;
with (_local3) {
alpha = 1.2;
visible = show;
};
_stage.addChild(videotitle);
redraw_logo(true, _root.st_w, _root.st_h);
redraw(_root.st_w, _root.st_h);
}
public function onEmbedClick():void{
var _local2 = super._root;
with (_local2) {
dispatch_play_state(0);
if (BasePlayer.playerbrand == "CH"){
trackingPixel("embed_referal");
};
};
Schmoozy.gotosite("vidurl");
}
public function hidetitle():void{
videotitle.visible = false;
}
override public function redraw(_arg1:Number, _arg2:Number):void{
super.redraw(_arg1, _arg2);
videotitle.redraw(_stage.x, _arg1, _arg2);
if (super._is_playing){
redraw_logo(false, _arg1, _arg2);
thelogo.alpha = 0;
} else {
redraw_logo(true, _arg1, _arg2);
};
}
public function logoover(_arg1:MouseEvent):void{
thelogo.addEventListener(MouseEvent.ROLL_OUT, logoout);
if (super._is_playing){
thelogo.alpha = 1;
};
}
}
}//package com.vidplayer.vidstuff
Section 45
//PostRoll (com.vidplayer.vidstuff.PostRoll)
package com.vidplayer.vidstuff {
import flash.text.*;
import com.vidplayer.*;
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.geom.*;
import flash.net.*;
import flash.media.*;
import com.vidplayer.utilities.*;
import com.vidplayer.utilities.loader.*;
public class PostRoll extends Stream {
private var countdownformat:TextFormat;
public var postvid_overlay:Sprite;
public var countdownprefix:String;// = "Advertisement: The next video will begin "
public var postrollbanner:PostrollBanner;
public var perc0_pixel:String;
public var perc100_pixel:String;
public var skip_time:int;// = 6
public var is_playing:Boolean;// = false
public var vidratio:Number;
public var postwidth:Number;
public var ad_name:String;// = "unknown"
public var hidepost_timer:Timer;
public var reloading:Boolean;// = false
public var postthumb_loaded;// = false
public var postthumblink:String;
public var vid:Video;
public var postrollcountdown:PostrollCountdown;
private var nc:NetConnection;
public var postthumb:GCSafeLoader;
public var bannerafter:Boolean;// = false
public var bannerh:Number;// = 0
private var _root:Moogaloop;
public var just_tab:Boolean;// = false
public var postheight:Number;
public var perc50_pixel:String;
public var bannerw:Number;// = 0
public var bannerx:Number;// = 0
public var bannery:Number;// = 0
public var dumbbug:Boolean;// = true
public var extra_pixeltime:Number;// = 0
public var postthumbimage:String;
public var didntload:Boolean;// = false
public var perc25_pixel:String;
private var flv:String;
public var progresspixel:int;// = 0
private var _stage:Stage;
public function PostRoll(_arg1:Stage, _arg2:String, _arg3:String, _arg4:String, _arg5:String, _arg6:String, _arg7:String, _arg8:String, _arg9:Array):void{
var thestage = _arg1;
var postfile = _arg2;
var postw = _arg3;
var posth = _arg4;
var outfile = _arg5;
var outw = _arg6;
var outh = _arg7;
var clickurl = _arg8;
var extra_pixels = _arg9;
postthumb = new GCSafeLoader();
postvid_overlay = new Sprite();
nc = new NetConnection();
postrollbanner = new PostrollBanner();
postrollcountdown = new PostrollCountdown();
vid = new Video();
hidepost_timer = new Timer(250, 1);
countdownformat = new TextFormat();
this.name = "postroll";
_stage = thestage;
nc.connect(null);
flv = postfile;
postthumblink = clickurl;
postthumbimage = outfile;
postwidth = Number(outw);
postheight = Number(outh);
super(thestage, flv, nc, true);
_root = Moogaloop(_stage.getChildAt(0));
vid.smoothing = true;
super.setVideo(vid);
var _local11 = postvid_overlay;
with (_local11) {
graphics.beginFill(0, 0);
graphics.drawRect((x + _root.border), (y + _root.border), width, height);
graphics.endFill();
visible = false;
buttonMode = true;
addEventListener(MouseEvent.CLICK, onPostVidClick);
addChild(vid);
};
postrollcountdown.visible = false;
super._timer_stream.addEventListener(TimerEvent.TIMER, updatecountdown);
if (postrollcountdown.countdowntab){
_local11 = postrollcountdown.countdowntab.xtras;
with (_local11) {
visible = false;
x = (1 + _root.border);
width = 1;
};
};
_stage.addChild(postrollcountdown);
_local11 = postrollbanner;
with (_local11) {
buttonMode = true;
visible = false;
addChild(postthumb);
addEventListener(MouseEvent.CLICK, onPostVidClick);
adagain.addEventListener(MouseEvent.CLICK, onAdAgainClick);
};
_stage.addChild(postrollbanner);
postrollcountdown.addEventListener(MouseEvent.ROLL_OVER, onCountdownOver);
loadPostThumb();
countdownformat.letterSpacing = 0.5;
redraw(_root.st_w, _root.st_h);
perc0_pixel = extra_pixels[0];
perc25_pixel = extra_pixels[1];
perc50_pixel = extra_pixels[2];
perc100_pixel = extra_pixels[3];
}
public function skipbutton_out(_arg1:MouseEvent=null):void{
postrollcountdown.countdowntab.transform.colorTransform = new ColorTransform();
}
public function updatecountdown(_arg1:TimerEvent=null):void{
var st:*;
var sex:*;
var suffix:*;
var event = _arg1;
try {
var _local3 = postrollcountdown;
with (_local3) {
st = Math.ceil(super._stream.time);
if (((((st % 5) == 0)) && ((st > progresspixel)))){
_root.trackingPixel(((("$1ads/" + ad_name) + "/$1time/") + st));
_root.ggEvent(49, [_stream.time]);
};
if (((st / duration) - extra_pixeltime) < 1){
if (((((perc25_pixel) && ((extra_pixeltime < 0.25)))) && (((st / duration) > 0.25)))){
_root.debug(("perc25pixel: " + perc100_pixel), 0x888888);
Schmoozy.loadurl(perc25_pixel);
};
if (((((perc50_pixel) && ((extra_pixeltime < 0.5)))) && (((st / duration) > 0.5)))){
_root.debug(("perc50pixel: " + perc100_pixel), 0x888888);
Schmoozy.loadurl(perc50_pixel);
};
if (((((perc100_pixel) && ((extra_pixeltime < 1)))) && (((st / duration) > 1)))){
_root.debug(("perc100pixel: " + perc100_pixel), 0x888888);
Schmoozy.loadurl(perc100_pixel);
};
};
extra_pixeltime = (st / duration);
progresspixel = st;
if ((((((super._stream.time > 5)) && ((super._stream.time < 5.5)))) && (infolabel.visible))){
onCountdownOut();
};
_stage.setChildIndex(postrollcountdown, (_stage.numChildren - 1));
sex = Math.ceil((super.duration - super._stream.time));
sex = (sex) ? sex : " ";
suffix = ((sex)==" ") ? "shortly..." : "shortly...";
infolabel.text = (countdownprefix + suffix);
postrollcountdown.countdowntab.numberlabel.text = ((sex)==" ") ? "..." : sex;
};
} catch(e:Error) {
};
}
public function onAdAgainClick(_arg1:Event){
var event = _arg1;
_stage.addChild(postvid_overlay);
togglecountdown(true, true);
updatecountdown();
redrawcountdown(_root.st_w, _root.st_h);
onCountdownOut();
skip_time = 0.5;
var _local3 = _root;
with (_local3) {
has_postroll = true;
watchpostroll();
if (has_preroll){
dispatch_prerollagain(true);
};
mainvid.toggleshrunkthumb(false);
};
super.stream_to_controls("toggle_vidshrunk", "this", "false");
}
public function redraw(_arg1:Number, _arg2:Number){
var tempw = _arg1;
var temph = _arg2;
var _local4 = postvid_overlay;
with (_local4) {
if (tempw > (temph * vidratio)){
height = temph;
width = (temph * vidratio);
} else {
width = tempw;
height = (tempw / vidratio);
};
x = (((tempw - width) / 2) + _root.border);
y = (((temph - height) / 2) + _root.border);
};
postbanner_redraw(bannerx, bannery, bannerw, bannerh);
}
public function onCountdownOver(_arg1:MouseEvent=null):void{
var event = _arg1;
var _local3 = postrollcountdown;
with (_local3) {
addEventListener(MouseEvent.ROLL_OUT, onCountdownOut);
if (!just_tab){
infolabel.visible = !(countdowntab.visible);
if (!countdowntab.visible){
TweenLite.to(countdownBG, 0.4, {autoAlpha:1, y:0});
};
alpha = 1;
};
};
}
public function skip(_arg1:MouseEvent=null):void{
if (_is_playing){
pause();
};
postrollcountdown.countdowntab.transform.colorTransform = new ColorTransform();
onFinish(true);
_root.trackingPixel((("$1ads/" + ad_name) + "/skip"));
}
public function showpost(_arg1:TimerEvent){
var event = _arg1;
postvid_overlay.visible = true;
var _local3 = hidepost_timer;
with (_local3) {
removeEventListener("timer", showpost);
hidepost_timer.stop();
reset();
};
}
public function loadPostThumbError():void{
if (!didntload){
_root.debug("Couldn't load the postroll thumbnail", 0xFFFF00);
didntload = true;
};
}
override public function toggle_skip(_arg1:Boolean=false):void{
var onoff = _arg1;
if (onoff){
TweenLite.to(_root.background, skip_time, {alpha:1, onComplete:toggle_skip2, onCompleteParams:[onoff]});
} else {
skippable = false;
var _local3 = postrollcountdown.countdowntab;
with (_local3) {
buttonMode = false;
xtras.x = (xtras.width = 1);
xtras.visible = false;
bg.width = 30;
bg.x = 0;
skip_time = 6;
removeEventListener(MouseEvent.CLICK, skip);
removeEventListener(MouseEvent.ROLL_OVER, skipbutton_over);
removeEventListener(MouseEvent.ROLL_OUT, skipbutton_out);
};
};
}
public function loadPostThumbComplete():void{
var _local2 = postthumb;
with (_local2) {
visible = true;
width = postwidth;
height = postheight;
};
if (reloading){
reloading = false;
};
postthumb_loaded = true;
redraw(_root.st_w, _root.st_h);
}
public function startVideo(_arg1:Number){
var vol = _arg1;
if (!_root.kill_ze_ads){
if (!is_playing){
super.setVolume(_root.mainvol);
stream_to_controls("toggle", "togglebutton", true);
super.play();
if (duration > 0){
sendvidinfo();
} else {
gimmeMeta = true;
};
if (_is_loaded){
try {
stream_to_controls("onStreamLoading", "seekcontrols", "1");
} catch(e:Error) {
};
};
postvid_overlay.visible = false;
redraw(_root.st_w, _root.st_h);
var _local3 = postrollcountdown;
with (_local3) {
redrawcountdown(_root.st_w, _root.st_h);
};
is_playing = true;
_root.is_postroll_on = true;
_local3 = hidepost_timer;
with (_local3) {
addEventListener("timer", showpost);
start();
};
_root.VMStats.adviewed("postroll");
if (_root.postroll_tracking_pixel != ""){
_root.ad_pixels(_root.postroll_tracking_pixel);
};
if (_root.postroll_vericount_pixel != ""){
_root.ad_pixels(_root.postroll_vericount_pixel);
};
_root.chmaincontrols.seekcontrols.the_ad_bar.alpha = 0.02;
toggle_skip(skippable);
_root.trackingPixel((("$1ads/" + ad_name) + "/start"));
if (perc0_pixel != ""){
Schmoozy.loadurl(perc0_pixel);
};
};
} else {
onFinish();
};
}
public function reloadThumb():void{
reloading = true;
if (postthumb_loaded){
postthumb_loaded = false;
};
postthumb.stop_listeners();
postthumb.unload();
loadPostThumb();
}
override public function sendvidinfo():void{
gimmeMeta = false;
var _local1:String = _filename;
if (((!(_filename)) || ((_filename == "")))){
_local1 = flv;
};
_root.ggEvent(3, [_local1, "postroll", (((("<uurl>" + _local1) + "</uurl><vidtype>postroll</vidtype><length>") + duration) + "</length>")]);
_root.ggEvent(5, [0]);
}
public function volume_set(_arg1:Number):void{
super.setVolume(_arg1);
_root.volume_set(_arg1);
}
public function onPostVidClick(_arg1:Event):void{
if (_arg1.target.name != "adagain"){
Schmoozy.gotosite(postthumblink);
_root.VMStats.adevent("postroll_click");
_root.ggEvent(16, [postthumblink]);
};
}
public function postbanner_redraw(_arg1:Number=-1, _arg2:Number=-1, _arg3:Number=-1, _arg4:Number=-1):void{
var tempx = _arg1;
var tempy = _arg2;
var tempw = _arg3;
var temph = _arg4;
var _local6 = postrollbanner;
with (_local6) {
if (temph > 0){
bgbox.x = (tempx + _root.border);
bgbox.y = (tempy + _root.border);
bgbox.width = tempw;
bgbox.height = temph;
} else {
if (tempx == -1){
tempx = (bgbox.x + _root.border);
};
if (tempy == -1){
tempy = (bgbox.y + _root.border);
};
if (temph == -1){
temph = bgbox.h;
};
if (tempw == -1){
tempw = bgbox.w;
};
};
broughttext.x = (bgbox.x + (bgbox.width * 0.02));
broughttext.y = (bgbox.y + (bgbox.height * 0.02));
broughttext.width = (bgbox.width * 0.97);
broughttext.height = ((bgbox.width * 28) / 125);
adagain.width = (bgbox.width * 0.8);
adagain.height = ((adagain.width * 16.3) / 82);
adagain.x = (bgbox.x + (bgbox.width * 0.1));
adagain.y = ((bgbox.y + (bgbox.height * 0.9)) - adagain.height);
if (postthumb){
var _local7 = postthumb;
with (_local7) {
height = ((adagain.y - broughttext.y) - broughttext.height);
height = Math.min(height, (postheight * 1.2));
width = (height * (postwidth / postheight));
if (width > (bgbox.width - 10)){
width = Math.min((bgbox.width - 10), (postwidth * 1.2));
height = ((width * postheight) / postwidth);
};
y = ((broughttext.y + broughttext.height) + 12);
x = (bgbox.x + ((bgbox.width - width) / 2));
adagain.y = ((y + height) + 5);
};
} else {
adagain.y = Math.min(adagain.y, ((broughttext.y + broughttext.height) + 20));
};
if ((adagain.y + adagain.height) > bgbox.height){
(adagain.y - 5);
if (postthumb){
postthumb.height = (postthumb.height - 5);
};
};
};
}
override public function forcefinish():void{
}
public function postroll_toggle():void{
if (super._is_playing){
super.pause();
} else {
super.play();
};
}
override public function onFinish(_arg1:Boolean=false):void{
var skipped = _arg1;
var endtime:Number = (skipped) ? duration : _stream.time;
_root.ggEvent(7, [endtime]);
_root.ggEvent(4, [endtime, "postroll"]);
extra_pixeltime = 0;
seek(0);
toggle_skip(false);
super.stream_to_controls("reset_playbar", "seekcontrols");
is_playing = false;
var _local3 = _root;
with (_local3) {
is_postroll_on = false;
bannerafter = true;
if (skipped){
nextvid_afterpostroll = false;
};
finishpostroll();
if (chmaincontrols.seekcontrols.the_ad_bar.alpha == 0.01){
chmaincontrols.seekcontrols.the_ad_bar.alpha = 1;
};
};
if (!skipped){
_root.trackingPixel((("$1ads/" + ad_name) + "/end"));
if (perc100_pixel != ""){
Schmoozy.loadurl(perc100_pixel);
};
};
}
override public function newRatio():void{
vidratio = (super.streamwidth / super.streamheight);
redraw(_root.st_w, _root.st_h);
}
public function toggle_skip2(_arg1:Boolean=false):void{
var onoff = _arg1;
var _local3 = postrollcountdown.countdowntab;
with (_local3) {
addEventListener(MouseEvent.ROLL_OVER, skipbutton_over);
addEventListener(MouseEvent.ROLL_OUT, skipbutton_out);
addEventListener(MouseEvent.CLICK, skip);
transform.colorTransform = new ColorTransform();
buttonMode = true;
mouseChildren = false;
xtras.x = -65.8;
xtras.width = 67.8;
TweenLite.to(bg, 0.7, {width:100, x:-70});
TweenLite.to(xtras, 0.3, {delay:0.35, autoAlpha:1});
};
updatecountdown();
}
public function togglecountdown(_arg1:Boolean, _arg2:Boolean=false):void{
var vis = _arg1;
var justtab = _arg2;
just_tab = justtab;
var _local4 = postrollcountdown;
with (_local4) {
visible = vis;
if (vis){
infolabel.visible = !(just_tab);
countdowntab.visible = just_tab;
y = _root.border;
countdownBG.y = -(height);
TweenLite.to(postrollcountdown, 0.5, {y:0});
TweenLite.to(postrollcountdown, 0.5, {alpha:1, delay:1});
} else {
y = -(height);
};
};
redrawcountdown(_root.st_w, _root.st_h);
}
public function loadPostThumb():void{
if (((((postthumbimage) && (!((postthumbimage == ""))))) && (!(_root.gPostroll.enabled)))){
if (!postthumb_loaded){
postthumb.loadthis(postthumbimage, loadPostThumbComplete, loadPostThumbError);
};
} else {
didntload = true;
};
}
public function skipbutton_over(_arg1:MouseEvent=null):void{
postrollcountdown.countdowntab.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 35, 35, 35.2);
}
public function postroll_showbanner(_arg1:Boolean):void{
if (_arg1){
postrollbanner.broughttext.middle.text = (_root.chtv) ? "COLLEGEHUMOR ORIGINAL" : "COLLEGEHUMOR VIDEO";
};
postrollbanner.visible = _arg1;
}
override public function load():void{
super.load();
}
public function volume_adjusted(_arg1:Number):void{
super.setVolume(_arg1);
}
public function onCountdownOut(_arg1:MouseEvent=null):void{
var hidetime:*;
var curheight:*;
var event = _arg1;
var _local3 = postrollcountdown;
with (_local3) {
removeEventListener(MouseEvent.ROLL_OUT, onCountdownOut);
if (!countdowntab.visible){
infolabel.visible = false;
};
hidetime = ((event)==null) ? 0.8 : 0.4;
curheight = (infolabel.height + 5);
TweenLite.to(countdownBG, hidetime, {y:-(curheight)});
countdowntab.numberlabel.visible = true;
TweenLite.to(countdowntab, hidetime, {autoAlpha:1});
};
}
public function redrawcountdown(_arg1:Number, _arg2:Number):void{
var stw = _arg1;
var sth = _arg2;
_stage.setChildIndex(postrollcountdown, (_stage.numChildren - 1));
var _local4 = postrollcountdown;
with (_local4) {
var _local5 = countdownBG;
with (_local5) {
x = (_stage.x + _root.border);
width = _root.st_w;
};
countdownBG.y = (((visible) && (infolabel.visible))) ? 0 : -(countdownBG.height);
_local5 = infolabel;
with (_local5) {
autoSize = "center";
setTextFormat(countdownformat);
width = Math.min((countdownBG.width - 40), 450);
autoSize = "none";
countdownBG.height = (height + 5);
x = ((countdownBG.width - width) / 2);
};
_local5 = countdowntab;
with (_local5) {
height = (countdownBG.height * 1.3);
y = 0;
if (skip_time > 1){
x = (countdownBG.width - width);
width = height;
};
};
};
}
}
}//package com.vidplayer.vidstuff
Section 46
//PostrollBanner (com.vidplayer.vidstuff.PostrollBanner)
package com.vidplayer.vidstuff {
import flash.display.*;
public dynamic class PostrollBanner extends Sprite {
public var broughttext:MovieClip;
public var bgbox:Seek_Loaded;
public var adagain:SimpleButton;
}
}//package com.vidplayer.vidstuff
Section 47
//PostrollCountdown (com.vidplayer.vidstuff.PostrollCountdown)
package com.vidplayer.vidstuff {
import flash.text.*;
import flash.display.*;
public dynamic class PostrollCountdown extends MovieClip {
public var countdowntab:MovieClip;
public var infolabel:TextField;
public var countdownBG:MovieClip;
}
}//package com.vidplayer.vidstuff
Section 48
//PreRoll (com.vidplayer.vidstuff.PreRoll)
package com.vidplayer.vidstuff {
import com.vidplayer.*;
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import com.vidplayer.utilities.loader.*;
public class PreRoll extends Sprite {
public var prerollagain:Boolean;// = false
private var _root:Moogaloop;
private var channel:SoundChannel;
private var prethumblink:String;
private var prethumbwidth:Number;
private var vidratio:Number;
private var prethumbaudio:String;
public var stupidprerollframe:Sprite;
private var prethumbimage:String;
private var snd:Sound;
public var prethumb:GCSafeLoader;
public var stupidprerollbg:Sprite;
public var prethumb_loaded;// = false
private var didntload:Boolean;// = false
private var kepttop:Boolean;// = false
private var prethumbheight:Number;
private var _stage:Stage;
public function PreRoll(_arg1:Stage, _arg2:String, _arg3:String, _arg4:String, _arg5:String):void{
prethumb = new GCSafeLoader();
stupidprerollframe = new Sprite();
stupidprerollbg = new Sprite();
snd = new Sound();
channel = new SoundChannel();
super();
_stage = _arg1;
_root = Moogaloop(_stage.getChildAt(0));
prethumbimage = _arg2;
prethumbwidth = Number(_arg3);
prethumbheight = Number(_arg4);
prethumbaudio = _arg5;
addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
_stage.addChild(this);
}
public function onAddedToStage(_arg1:Event):void{
var d_o:DisplayObject;
var e = _arg1;
removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
loadPreRollThings();
var _local3 = stupidprerollbg.graphics;
with (_local3) {
beginFill(0, 1);
drawRect(0, 0, 1, 1);
endFill();
};
for each (d_o in [stupidprerollbg, prethumb, stupidprerollframe]) {
addChild(d_o);
};
redraw(_root.st_w, _root.st_h);
}
public function PreRollStart():void{
if (!_root.kill_ze_ads){
_root.ggEvent(13, [0, prethumbimage]);
visible = true;
prethumb.visible = (stupidprerollframe.visible = (stupidprerollbg.visible = true));
var _local2 = _root;
with (_local2) {
is_preroll_on = true;
dispatch_play_state(0);
};
if (!prethumb_loaded){
prethumb_loaded = true;
} else {
_root.prerolldone();
_stage.setChildIndex(this, (_stage.numChildren - 1));
};
channel = snd.play();
TweenLite.to(channel, 0.1, {volume:(_root.mainvol / 100)});
try {
channel.addEventListener(Event.SOUND_COMPLETE, soundComplete);
} catch(e:Error) {
TweenLite.to(this, 5, {alpha:1, onComplete:soundComplete});
};
redraw(_root.st_w, _root.st_h);
} else {
soundComplete();
};
}
public function setVol(_arg1:Number):void{
TweenLite.to(channel, 0.1, {volume:(_arg1 / 100)});
}
public function redraw(_arg1:Number, _arg2:Number){
var stw = _arg1;
var sth = _arg2;
if (prethumb){
var _local4 = prethumb;
with (_local4) {
if (stw > (sth * vidratio)){
height = (stupidprerollframe.height = sth);
width = (stupidprerollframe.width = (sth * vidratio));
} else {
width = (stupidprerollframe.width = stw);
height = (stupidprerollframe.height = (stw / vidratio));
};
x = (stupidprerollframe.x = (((stw - width) / 2) + _root.border));
y = (stupidprerollframe.y = (((sth - height) / 2) + _root.border));
var _local5 = stupidprerollbg;
with (_local5) {
x = _root.border;
y = _root.border;
width = stw;
height = sth;
};
};
};
}
public function keeptop():void{
if (!kepttop){
kepttop = true;
_stage.setChildIndex(this, (_stage.numChildren - 1));
};
}
public function loadPreRollThings():void{
if (((prethumbimage) && (!(prethumb_loaded)))){
prethumb.loadthis(prethumbimage, loadPreRollThingsComplete, loadPreRollThingsError);
};
}
public function soundComplete(_arg1:Event=null){
var event = _arg1;
_root.ggEvent(14, [0]);
visible = false;
_root.is_preroll_on = false;
_root.prerolldone();
if (prethumb_loaded){
prethumb.visible = (stupidprerollframe.visible = (stupidprerollbg.visible = false));
};
var _local3 = _root;
with (_local3) {
if (prerollagain){
prerollagain = false;
dispatch_prerollagain(false);
dispatch_play_state();
} else {
if (chmaincontrols){
chmaincontrols.seekcontrols.reset_playbar();
};
if (mainvid){
mainvid.video_ready();
};
};
ad_pixels(_root.bumper_tracking_pixel);
};
if (_root.newvid_after_preroll > -1){
_root.load_video(_root.newvid_after_preroll);
_root.newvid_after_preroll = -1;
};
}
public function loadPreRollThingsError():void{
_stage.setChildIndex(this, (_stage.numChildren - 1));
var _local2 = _root;
with (_local2) {
has_preroll = false;
prerolldone();
};
if (!didntload){
_root.debug("Couldn't load the preroll thumbnail", 0xFFFF00);
didntload = true;
};
}
public function loadPreRollThingsComplete():void{
var _local2 = prethumb;
with (_local2) {
width = prethumbwidth;
height = prethumbheight;
};
_local2 = stupidprerollframe.graphics;
with (_local2) {
beginFill(0, 0);
drawRect(0, 0, prethumbwidth, prethumbheight);
endFill();
};
vidratio = (prethumbwidth / prethumbheight);
snd.load(new URLRequest(prethumbaudio));
stupidprerollframe.buttonMode = true;
PreRollStart();
}
public function showprerollagain(_arg1:Boolean):void{
prerollagain = _arg1;
}
}
}//package com.vidplayer.vidstuff
Section 49
//Stream (com.vidplayer.vidstuff.Stream)
package com.vidplayer.vidstuff {
import com.vidplayer.*;
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.net.*;
import flash.media.*;
import com.vidplayer.vidstuff.TPA.*;
import com.vidplayer.gui.maincontrols.*;
public class Stream extends Sprite {
public var min_buffer_time;// = 2
public var sideloading:Boolean;// = false
public var max_buffer_time;// = 7
public var _is_error:Boolean;// = false
public var videodatarate:Number;// = 0
public var first_load:Boolean;// = true
private var seekmode:Boolean;// = false
public var _timer_slomo:Timer;
public var startseek_time:Number;// = -1
public var swapped_hideandwait:Boolean;// = false
public var _is_finished:Boolean;// = false
public var firststream:NetStream;
public var lastduration:Number;// = 0
public var _is_loaded:Boolean;// = false
public var sound_transform:SoundTransform;
public var vimeo:Video;
public var dontplay:Boolean;// = false
public var streamwidth:int;
public var invalidtime:Boolean;// = false
public var clientobj:Object;
public var gimmeMeta:Boolean;// = false
public var secondconnection:NetConnection;
private var firsttime2:Boolean;// = true
public var is_ad:Boolean;
public var _filename:String;
public var bytes_sofar:Number;
public var side_stream:NetStream;
public var _is_streaming:Boolean;// = false
public var invalidtime2:Boolean;// = false
public var invalidtime3:Boolean;// = false
private var firsttime:Boolean;// = true
public var totalbuffers:int;// = 0
public var loadPercent:Number;
public var _connection:NetConnection;
private var buffer_perc:Number;// = 0
public var loadfailcount:int;// = 0
public var firstconnection:NetConnection;
private var end_check_time:Number;// = 0
public var duration:Number;
public var _timer_stream:Timer;
public var currentPercent:Number;
public var nextflv:String;// = ""
public var _stream:NetStream;
public var sideload_ready:Boolean;// = true
public var streamheight:int;
private var end_check:Number;// = 0
public var _is_buffering:Boolean;// = false
public var _cur_buffer_time;// = 0
private var this_is_video_id:String;// = ""
public var _is_playing:Boolean;// = false
private var _root:BasePlayer;
public var side_client:Object;
public var skippable:Boolean;// = false
public var _is_loading:Boolean;// = false
public var meta2:Object;
public var _timerloader:Timer;
public var whichstream:int;// = 1
public var streamstartdelay:Boolean;// = false
public var swapped_hideandwait2:Boolean;// = false
public var _is_complete:int;// = 0
public var secondstream:NetStream;
public var slomo_paused:Boolean;// = false
private var _stage:Stage;
public function Stream(_arg1:Stage, _arg2:String, _arg3:NetConnection, _arg4:Boolean=false){
clientobj = new Object();
side_client = new Object();
super();
if (_arg4){
this.name = "stream_ad";
} else {
this.name = "stream";
};
_stage = _arg1;
is_ad = _arg4;
_root = BasePlayer(_stage.getChildAt(0));
this._filename = _arg2;
this.firstconnection = _arg3;
this.firststream = new NetStream(this.firstconnection);
if (((_root.cont_play) && (!(is_ad)))){
this.secondconnection = new NetConnection();
this.secondconnection.connect(null);
this.secondstream = new NetStream(this.secondconnection);
this.secondstream.bufferTime = 3;
this.side_stream = this.secondstream;
};
this.sound_transform = new SoundTransform();
this._connection = this.firstconnection;
this._stream = this.firststream;
this.firststream.bufferTime = 3;
clientobj.onMetaData = streamMetaData;
side_client.onMetaData = streamMetaData2;
clientobj.onCuePoint = (side_client.onCuePoint = streamCuePoint);
if (!_root.enable_preloading){
this._stream.client = clientobj;
if (!hasEventListener(ProgressEvent.PROGRESS)){
addEventListener(ProgressEvent.PROGRESS, streamProgress);
addEventListener(NetStatusEvent.NET_STATUS, streamNetStatus);
addEventListener(AsyncErrorEvent.ASYNC_ERROR, streamError);
};
};
this._timerloader = new Timer(100);
this._timerloader.addEventListener(TimerEvent.TIMER, timerStreamLoad);
this._timer_stream = new Timer(100);
this._timer_stream.addEventListener(TimerEvent.TIMER, timerStreamProgress);
this._timer_slomo = new Timer(200);
this._timer_slomo.addEventListener(TimerEvent.TIMER, slomotime);
}
public function streamMetaData(_arg1:Object):void{
if (gimmeMeta){
sendvidinfo();
};
this.duration = _arg1.duration;
this.videodatarate = _arg1.videodatarate;
if (((is_ad) && ((_arg1.duration > 20)))){
skippable = true;
if (_is_playing){
toggle_skip(true);
};
};
if (((is_ad) && (_root.vizmezon))){
_root.send_dur(_arg1.duration);
};
this.streamwidth = _arg1.width;
this.streamheight = _arg1.height;
stream_to_controls("onStreamMetaData", "seekcontrols", _arg1);
_root.tpacheck_5(_arg1.duration);
newRatio();
}
public function play_after_vizmez2():void{
this.load();
this.startBuffer(this.min_buffer_time);
this._is_finished = false;
this._is_playing = true;
this._timer_stream.start();
this.visible = true;
}
public function setVolume(_arg1:Number):void{
this.sound_transform.volume = (_root.TESTING) ? 0 : (_arg1 / 100);
this._stream.soundTransform = this.sound_transform;
if (this.side_stream){
this.side_stream.soundTransform = this.sound_transform;
};
}
public function slomotime(_arg1:TimerEvent):void{
_timer_slomo.reset();
if (slomo_paused){
_stream.resume();
};
slomo_paused = false;
}
public function resume():void{
this._is_playing = true;
this._stream.resume();
this._timer_stream.start();
slomo_paused = false;
}
public function play():void{
first_load = (((_is_loading) || (_is_loaded))) ? false : true;
if (((((_root.vizmezon) && (first_load))) && (!(is_ad)))){
if (VizMez.ready){
play_after_vizmez();
} else {
if (VizMez.waiting == 0){
trace("~~~HOLDING FOR VIZMEZ");
};
VizMez.waiting = 2;
_root.VMStats.start_checking();
};
} else {
if (!dontplay){
this.load();
if (first_load){
this.startBuffer(this.min_buffer_time);
} else {
if (this._is_finished){
this.seek(0);
};
this._stream.resume();
};
this._is_finished = false;
this._is_playing = true;
this._timer_stream.start();
this.visible = true;
} else {
pause();
stream_to_controls("controlforcehide");
};
};
}
public function setVideo(_arg1:Video):void{
this.vimeo = _arg1;
}
public function prepare_video(_arg1:Boolean=false):void{
}
public function startBuffer(_arg1:Number):void{
this._cur_buffer_time = _arg1;
this._is_buffering = true;
this._stream.pause();
if (!streamstartdelay){
totalbuffers = (totalbuffers + 1);
_root.ggEvent(25, [totalbuffers, _cur_buffer_time, max_buffer_time]);
};
}
public function onFinish(_arg1:Boolean=false):void{
no_really();
}
public function newRatio():void{
}
private function streamNetStatus(_arg1:NetStatusEvent):void{
switch (_arg1.info.code){
case "NetStream.Play.StreamNotFound":
loadfailcount++;
if (loadfailcount < 2){
_stream.play(_filename);
} else {
if (is_ad){
_root.debug("The ad's video file didn't load.", 0xFF0000);
} else {
_root.debug("The main video file didn't load. Maybe it's blank in the XML.", 0xFF0000);
};
if ((((_stream.time == 0)) && (!(is_ad)))){
_root.notfound.visible = true;
clear_sideload();
_root.ggEvent(26, [1]);
};
};
break;
case "NetStream.Play.Start":
if (((!(_is_loaded)) && (((!(is_ad)) || (((is_ad) && (!(_root.mainvid._is_playing)))))))){
_root.loadercircle_toggle(true);
};
loadfailcount = 0;
_root.notfound.visible = false;
break;
case "NetStream.Play.Stop":
if (invalidtime3){
invalidtime2 = true;
};
break;
case "NetStream.Seek.Notify":
seekmode = true;
invalidtime2 = false;
break;
case "NetStream.Seek.InvalidTime":
if (!this._is_finished){
invalidtime3 = true;
};
break;
case "NetStream.Buffer.Full":
firsttime2 = true;
_is_buffering = false;
_root.loadercircle_toggle(false);
case "NetStream.Buffer.Flush":
firsttime2 = true;
_is_buffering = false;
_root.loadercircle_toggle(false);
case "NetStream.Buffer.Empty":
if (((!(firsttime2)) && (!(_is_loaded)))){
_is_buffering = true;
};
firsttime2 = false;
break;
};
}
public function play_after_vizmez():void{
var _local1:Boolean = _root.VMStats.clipviewed();
TweenLite.to(this, 0.1, {alpha:1, onComplete:this.play_after_vizmez2});
}
public function streamMetaData2(_arg1:Object):void{
meta2 = _arg1;
}
public function forcefinish():void{
if (((is_ad) || (!(_root.looping)))){
no_really();
} else {
seek(_root.loop_starttime);
};
}
private function timerStreamProgress(_arg1:TimerEvent):void{
var e = _arg1;
invalidtime = false;
this.checkBuffer();
var dec:* = (currentPercent = (this._stream.time / this.duration));
if (end_check == dec){
end_check_time++;
} else {
end_check_time = 0;
};
if ((((((end_check_time > 10)) && ((this._stream.time > (this.duration - 1))))) && (this._is_loaded))){
dec = 1;
end_check_time = 0;
} else {
_root.streamprogressPixel(this._stream.time);
};
stream_to_controls("onStreamProgress", "seekcontrols", [this._stream.time, (this._stream.time / this.duration)]);
if (dec == 1){
if (((is_ad) || (!(_root.looping)))){
this.pause();
this.onFinish();
} else {
seek(_root.loop_starttime);
};
} else {
if (((((!(is_ad)) && (_root.looping))) && ((((dec >= _root.loop_endtime)) || ((dec <= _root.loop_starttime)))))){
seek(_root.loop_starttime);
};
};
end_check = dec;
if (((swapped_hideandwait) || (((swapped_hideandwait2) && (!(_root.is_postroll_on)))))){
if (dec > 0){
swapped_hideandwait = (swapped_hideandwait2 = false);
if (!is_ad){
BaseVideo(this).vid_overlay.visible = true;
};
if (((_root.cont_play) && (!(is_ad)))){
_root.interlude(false);
};
};
};
if (((_is_loaded) && (_root.loadinggraphic.visible))){
_root.loadercircle_toggle(false);
};
if ((((((this._stream.time >= 10)) && ((this.duration > 1)))) && (!(is_ad)))){
_root.tpacheck_6();
};
if (_root.slomo){
slomo_paused = true;
_stream.pause();
_timer_slomo.start();
};
if (_root.smartbar){
_root.onPlayheadUpdate();
};
try {
if ((((((((((BasePlayer.playerbrand == "TBT")) && (is_ad))) && (_is_playing))) && (_root.mainvid))) && (_root.mainvid._is_playing))){
_root.mainvid.play_state(false);
};
} catch(e:Error) {
};
}
public function get_shit_ready(_arg1:Boolean=false):void{
var override = _arg1;
sideload_ready = false;
var isnext:String = _root.nextstream();
if (((!((isnext == "-1"))) && (!(override)))){
var _local3 = _root;
with (_local3) {
loadMainVideoXML((CONFIG_PATH_BASE + isnext));
};
} else {
sideload_ready = true;
};
}
private function checkBuffer():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
if (((this._is_loading) && (!(this._is_loaded)))){
_local1 = (this._stream.time / this.duration);
_local2 = (this._stream.bytesLoaded / this._stream.bytesTotal);
_local3 = (_local2 * this.duration);
_local4 = (this._stream.bytesLoaded / (this._timerloader.currentCount * 0.05));
_local5 = (this._stream.bytesTotal / this.duration);
_local6 = (1 - (_local4 / _local5));
if (_local6 < 0){
_local6 = 0;
};
_local7 = (this._stream.time + this._cur_buffer_time);
if (_local7 > this.duration){
_local7 = this.duration;
};
if (((((this._is_buffering) && ((this._cur_buffer_time > 0)))) && ((_local7 < _local3)))){
this.stopBuffer();
if (!_is_playing){
_root.loadercircle_toggle(false);
};
} else {
if ((((this._stream.time > (_local3 - 0.2))) && (!(this._is_buffering)))){
if (_local4 < _local5){
if (_local6 >= 0.75){
this._cur_buffer_time = this.max_buffer_time;
} else {
this._cur_buffer_time = ((_local6 * this.max_buffer_time) * 1.5);
};
if (this._cur_buffer_time < this.min_buffer_time){
this._cur_buffer_time = this.min_buffer_time;
};
if (this._stream.time > 1){
this._stream.bufferTime = this._cur_buffer_time;
} else {
this._stream.bufferTime = this._cur_buffer_time;
};
this.startBuffer(this._cur_buffer_time);
};
};
};
} else {
this.stopBuffer();
};
}
private function streamError(_arg1:AsyncErrorEvent):void{
}
public function clear_sideload():void{
sideloading = false;
sideload_ready = true;
try {
side_stream.close();
} catch(e:Error) {
};
}
public function toggle_skip(_arg1:Boolean=false):void{
}
public function seek(_arg1:Number):void{
var _local2:* = (this._stream.bytesLoaded / this._stream.bytesTotal);
this.stopBuffer();
if ((((_local2 >= _arg1)) || (this._is_loaded))){
this._stream.seek((this.duration * _arg1));
if (_arg1 < 0.96){
this._is_finished = false;
};
};
}
public function mouseisdown(_arg1:String):void{
var _local3:Number;
var _local2:Boolean = ((_arg1)=="true") ? true : false;
invalidtime = ((_local2 == "true")) ? true : false;
if (((((!(invalidtime)) && (invalidtime2))) && (invalidtime3))){
if (((this._is_loading) && ((_stream.time <= this.duration)))){
_local3 = ((this._stream.bytesLoaded / this._stream.bytesTotal) * this.duration);
if (this.duration < 6){
_local3 = 5;
};
_stream.seek(Math.max(Math.min((_stream.time - 5), (_local3 - 5)), 0));
_stream.resume();
if (!this._is_playing){
_stream.pause();
};
} else {
if (_stream.time <= (duration + 0.1)){
_stream.play(_filename);
_stream.seek(Math.max(Math.min((_stream.time - 5), (this.duration - 5)), 0));
if (!this._is_playing){
_stream.pause();
} else {
_root.dispatch_play_state(1);
};
};
};
invalidtime = (invalidtime2 = (invalidtime3 = false));
};
invalidtime3 = false;
}
public function hold_play():void{
dontplay = true;
stream_to_controls("controlforcehide");
}
public function sendprogress():void{
stream_to_controls("onStreamProgress", "seekcontrols", [this._stream.time, (this._stream.time / this.duration)]);
}
public function sendvidinfo():void{
}
public function stream_to_controls(_arg1:String, _arg2:String="this", _arg3="none"):void{
if (_stage.getChildByName("controller")){
if (_arg2 == "this"){
if (_arg3 == "none"){
var _local4 = Controller(_stage.getChildByName("controller"));
_local4[_arg1]();
} else {
_local4 = Controller(_stage.getChildByName("controller"));
_local4[_arg1](_arg3);
};
} else {
if (_arg3 == "none"){
_local4 = Controller(_stage.getChildByName("controller"))[_arg2];
_local4[_arg1]();
} else {
_local4 = Controller(_stage.getChildByName("controller"))[_arg2];
_local4[_arg1](_arg3);
};
};
};
}
public function sideload(_arg1:String):void{
if (((this.side_stream) && (_root.enable_preloading))){
side_stream.client = side_client;
side_stream.play(_arg1);
side_stream.pause();
sideloading = true;
} else {
nextflv = _arg1;
};
}
public function streamCuePoint(_arg1:Object):void{
}
public function swapstream():void{
var success:Boolean;
this.vimeo.clear();
this.vimeo.attachNetStream(null);
swapFLV();
if (((this.side_stream) && (_root.enable_preloading))){
if (whichstream == 1){
this._stream = secondstream;
this.side_stream = firststream;
whichstream = 2;
} else {
this._stream = firststream;
this.side_stream = secondstream;
whichstream = 1;
};
this.side_stream.client = side_client;
this._stream.client = clientobj;
var _local2 = side_stream;
with (_local2) {
removeEventListener(ProgressEvent.PROGRESS, streamProgress);
removeEventListener(NetStatusEvent.NET_STATUS, streamNetStatus);
removeEventListener(AsyncErrorEvent.ASYNC_ERROR, streamError);
};
this._is_loading = true;
this.vimeo.attachNetStream(this._stream);
_local2 = this._stream;
with (_local2) {
addEventListener(ProgressEvent.PROGRESS, streamProgress);
addEventListener(NetStatusEvent.NET_STATUS, streamNetStatus);
addEventListener(AsyncErrorEvent.ASYNC_ERROR, streamError);
};
if (meta2 != null){
this.duration = meta2.duration;
this.streamwidth = meta2.width;
this.streamheight = meta2.height;
newRatio();
stream_to_controls("onStreamMetaData", "seekcontrols", meta2);
};
meta2 = null;
this.sideloading = false;
this.sideload_ready = true;
} else {
_filename = nextflv;
if (_root.vizmezon){
success = _root.VMStats.clipviewed();
TweenLite.to(this, 0.1, {alpha:1, onComplete:load});
} else {
load();
};
};
this._timerloader.start();
stream_to_controls("reset_playbar", "seekcontrols");
}
private function streamProgress(_arg1:ProgressEvent):void{
}
public function startseek():void{
startseek_time = _stream.time;
}
private function stopBuffer(){
if (this._is_buffering){
this._cur_buffer_time = 0;
this._is_buffering = false;
if (((!(dontplay)) && (_is_playing))){
this._stream.resume();
};
if (streamstartdelay){
_root.ggEvent(24, [(Math.round((_timerloader.currentCount * 10)) / 10), "BitGravity", Math.round(videodatarate)]);
};
};
}
public function swapFLV():void{
this._timerloader.stop();
this._timer_stream.stop();
this.close();
this._is_loaded = false;
this._is_loading = false;
}
public function load():void{
var url:*;
if (((!(this._is_loaded)) && (!(this._is_loading)))){
_is_complete = 1;
if (((firsttime) && ((is_ad == _root.is_postroll_on)))){
swapped_hideandwait2 = true;
_root.loadercircle_toggle(true);
firsttime = false;
if (!is_ad){
streamstartdelay = true;
};
totalbuffers = 0;
};
this._is_loading = true;
this.vimeo.attachNetStream(this._stream);
if (_root.enable_preloading){
this._stream.client = clientobj;
};
url = this._filename;
var _local2 = this._stream;
with (_local2) {
if (!hasEventListener(ProgressEvent.PROGRESS)){
addEventListener(ProgressEvent.PROGRESS, streamProgress);
addEventListener(NetStatusEvent.NET_STATUS, streamNetStatus);
addEventListener(AsyncErrorEvent.ASYNC_ERROR, streamError);
};
if (url){
play(url);
};
pause();
};
this._timerloader.start();
};
}
public function no_really():void{
_root.play_track = false;
_root.loadercircle_toggle(false);
if (((this._is_finished) || (!(this._is_loaded)))){
return;
};
this._is_finished = true;
this._is_playing = false;
this._is_loading = false;
this._timerloader.stop();
this._timer_stream.stop();
if (_is_complete == 1){
_is_complete = 2;
};
_root.video_off();
}
private function timerStreamLoad(_arg1:TimerEvent):void{
var e = _arg1;
loadPercent = (this._stream.bytesLoaded / this._stream.bytesTotal);
if (((!(is_ad)) || (((is_ad) && (_root.is_postroll_on))))){
stream_to_controls("onStreamLoading", "seekcontrols", String(loadPercent));
};
if (loadPercent == 1){
this._is_loaded = true;
this._is_loading = false;
this._timerloader.stop();
this.stopBuffer();
if (!is_ad){
_root.postroll_preload();
} else {
_root.postroll_loaded = true;
};
streamstartdelay = false;
};
try {
if ((((((duration > 0)) && ((((loadPercent * duration) - _stream.time) > 10)))) && (_root.loadinggraphic.visible))){
_root.loadercircle_toggle(false);
};
} catch(e:Error) {
};
}
public function pause():void{
slomo_paused = false;
this._is_playing = false;
this._stream.pause();
this._timer_stream.stop();
}
public function close():void{
this._is_finished = true;
this._is_playing = false;
this._is_loaded = false;
this._is_loading = false;
this._timerloader.stop();
this._timer_stream.stop();
this.lastduration = this.duration;
this.duration = 0;
if (_is_complete == 1){
_is_complete = 2;
};
this._stream.close();
}
}
}//package com.vidplayer.vidstuff
Section 50
//BasePlayer (com.vidplayer.BasePlayer)
package com.vidplayer {
import flash.text.*;
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.net.*;
import com.nielsen.*;
import com.vidplayer.utilities.*;
import com.arthropod.*;
import com.vidplayer.utilities.loader.*;
import com.vidplayer.gui.*;
import com.vidplayer.vidstuff.*;
import flash.ui.*;
import flash.system.*;
import flash.external.*;
public class BasePlayer extends MoogaSprite {
public var st_h:Number;
public var st_w:Number;
public var cont_play:Boolean;// = false
public var VMStats;
public var loadinggraphic:LoadingGraphic;
public var pixel_url:String;
public var border:int;// = 0
public var show_fullscreen:Boolean;// = false
public var bgcolor:Number;// = 2987963
public var jukebox_w:int;// = 640
public var kill_ze_stats:Boolean;// = false
public var had_postroll:Boolean;// = false
public var chmaincontrols;
public var loop_starttime:Number;// = -1
public var xml_config:XML;
public var postrollclass;
public var play_track:Boolean;// = false
public var mainvol:Number;// = 50
public var jQuery_branch:Boolean;// = false
public var choice_stats:ContextMenuItem;
public var notfound:NotFound;
public var nodeID:String;// = ""
public var gPostroll;
public var is_postroll_on:Boolean;// = false
public var has_sidebar:Boolean;// = false
public var looping:Boolean;// = false
public var version:String;// = "12/21/9 15:30"
public var postroll_vidwatched:int;// = 0
public var end_track:Boolean;// = false
public var rootparams:Object;
public var xmlloader:GCSafeURLLoader;
public var choice_startloop:ContextMenuItem;
public var curdomain:String;// = ""
public var gglastfull:Boolean;// = false
public var has_preroll:Boolean;// = false
public var loadertimer:Timer;
public var is_preroll_on:Boolean;// = false
public var timestamp:Number;
public var choice_ads:ContextMenuItem;
public var has_postroll:Boolean;// = false
public var background:Shape;
public var SERVER:String;// = "www.collegehumor.com"
public var last_tracked_pixel:String;// = ""
public var choice_slomo:ContextMenuItem;
public var ext_loadvid:Boolean;// = false
public var choice_clearloop:ContextMenuItem;
public var video_id:String;
public var choice_endloop:ContextMenuItem;
public var autoplay:Boolean;// = false
public var postroll_loaded:Boolean;// = false
public var enable_preloading:Boolean;// = true
public var LC:LocalConnection;
public var vizmezon:Boolean;// = false
public var slomo:Boolean;// = false
public var loop_endtime:Number;// = -1
public var adaptv:Boolean;// = false
public var is_video_on:Boolean;// = false
public var last_tracked_id:String;// = ""
public var rating:String;// = "nsfa"
public var chtv:Boolean;// = false
public var bigplaybtn;
public var smartbar:Boolean;// = false
public var kill_ze_ads:Boolean;// = false
public var date:Date;
public var vidpath:String;// = ""
public var mainvid:BaseVideo;
public var last_tracked_time:Number;// = 0
public var playlist:Array;
public var prerollclass;
public var nextvidid:Number;// = -1
public var ssOverlay;
public var gOverlay;
public var CONFIG_PATH_BASE:String;// = "/moogaloop/video:"
public var context_menu:ContextMenu;
public var TESTING:Boolean;// = false
public var is_fullscreen:Boolean;// = false
public var timestamp_start:Number;
public var ggVidplaying:Boolean;// = false
public var EMBED_TRACK_PATH:String;// = "http://track.collegehumor.com/embedded_views/"
public static var playertype:String = "bones";
public static var playerbrand:String = "CH";
public function BasePlayer(_arg1:String="bones", _arg2:String="CH", _arg3:Boolean=false):void{
LC = new LocalConnection();
background = new Shape();
notfound = new NotFound();
loadinggraphic = new LoadingGraphic();
xmlloader = new GCSafeURLLoader();
loadertimer = new Timer(25, 0);
rootparams = new Object();
playlist = new Array();
context_menu = new ContextMenu();
choice_startloop = new ContextMenuItem("Start Loop Here", true);
choice_endloop = new ContextMenuItem("End Loop Here");
choice_clearloop = new ContextMenuItem("Remove Looping", false, true, false);
choice_slomo = new ContextMenuItem("Slo Mo", true);
choice_ads = new ContextMenuItem("No Ads!", false, true, false);
choice_stats = new ContextMenuItem("No Stats!", false, true, false);
playertype = _arg1;
playerbrand = _arg2;
has_sidebar = _arg3;
if (playerbrand == "TBT"){
CONFIG_PATH_BASE = "/betamax:";
SERVER = "www.todaysbigthing.com";
} else {
if ((((playerbrand == "CH")) && ((root.loaderInfo.parameters.visible_measures == "on")))){
vizmezon = true;
enable_preloading = false;
};
};
super();
initialize(root.loaderInfo.parameters);
}
public function shift_for_controls(_arg1:Number):void{
}
public function trackingPixel(_arg1:String, ... _args){
var args:Object;
var trackstring:String;
var d:*;
var cur_time:*;
var time_elapsed:*;
var tmp_url:*;
var track = _arg1;
var pixelargs = _args;
if (playerbrand != "TBT"){
args = (pixelargs[0]) ? pixelargs[0] : {};
trackstring = ((((playertype == "embed")) || ((playertype == "boxad")))) ? "embedded" : "onsite";
track = track.replace("$1", (trackstring + "_"));
track = ((((("_gTrack/vid_" + trackstring) + "/") + video_id) + "/") + track);
d = new Date();
cur_time = Math.round((d.getTime() / 1000));
time_elapsed = (cur_time - timestamp_start);
tmp_url = this.pixel_url;
tmp_url = tmp_url.replace("PENIS_ARGUMENT", track);
tmp_url = tmp_url.replace("PENIS_RANDOM", Math.round((Math.random() * 2147483647)));
tmp_url = tmp_url.replace("PENIS_TIMESTAMP", (timestamp + time_elapsed));
if (last_tracked_pixel == tmp_url){
return (false);
};
last_tracked_pixel = tmp_url;
if (!args.disable_google){
if (ExternalInterface.available){
try {
if (playertype != "embed"){
if (jQuery_branch){
ExternalInterface.call("jument.analysis.track", "play", track, video_id);
} else {
ExternalInterface.call("urchinTracker", track);
};
} else {
Schmoozy.loadurl(tmp_url);
};
} catch(e:Error) {
};
};
};
};
}
public function mouseMove(_arg1:MouseEvent):void{
var event = _arg1;
Mouse.show();
if (is_video_on){
var _local3 = chmaincontrols;
with (_local3) {
seekcontrols.seekchange();
volumecontrols.volchange();
show();
};
};
}
public function redrawloadercircle(_arg1:Number, _arg2:Number):void{
var stw = _arg1;
var sth = _arg2;
var _local4 = loadinggraphic;
with (_local4) {
loadingcircle.rotation = 0;
width = Math.min(((Math.max((sth / 12), (stw / 24), 20) * 222) / 83), 200);
height = ((width * 140) / 222);
x = (stw / 2);
y = (((sth / 2) - 5) + border);
};
}
public function mouseUp(_arg1:Event){
if (chmaincontrols){
chmaincontrols.control_mUp(_arg1);
};
}
public function video_on():void{
is_video_on = true;
var _local2 = chmaincontrols;
with (_local2) {
if (((ssOverlay) && ((ssOverlay.delayed < 2)))){
controlforceshow();
};
changelockmode("false");
};
}
public function secondsToMinutes(_arg1){
if (!_arg1){
_arg1 = 0;
};
var _local2:* = Math.floor((_arg1 / 60));
_arg1 = Math.floor((_arg1 - (_local2 * 60)));
return (((((_local2 < 10)) ? ("0" + _local2) : _local2 + ":") + ((_arg1 < 10)) ? ("0" + _arg1) : _arg1));
}
public function build_context_menu():void{
}
public function dispatch_video_off():void{
}
public function redrawmain(_arg1:Number, _arg2:Number){
var pooformat:*;
var stw = _arg1;
var sth = _arg2;
var _local4 = background;
with (_local4) {
width = stw;
height = sth;
};
if (notfound){
try {
stage.setChildIndex(notfound, (stage.numChildren - 1));
} catch(e:Error) {
};
_local4 = notfound;
with (_local4) {
if (playertype != "boxad"){
pooformat = new TextFormat();
pooformat.bold = true;
message_text.setTextFormat(pooformat);
};
y = (5 + border);
x = (((stw - width) / 2) + border);
};
};
redrawloadercircle(stw, sth);
}
public function playstater(_arg1:Boolean):void{
ggEvent((_arg1) ? 5 : 6, [mainvid._stream.time]);
}
public function smartBarReady():void{
}
public function hide_more():void{
}
public function alldone_continuous():void{
startcountdownsequence(true);
}
public function nextstream():String{
var _local1:int;
while (_local1 < playlist.length) {
if ((((playlist[_local1][1] == video_id)) && (!((_local1 == (playlist.length - 1)))))){
return (playlist[(_local1 + 1)][1]);
};
_local1++;
};
return ("-1");
}
public function loadMainVideoXMLError(_arg1:Event):void{
var event = _arg1;
var _local3 = xmlloader;
with (_local3) {
removeEventListener(Event.COMPLETE, loadMainVideoXMLComplete);
removeEventListener("noload", loadMainVideoXMLError);
};
debug("The XML feed came up blank 3 times", 16729156);
try {
if (!(mainvid._stream.time) == 0){
notfound.visible = true;
mainvid.clear_sideload();
};
} catch(e:Error) {
notfound.visible = true;
};
resize();
}
public function debug(_arg1:String, _arg2:Number=0xFFFFFF):void{
Debug.log(_arg1, _arg2);
}
public function video_pressed():void{
}
public function start_loop(_arg1:ContextMenuEvent):void{
looping = true;
if (loop_endtime == -1){
loop_endtime = 1;
};
loop_starttime = Math.min((mainvid._stream.time / mainvid.duration), loop_endtime);
choice_clearloop.visible = true;
}
public function fucking_comscore():void{
var _local1:GCSafeLoader = new GCSafeLoader();
_local1.loadthis("http://b.scorecardresearch.com/b?c1=1&c2=6511178&c3=&c4=&c5=&c6=&c15=&cv=1.3&cj=1", null, null, true);
}
public function dispatch_play_state_more(_arg1:Boolean, _arg2:Boolean=false):void{
}
public function loadercircle_toggle(_arg1:Boolean){
var onoff = _arg1;
if (playerbrand != "TBT"){
redrawloadercircle(st_w, st_h);
stage.setChildIndex(loadinggraphic, (stage.numChildren - 1));
if (((has_preroll) && (is_preroll_on))){
stage.setChildIndex(prerollclass, (stage.numChildren - 1));
};
if (onoff){
var _local3 = loadinggraphic;
with (_local3) {
visible = true;
alpha = ((alpha)>0) ? alpha : 0.9;
};
loadertimer.addEventListener(TimerEvent.TIMER, loadercircle_rotate);
loadertimer.start();
} else {
loadertimer.reset();
loadertimer.removeEventListener(TimerEvent.TIMER, loadercircle_rotate);
_local3 = loadinggraphic;
with (_local3) {
visible = false;
alpha = 0;
};
};
};
}
public function loadercircle_rotate(_arg1:TimerEvent):void{
var t = _arg1;
var _local3 = loadinggraphic;
with (_local3) {
loadingcircle.rotation = ((loadertimer.currentCount % 30) * 12);
alpha = ((Math.abs(Math.cos(((loadingcircle.rotation / 360) * Math.PI))) / 2) + 0.4);
};
}
public function loadMainVideoXML(_arg1:String){
var vidXMLpath = _arg1;
var _local3 = xmlloader;
with (_local3) {
addEventListener(Event.COMPLETE, loadMainVideoXMLComplete);
addEventListener("noload", loadMainVideoXMLError);
loadthis(vidXMLpath);
if (smartbar){
smartBarReady();
};
};
}
public function initialize_controls():void{
}
public function fullscreenchanged(_arg1:FullScreenEvent):void{
is_fullscreen = !(is_fullscreen);
chmaincontrols.fullscreenchanged();
}
public function alldone():void{
chmaincontrols.controlforcehide();
chmaincontrols.changelockmode("false");
if (cont_play){
alldone_continuous();
} else {
alldone_standard();
};
}
public function pick_domain(_arg1:String, _arg2:String):Boolean{
SERVER = (_arg1) ? _arg1 : _arg2;
curdomain = LC.domain;
if ((((curdomain == "localhost")) || (((_arg1) && ((((_arg1.indexOf("www.todaysbigthing.dev") > -1)) || ((_arg1.indexOf("www.collegehumor.dev") > -1)))))))){
build_context_menu();
};
debug((((((("~~ " + String(playerbrand)) + " ") + String(playertype)) + " | ver. ") + String(version)) + " ~~"), 16768477);
if ((((((((curdomain.indexOf(SERVER.substring(4, (SERVER.length - 4))) > -1)) || ((curdomain.indexOf(("media." + SERVER.substring(4))) > -1)))) && (!((curdomain == SERVER))))) || ((curdomain == "localhost")))){
debug(((("server given: " + String(_arg1)) + ", current domain: ") + String(curdomain)), 11206570);
if (((((!((curdomain == "localhost"))) && (!(_arg1)))) && ((curdomain.indexOf(("media." + SERVER.substring(4))) == -1)))){
SERVER = curdomain;
debug(("server changed to current domain: " + SERVER), 11206570);
} else {
debug(("server stays as: " + SERVER), 11206570);
};
};
return (true);
}
public function initialize_more():void{
}
public function interlude(_arg1:Boolean, _arg2:Boolean=true):void{
var onoff = _arg1;
var countdowned = _arg2;
if (!onoff){
mainvid.vid_overlay.alpha = 1;
var _local4 = chmaincontrols.seekcontrols;
with (_local4) {
visible = true;
alpha = 1;
};
} else {
mainvid.vid_overlay.visible = (mainvid.mainthumb.visible = false);
loadercircle_toggle(true);
if ((((playerbrand == "CH")) && (bigplaybtn))){
bigplaybtn.visible = false;
};
};
}
public function dispatch_play_state(_arg1:int=-1, _arg2:Boolean=false, _arg3:Boolean=false):void{
if (mainvid){
if (_arg1 == -1){
_arg1 = (mainvid._is_playing) ? 0 : 1;
};
};
if (((_arg3) && (ggVidplaying))){
playstater((_arg1 > 0));
};
var _local4:Boolean = ((_arg1)==1) ? true : false;
if (((has_preroll) && (prerollclass.prethumb.visible))){
prerollclass.keeptop();
bigplaybtn.play_state(true);
} else {
if (mainvid){
tpacheck_4();
mainvid.play_state(_local4);
chmaincontrols.play_state(_local4);
dispatch_play_state_more(_local4, _arg2);
};
};
}
public function resize(_arg1:Event=null):void{
st_w = stage.stageWidth;
st_h = stage.stageHeight;
st_h = (has_sidebar) ? (stage.stageHeight - 2) : stage.stageHeight;
st_w = (((((has_sidebar) && ((st_w > jukebox_w)))) && (!(is_fullscreen)))) ? jukebox_w : st_w;
this.redrawmain(st_w, st_h);
chmaincontrols.redraw(st_w, st_h, border);
if (mainvid){
mainvid.redraw(st_w, st_h);
};
}
public function onPlayheadUpdate():void{
}
public function send_dur(_arg1:Number=0):void{
}
public function whatvid():void{
if (playerbrand != "TBT"){
video_id = (rootparams.clip_id) ? rootparams.clip_id : video_id;
} else {
video_id = (rootparams.item_id) ? rootparams.item_id : video_id;
bgcolor = (rootparams.color) ? rootparams.color : bgcolor;
chmaincontrols.changecolor(bgcolor);
};
var _local1:String = (rootparams.newplaylist) ? rootparams.newplaylist : ("," + video_id);
change_playlist(_local1);
if (playlist.length > 1){
toggle_continuous(true);
};
if (video_id != null){
if (video_id.length < 1){
debug("Didn't get clip_id, asking playlist.js for help", 16777028);
ext_getId();
} else {
main_loaded();
};
ggEvent(51, [((("http://" + SERVER) + "/video:") + video_id)]);
} else {
debug("No Video Id, THXBYE", 0xFF0000);
notfound.visible = true;
resize();
};
}
public function toggle_slomo(_arg1:ContextMenuEvent):void{
slomo = !(slomo);
choice_slomo.caption = (slomo) ? "Normal Speed" : "Slo Mo";
}
public function startcountdownsequence(_arg1:Boolean):void{
nextvidid = -1;
nextvidid = Number(nextstream());
if (nextvidid >= 0){
load_video(nextvidid, true);
} else {
alldone_standard();
};
nextvidid = -1;
}
public function alldone_standard():void{
is_video_on = true;
is_postroll_on = false;
video_on();
chmaincontrols.changelockmode("bones");
mainvid.vid_overlay.visible = true;
if (has_postroll){
postrollclass.postvid_overlay.visible = false;
chmaincontrols.seekcontrols.reset_playbar();
mainvid.seek(0);
};
if (has_preroll){
mainvid.prerollagain = (prerollclass.prerollagain = true);
};
dispatch_play_state(0);
}
public function toggle_continuous(_arg1:Boolean, _arg2:String="false"):void{
if (cont_play != _arg1){
cont_play = _arg1;
};
}
public function loadMainVideoXMLComplete(_arg1:Event=null):void{
var event = _arg1;
var _local3 = xmlloader;
with (_local3) {
removeEventListener(Event.COMPLETE, loadMainVideoXMLComplete);
try {
xml_config = XML(data);
} catch(e:Error) {
};
data = null;
};
try {
if (jQuery_branch){
xml_config.volume = ExternalInterface.call("$.cookie", "moogaloop_volume");
} else {
xml_config.volume = ExternalInterface.call("readCookie", "moogaloop_volume");
};
if ((((((xml_config.volume == null)) || ((xml_config.volume == "undefined")))) || ((xml_config.volume == "")))){
debug("No volume cookie", 0xDDDDDD);
xml_config.volume = 70;
};
debug((("Volume percent cookie: " + String(xml_config.volume)) + "%"), 0xDDDDDD);
} catch(e:Error) {
xml_config.volume = 70;
debug("No volume cookie", 0xDDDDDD);
};
if (playertype == "boxad"){
autoplay = true;
xml_config.volume = 0;
chmaincontrols.volumecontrols.togglemute();
};
if (playerbrand == "CH"){
try {
mainvol = (TESTING) ? 0 : xml_config.volume;
volume_set(mainvol);
if (has_preroll){
prerollclass.setVol(mainvol);
};
nodeID = xml_config.video.nodeId;
} catch(e:Error) {
};
};
if ((((xml_config == null)) || ((xml_config == "BIG Thing could not be found.")))){
xmlloader.loadfailcount++;
if (xmlloader.loadfailcount < 3){
loadMainVideoXML(vidpath);
} else {
debug("The XML feed came up blank 3 times.", 16729156);
if (!(mainvid._stream.time) == 0){
notfound.visible = true;
mainvid.clear_sideload();
};
resize();
};
} else {
xmlloader.removeEventListener("noload", loadMainVideoXMLError);
Schmoozy.gotourl = xml_config.video.url;
if (playerbrand != "TBT"){
Schmoozy.gotourl = xml_config.video.url;
pixel_url = xml_config.tracking_pixel;
timestamp = xml_config.timestamp;
} else {
Schmoozy.gotourl = xml_config.url;
pixel_url = "";
};
loadMainVideo();
};
}
public function streamprogressPixel(_arg1:Number):void{
var _local2:Number;
if (((!((playerbrand == "TBT"))) && (!(is_postroll_on)))){
_local2 = (Math.floor((_arg1 / 10)) * 10);
if ((((_local2 >= 0)) && (!((_local2 == last_tracked_time))))){
ggEvent(49, [Math.round(mainvid._stream.time)]);
if (playertype != "embed"){
trackingPixel(("$1time/" + secondsToMinutes(_local2)), {disable_nielson:true});
};
trackingPixel("$1time", {disable_google:true, dav:((_local2 > 5)) ? 1 : 0});
last_tracked_time = _local2;
};
};
}
public function mainvideofinished():void{
ggEvent(7, [mainvid.duration]);
mainvid.lastduration = 0;
alldone();
}
public function postroll_preload():void{
}
public function toggle_ze_ads(_arg1:ContextMenuEvent):void{
kill_ze_ads = !(kill_ze_ads);
choice_ads.caption = (kill_ze_ads) ? "Bring Back Ads!" : "No Ads!";
}
public function toggle_ze_stats(_arg1:ContextMenuEvent):void{
kill_ze_stats = !(kill_ze_stats);
choice_stats.caption = (kill_ze_stats) ? "Bring Back Stats!" : "No Stats!";
}
public function mouseLeave(_arg1:Event=null):void{
if (chmaincontrols){
chmaincontrols.hide();
};
}
public function main_loaded():void{
loadMainVideoXML((CONFIG_PATH_BASE + video_id));
}
public function clear_loop(_arg1:ContextMenuEvent):void{
looping = false;
loop_starttime = (loop_endtime = -1);
choice_clearloop.visible = false;
}
public function watch_gOverlay():void{
}
public function dispatch_prerollagain(_arg1:Boolean):void{
chmaincontrols.showprerollagain(_arg1);
mainvid.showprerollagain(_arg1);
if (has_preroll){
prerollclass.showprerollagain(_arg1);
};
}
public function ext_getId():void{
}
public function change_playlist(_arg1:String):void{
var _local2:Array = _arg1.replace("%20", "\"").split("||");
var _local3:Array = new Array();
var _local4:Array = new Array();
var _local5:int;
while (_local5 < _local2.length) {
_local4 = _local2[_local5].split(",");
_local3[_local5] = _local4;
_local5++;
};
playlist = _local3;
if (playlist.length > 1){
debug(("Playlist: " + String(playlist)), 0xFF00FF);
};
}
public function end_loop(_arg1:ContextMenuEvent):void{
looping = true;
if (loop_starttime == -1){
loop_starttime = 0;
};
loop_endtime = Math.max((mainvid._stream.time / mainvid.duration), loop_starttime);
choice_clearloop.visible = true;
}
override public function initialize(_arg1:Object):void{
var newparams = _arg1;
rootparams = newparams;
date = new Date();
timestamp_start = Math.round((date.getTime() / 1000));
Debug.password = "fuckyouben";
var kosher_domain:Boolean;
if (playerbrand != "TBT"){
kosher_domain = pick_domain(rootparams.server, "www.collegehumor.com");
} else {
kosher_domain = pick_domain(rootparams.data, "www.todaysbigthing.com");
};
Security.allowDomain(SERVER);
Security.allowDomain("*");
st_h = (has_sidebar) ? (stage.stageHeight - 2) : stage.stageHeight;
st_w = (((((has_sidebar) && ((stage.stageHeight > jukebox_w)))) && (!((stage.displayState == StageDisplayState.FULL_SCREEN))))) ? jukebox_w : stage.stageWidth;
var _local3 = background.graphics;
with (_local3) {
beginFill(0);
drawRect(1, 1, st_w, st_h);
endFill();
};
this.addEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
}
public function ggEvent(_arg1:int, _arg2:Array):void{
var _local4:ggCom;
var _local3:int;
while (_local3 < 4) {
if (((!(_arg2[_local3])) && (!((_arg2[_local3] == 0))))){
_arg2[_local3] = "";
};
_local3++;
};
if ((((_arg1 == 3)) && ((_arg2[1] == "content")))){
ggVidplaying = true;
} else {
if ((((((_arg1 == 7)) || ((_arg1 == 4)))) && ((_arg2[1] == "content")))){
ggVidplaying = false;
};
};
if (((((!((_arg1 == 10))) || ((((_arg1 == 10)) && (!((Boolean(_arg2[0]) == gglastfull))))))) && (((!((_arg1 == 5))) || ((((_arg1 == 5)) && (ggVidplaying))))))){
if (((!((_arg1 == 8))) || ((((_arg1 == 8)) && (!((_arg2[0] == _arg2[1]))))))){
if (playerbrand == "CH"){
_local4 = ggCom.getInstance();
if ((((playertype == "embed")) || ((playertype == "boxad")))){
_local4._nolggGlobalParams.clientid = "us-501784";
};
if (TESTING){
_local4._nolggGlobalParams.clientid = "us123456";
_local4._nolggGlobalParams.vcid = "BendCH";
};
_local4.PM(_arg1, _arg2[0], _arg2[1], _arg2[2], _arg2[3]);
if (_arg1 != 49){
};
};
};
};
if (_arg1 == 10){
gglastfull = Boolean(_arg2[0]);
};
}
public function loadcontrols():void{
var browser:String;
initialize_controls();
chmaincontrols.visible = false;
try {
if (ExternalInterface.available){
try {
browser = ExternalInterface.call("function a() { return navigator.userAgent; } ");
debug(("User agent: " + browser), 11206570);
if (((((!((browser == null))) && ((browser.indexOf("Firefox/3") > -1)))) && ((browser.indexOf("Mac OS X 10.4") > -1)))){
chmaincontrols.keepon = true;
};
} catch(e:Error) {
};
};
} catch(f:Error) {
};
}
override public function onAddedToStage(_arg1:Event=null):void{
var e = _arg1;
stage.addChild(background);
loadcontrols();
initialize_more();
notfound.visible = false;
stage.addChild(notfound);
if (chmaincontrols){
chmaincontrols.controlforcehide();
};
this.removeEventListener(Event.ADDED_TO_STAGE, onAddedToStage);
var _local3 = stage;
with (_local3) {
align = StageAlign.TOP_LEFT;
scaleMode = StageScaleMode.NO_SCALE;
addEventListener(Event.RESIZE, resize);
addEventListener(MouseEvent.MOUSE_UP, mouseUp);
addEventListener(MouseEvent.MOUSE_MOVE, mouseMove);
addEventListener(Event.MOUSE_LEAVE, mouseLeave);
addEventListener(FullScreenEvent.FULL_SCREEN, fullscreenchanged);
};
CONFIG_PATH_BASE = (("http://" + SERVER) + CONFIG_PATH_BASE);
autoplay = (((rootparams.autoplay == 1)) || ((((rootparams.autostart == "true")) && (!((playertype == "embed"))))));
show_fullscreen = (((rootparams.fullscreen == 1)) || ((rootparams.fullscreen == "true")));
chmaincontrols.showfullscreen(show_fullscreen);
loadinggraphic.visible = false;
stage.addChild(loadinggraphic);
whatvid();
}
public function video_off():void{
is_video_on = false;
if (!end_track){
trackingPixel("$1time", {disable_google:true, dav:2});
trackingPixel("$1time/$1end");
end_track = true;
};
mainvideofinished();
dispatch_video_off();
mainvid.playtrackready = true;
}
public function tpacheck_1():void{
}
public function tpacheck_5(_arg1:Number):void{
}
public function tpacheck_6():void{
}
public function volume_set(_arg1:Number){
var perc = _arg1;
mainvol = perc;
var _local3 = chmaincontrols;
with (_local3) {
volumecontrols.volset(perc);
};
if (mainvid){
mainvid.setVolume(mainvol);
};
if (has_postroll){
postrollclass.volume_adjusted(perc);
};
}
public function tpacheck_4(_arg1:Boolean=false):void{
}
public function tpacheck_2():Boolean{
return (false);
}
public function tpacheck_3():void{
}
public function load_video(_arg1:Number, _arg2:Boolean=false):void{
if (_arg1 != Number(video_id)){
debug((("Video Id" + String(_arg1)) + " is starting"), 0xFF00FF);
interlude(true, _arg2);
if (chmaincontrols.seekcontrols){
chmaincontrols.seekcontrols.progresspercent = 0;
};
video_id = String(_arg1);
vidpath = (CONFIG_PATH_BASE + video_id);
if (had_postroll){
postroll_vidwatched = 0;
};
ext_loadvid = true;
if (((!(mainvid.sideload_ready)) && (mainvid.sideloading))){
autoplay = true;
resize();
video_on();
};
if (mainvid.duration){
ggEvent(4, [mainvid.duration, "content"]);
};
mainvid.lastduration = 0;
ggEvent(7, [mainvid.duration]);
loadMainVideoXML(vidpath);
};
}
public function playtracking(_arg1:Boolean=true):void{
var _local2:String;
if (!TESTING){
fucking_comscore();
};
if (((!(play_track)) && (!((playerbrand == "TBT"))))){
if (last_tracked_id == video_id){
ggEvent(4, [mainvid.duration, "content"]);
ggEvent(3, [mainvid._filename, "content", mainvid.ggmeta]);
ggEvent(5, [0]);
};
last_tracked_id = video_id;
play_track = true;
trackingPixel("$1time/$1start");
if (_arg1){
_local2 = Schmoozy.encode(("node_id=" + nodeID));
trackingPixel(("embedded_view/" + _local2));
Schmoozy.loadurl((EMBED_TRACK_PATH + _local2));
debug((("embed_track: " + EMBED_TRACK_PATH) + _local2));
};
};
}
public function loadMainVideo():void{
if (!mainvid){
mainvid = new BaseVideo(stage, this, xml_config);
if (vizmezon){
var _local2 = VMStats;
with (_local2) {
if (firsttime){
firsttime = false;
init(this, stage);
};
getclipInfo();
};
};
stage.addChild(mainvid);
} else {
if (mainvid.sideload_ready){
mainvid.parse_video(xml_config);
mainvid.prepare_video(true);
} else {
if (mainvid.sideloading){
mainvid.prepare_video(true);
} else {
mainvid.parse_video(xml_config);
};
};
if (vizmezon){
_local2 = VMStats;
with (_local2) {
if (firsttime){
firsttime = false;
init(this, stage);
};
getclipInfo();
};
};
};
if (ext_loadvid){
mainvid.playtrackready = false;
playtracking();
ext_loadvid = false;
};
xml_config = null;
}
}
}//package com.vidplayer
Section 51
//Betamax (com.vidplayer.Betamax)
package com.vidplayer {
import flash.external.*;
public class Betamax extends Moogaloop {
public var preroll_hack:Boolean;// = false
public function Betamax(_arg1:String="bones"):void{
super(_arg1, "TBT");
}
override public function mainvideofinished():void{
if (((has_postroll) && (((!((postrollclass._filename == ""))) || (gPostroll.enabled))))){
if (gPostroll.enabled){
gPostroll.active = true;
};
if (gPostroll.active){
if (gPostroll.ready){
watch_gPostroll();
} else {
gPostroll.autoplay = true;
if (!gPostroll.loading){
gPostroll.load();
};
};
} else {
var _local2 = postrollclass;
with (_local2) {
togglecountdown(true, false);
updatecountdown();
redrawcountdown(st_w, st_h);
onCountdownOver();
watchpostroll();
};
};
} else {
has_postroll = false;
postrollclass._filename = "";
alldone();
};
}
override public function finishpostroll():void{
has_postroll = false;
postrollclass._filename = "";
super.finishpostroll();
}
override public function alldone():void{
if (gPostroll.active){
gPostroll.active = (gPostroll.enabled = false);
};
super.alldone();
}
override public function dispatch_play_state(_arg1:int=-1, _arg2:Boolean=false, _arg3:Boolean=false):void{
var switchit:String;
var newval:Number;
var state = _arg1;
var hidepause = _arg2;
var manual = _arg3;
if (mainvid){
if (state == -1){
state = (mainvid._is_playing) ? 0 : 1;
};
};
var onoff:Boolean = ((state)==1) ? true : false;
if (((((onoff) && (!(preroll_hack)))) && (((has_postroll) || (gPostroll.enabled))))){
switchit = "0";
if (((ExternalInterface.available) && ((playertype == "internal")))){
try {
switchit = String(ExternalInterface.call("readCookie", "tbt_prerollcounter"));
debug(String(switchit));
newval = ((switchit)=="") ? 1 : (Number(switchit) + 1);
debug(String(newval));
ExternalInterface.call("setCookie", "tbt_prerollcounter", String(newval), 30);
} catch(e:Error) {
};
};
debug(("preroll counter: " + String(switchit)), 0xDD8800);
if ((Number(switchit) % 4) == 1){
preroll_switcheroo();
} else {
has_postroll = (gPostroll.enabled = (had_postroll = false));
postrollclass._filename = "";
super.dispatch_play_state(state, hidepause, manual);
};
} else {
super.dispatch_play_state(state, hidepause, manual);
};
}
override public function loadMainVideo():void{
if (bbe_loading == 1){
bbe_loading = 2;
};
super.loadMainVideo();
if (gPostroll.enabled){
gPostroll.active = true;
if (!gPostroll.ready){
if (!gPostroll.loading){
gPostroll.load();
};
};
};
}
public function preroll_switcheroo():void{
dispatch_play_state(0);
mainvid.vid_overlay.visible = (mainvid.mainthumb.visible = false);
preroll_hack = true;
var _local1:String = video_id;
video_id = "300";
cont_play = (autoplay = true);
var _local2:String = ("Preroll Holder,300||Main Video," + _local1);
change_playlist(_local2);
video_off();
}
}
}//package com.vidplayer
Section 52
//BetamaxEmbed (com.vidplayer.BetamaxEmbed)
package com.vidplayer {
import com.vidplayer.gui.outro.*;
import com.vidplayer.vidstuff.*;
public class BetamaxEmbed extends Betamax {
public var embed_track:Boolean;// = false
public var outro:OutroTBT;
public function BetamaxEmbed():void{
super("embed");
}
override public function dispatch_play_state_more(_arg1:Boolean, _arg2:Boolean=false):void{
outro.play_state(_arg1);
}
override public function preroll_switcheroo():void{
super.preroll_switcheroo();
EmbeddedVideo(mainvid).videotitle.visible = false;
}
override public function alldone_standard():void{
outro.visible = true;
mainvid.vid_overlay.visible = true;
chmaincontrols.controlforcehide();
stage.removeChild(chmaincontrols);
super.is_video_on = false;
super.dispatch_play_state(0);
mainvid.shrink_for_outro();
chmaincontrols.seekcontrols.reset_playbar();
}
override public function loadMainVideo():void{
if (((atlas_fallback) || ((rootparams.call_atlas == "true")))){
};
if (bbe_loading == 1){
bbe_loading = 2;
};
if (!mainvid){
outro = new OutroTBT(stage, super.xml_config, super.video_id, super.SERVER);
var _local2 = outro;
with (_local2) {
visible = false;
shiftdownforbanner(30);
};
nodeID = super.xml_config.video.nodeId;
mainvid = new EmbeddedVideo(stage, this, super.xml_config);
if (gPostroll.enabled){
gPostroll.active = true;
if (!gPostroll.ready){
if (!gPostroll.loading){
gPostroll.load();
};
};
};
} else {
if (mainvid.sideload_ready){
mainvid.parse_video(xml_config);
mainvid.prepare_video(true);
} else {
if (mainvid.sideloading){
mainvid.prepare_video(true);
} else {
mainvid.parse_video(xml_config);
};
};
};
super.xml_config = null;
}
override public function redraw_more():void{
if (outro){
outro.redraw(super.st_w, super.st_h);
};
}
override public function video_pressed():void{
outro.video_pressed();
}
}
}//package com.vidplayer
Section 53
//Moogaloop (com.vidplayer.Moogaloop)
package com.vidplayer {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import com.vidplayer.utilities.*;
import com.vidplayer.vidstuff.TPA.*;
import com.vidplayer.utilities.loader.*;
import com.vmc.integration.*;
import com.vidplayer.gui.maincontrols.*;
import com.vidplayer.gui.pausecontrols.*;
import com.vidplayer.vidstuff.*;
import flash.ui.*;
import flash.external.*;
public class Moogaloop extends BasePlayer {
public var postroll_firstwatch:Boolean;// = true
public var smartBar:MovieClip;
public var overlay_vericount_pixel:String;// = ""
public var postrolltrigger_time:Number;// = 10
public var atlas_fallback:Boolean;// = false
public var bbe_loading:int;// = 0
public var postrolltrigger_views:Number;// = 1
public var smartloader:GCSafeLoader;
public var countdowntimer:Timer;
public var nextvid_afterpostroll:Boolean;// = false
public var bbe_noworko:int;// = 0
public var vidqueued:int;// = -1
public var postrollcounter_time:Number;// = 0
public var postroll_vericount_pixel:String;// = ""
public var overlay_tracking_pixel:String;// = ""
public var postroll_tracking_pixel:String;// = ""
public var bumper_tracking_pixel:String;// = ""
public var bbe_loader:GCSafeURLLoader;
public var postrollcounter_views:Number;// = 0
public var newvid_after_preroll:Number;// = -1
public var dammit_what_now:Boolean;// = false
public var recordbitrate:Boolean;// = false
public function Moogaloop(_arg1:String="bones", _arg2:String="CH", _arg3:Boolean=false):void{
var playtype = _arg1;
var playbrand = _arg2;
var $has_sidebar = _arg3;
countdowntimer = new Timer(25, 200);
bbe_loader = new GCSafeURLLoader();
smartloader = new GCSafeLoader();
super(playtype, playbrand, $has_sidebar);
if ((((playerbrand == "CH")) && (!((playertype == "boxad"))))){
vizmezon = !(TESTING);
enable_preloading = false;
};
gPostroll = new gAd("video");
gOverlay = new gAd("graphical_overlay");
ssOverlay = new ssAd("graphical overlay");
VMStats = new VizMez();
if ((((playerbrand == "TBT")) || ((playerbrand == "LS")))){
gOverlay.enabled = (gPostroll.enabled = false);
ssOverlay.enabled = false;
};
if (ExternalInterface.available){
try {
if ((((playerbrand == "CH")) && ((playertype == "bones")))){
ExternalInterface.addCallback("load_video", prepare_video);
};
ExternalInterface.addCallback("disable_autoplay", disable_autoplay);
ExternalInterface.addCallback("player_version", player_version);
} catch(error:Error) {
debug("Can't connect to the Javascript functions, I need to be in a browser", 16729156);
};
};
}
override public function loadMainVideo():void{
if (atlas_fallback){
call_atlas();
};
if (bbe_loading == 1){
bbe_loading = 2;
};
super.loadMainVideo();
}
override public function initialize_controls():void{
if (playerbrand == "CH"){
chmaincontrols = new CHMainControls(stage, SERVER);
} else {
if (playerbrand == "TBT"){
chmaincontrols = new TBTMainControls(stage, SERVER);
};
};
}
public function disable_autoplay():void{
autoplay = false;
dispatch_play_state(0);
}
override public function mouseLeave(_arg1:Event=null):void{
if (chmaincontrols){
chmaincontrols.hide();
};
}
override public function shift_for_controls(_arg1:Number):void{
var amount = _arg1;
gOverlay.shift(amount);
ssOverlay.shift(amount);
try {
if (((adaptv) && (mainvid.adaptvplayer))){
mainvid.adaptvplayer.shift(amount);
};
} catch(e:Error) {
};
}
public function bbeLoaded(_arg1:Event):void{
var _local3:XML;
var _local4:XML;
bbe_loader.removeEventListener(Event.COMPLETE, bbeLoaded);
bbe_loader.removeEventListener("noload", bbeError);
var _local2:XML = XML(bbe_loader.data);
if ((((_local2.Ad.length() > 0)) && (_local2.InLine))){
debug("BBE Returned");
_local3 = _local2.Ad.InLine[0];
postrollclass.perc0_pixel = _local3.Impression.URL;
debug(("0% pixel =" + String(postrollclass.perc0_pixel)));
for each (_local4 in _local3.TrackingEvents.Tracking) {
switch (String(_local4.@event)){
case "firstQuartile":
postrollclass.perc25_pixel = _local4.URL;
debug(("25% pixel =" + String(postrollclass.perc25_pixel)));
break;
case "midpoint":
postrollclass.perc50_pixel = _local4.URL;
debug(("50% pixel =" + String(postrollclass.perc50_pixel)));
break;
case "complete":
postrollclass.perc100_pixel = _local4.URL;
debug(("100% pixel =" + String(postrollclass.perc100_pixel)));
break;
};
};
postrollclass.postthumblink = _local3.Video.VideoClicks.ClickThrough.URL;
debug(("click_url =" + String(postrollclass.postthumblink)));
postrollclass._filename = _local3.Video.MediaFiles.MediaFile.URL;
debug(("flv =" + String(postrollclass._filename)));
has_postroll = true;
if (playertype != "infinity"){
had_postroll = true;
};
bbe_loading = 0;
} else {
bbeError();
if (bbe_loading == 2){
bbe_loading = 0;
call_atlas();
} else {
bbe_loading = 0;
};
};
}
public function redraw_more():void{
var _local1:*;
if (playerbrand == "CH"){
for each (_local1 in [bigplaybtn, prerollclass, postrollclass]) {
if (_local1){
_local1.redraw(st_w, st_h);
};
};
};
}
override public function build_context_menu():void{
super.build_context_menu();
choice_ads.visible = (choice_stats.visible = true);
}
public function bbeCall():void{
debug("BBE");
bbe_loading = 1;
bbe_loader.addEventListener(Event.COMPLETE, bbeLoaded);
bbe_loader.addEventListener("noload", bbeError);
var _local1:String = ((bbe_noworko)==0) ? "http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|1437|28133|19872|4041|11504||BBEEND|&rdu=head%timestamp%" : "http://tracking2.vindicosuite.com/Tracking/V3/Instream/Impression/?0|1437|28425|20094|4068|11606||BBEEND|%timestamp%";
bbe_loader.loadthis(_local1);
rootparams.postroll_file = "";
}
override public function initialize_more():void{
bigplaybtn = new BigPlayBtn(stage, this);
gPostroll._root = (gOverlay._root = (ssOverlay._root = (VMStats._root = this)));
gPostroll._stage = (gOverlay._stage = (ssOverlay._stage = (VMStats._stage = stage)));
}
override public function mouseMove(_arg1:MouseEvent):void{
var event = _arg1;
Mouse.show();
if (((((((((is_video_on) || (is_postroll_on))) && (!(gPostroll.disable_mousemove)))) && (!(gOverlay.disable_mousemove)))) && (!(ssOverlay.disable_mousemove)))){
if (((!(has_preroll)) || (((has_preroll) && (!(prerollclass.prerollagain)))))){
var _local3 = chmaincontrols;
with (_local3) {
seekcontrols.seekchange();
volumecontrols.volchange();
show();
};
};
};
}
public function check_postrolltriggers():void{
if ((((postrollcounter_time >= postrolltrigger_time)) && ((postrollcounter_views >= postrolltrigger_views)))){
postrolltrigger_time = (rootparams.trigger_t) ? rootparams.trigger_t : 180;
postrolltrigger_views = (rootparams.trigger_v) ? rootparams.trigger_v : 2;
postrollcounter_time = (postrollcounter_views = 0);
debug("Ad is ready to show after this video", 0xFFAA00);
has_postroll = true;
if (!had_postroll){
had_postroll = true;
};
if (postrollclass._filename != ""){
postroll_preload();
};
};
}
public function finishpostroll():void{
try {
stage.removeChild(postrollclass.postvid_overlay);
} catch(e:Error) {
};
postrollclass.togglecountdown(false);
postrollclass.postroll_showbanner(false);
if (!dammit_what_now){
alldone();
};
if (playertype == "infinity"){
has_postroll = false;
postrollclass._filename = "";
};
}
public function prerolldone():void{
if (cont_play){
mainvid.prerollagain = (prerollclass.prerollagain = (has_preroll = false));
};
redrawmain(st_w, st_h);
}
override public function alldone():void{
chmaincontrols.controlforcehide();
chmaincontrols.changelockmode("false");
if (playertype != "bones"){
chmaincontrols.seekcontrols.reset_playbar();
};
if (cont_play){
alldone_continuous();
} else {
if (vidqueued > -1){
load_video(vidqueued);
} else {
alldone_standard();
};
};
}
override public function tpacheck_1():void{
if (gOverlay.enabled){
gOverlay.active = true;
};
if (((ssOverlay.enabled) && (!(ssOverlay.active)))){
if (((!((playertype == "infinity"))) || ((((playertype == "infinity")) && ((ssOverlay.type == "video")))))){
ssOverlay.active = true;
};
};
}
override public function tpacheck_2():Boolean{
if (((gOverlay.pause_mainvid) || (ssOverlay.pause_mainvid))){
if (gOverlay.active){
gOverlay.loadonclick = true;
};
if (ssOverlay.active){
ssOverlay.loadonclick = true;
};
ssOverlay.pause_mainvid = (gOverlay.pause_mainvid = false);
return (true);
//unresolved jump
};
return (false);
}
override public function tpacheck_3():void{
if (((((gOverlay.active) && (!(gOverlay.ready)))) && (!(gOverlay.loading)))){
gOverlay.load();
};
if (((((((gPostroll.active) && (!(gPostroll.ready)))) && (!(gPostroll.loading)))) && (!(gOverlay.active)))){
gPostroll.load();
};
if (((ssOverlay.enabled) && (!(ssOverlay.ready)))){
ssOverlay.initiateScanscout();
};
}
override public function tpacheck_5(_arg1:Number):void{
if (((((gOverlay.active) && (!(gOverlay.loading)))) && (!(gOverlay.ready)))){
gOverlay.load();
chmaincontrols.seekcontrols.ad_bar((10 / _arg1));
};
if (((((ssOverlay.active) && (!(ssOverlay.loading)))) && (!(ssOverlay.ready)))){
if (((!((playertype == "infinity"))) || ((((playertype == "infinity")) && ((ssOverlay.type == "video")))))){
ssOverlay.initiateScanscout();
};
};
}
override public function nextstream():String{
var _local1:int;
while (_local1 < playlist.length) {
if ((((playlist[_local1][1] == video_id)) && (!((_local1 == (playlist.length - 1)))))){
return (playlist[(_local1 + 1)][1]);
};
_local1++;
};
return ("-1");
}
public function gAds_otherstuff():void{
}
override public function tpacheck_6():void{
if (gOverlay.active){
watch_gOverlay();
gOverlay.active = false;
};
}
public function postroll_otherstuff():void{
}
override public function tpacheck_4(_arg1:Boolean=false):void{
if (_arg1){
if (gPostroll.loadonclick){
if (!gOverlay.active){
gPostroll.load();
gPostroll.loadonclick = false;
};
} else {
if (gOverlay.loadonclick){
gOverlay.load();
gOverlay.loadonclick = false;
} else {
if (ssOverlay.loadonclick){
ssOverlay.initiateScanscout();
};
};
};
};
}
public function ad_pixels(_arg1:String){
var _local2:*;
var _local3:String;
if (!kill_ze_stats){
_local2 = _arg1.split("|||");
for each (_local3 in _local2) {
Schmoozy.loadurl(_local3);
debug(("ad pixel: " + _local3), 0x888888);
};
};
}
public function prepare_video(_arg1:Number, _arg2:String="false"):void{
var vid_id = _arg1;
var new_playlist = _arg2;
if (super.is_postroll_on){
if (vid_id != Number(super.video_id)){
nextvidid = vid_id;
var _local4 = postrollclass;
with (_local4) {
if (!gPostroll.active){
togglecountdown(true);
countdownprefix = "Advertisement: The video you just selected will begin ";
updatecountdown();
redrawcountdown(st_w, st_h);
onCountdownOver();
TweenLite.to(postrollcountdown, 0.1, {alpha:1, delay:5, onComplete:onCountdownOut});
};
};
vidqueued = vid_id;
};
} else {
if (super.is_preroll_on){
newvid_after_preroll = vid_id;
} else {
load_video(vid_id);
};
};
}
override public function resize(_arg1:Event=null):void{
st_w = stage.stageWidth;
st_h = stage.stageHeight;
st_h = (has_sidebar) ? (stage.stageHeight - 2) : stage.stageHeight;
st_w = (((((has_sidebar) && ((st_w > jukebox_w)))) && (!((stage.displayState == StageDisplayState.FULL_SCREEN))))) ? jukebox_w : st_w;
this.redrawmain(st_w, st_h);
if (chmaincontrols){
chmaincontrols.redraw(st_w, st_h);
};
if (mainvid){
mainvid.redraw(st_w, st_h);
};
if (gOverlay.ready){
gOverlay.player.setSize(st_w, st_h);
};
if (gPostroll.ready){
gPostroll.player.setSize(st_w, st_h);
};
if (ssOverlay.ready){
ssOverlay.player.setSize(st_w, st_h);
};
redraw_more();
}
override public function send_dur(_arg1:Number=0):void{
VMStats.send_dur(_arg1);
}
override public function main_loaded():void{
if ((((playerbrand == "CH")) || ((playerbrand == "TBT")))){
loadAdVars();
} else {
loadMainVideoXML((CONFIG_PATH_BASE + video_id));
};
}
public function ssAds_otherstuff():void{
}
public function watch_gPostroll():void{
gPostroll.playing = true;
gPostroll.play();
gAds_otherstuff();
is_video_on = false;
is_postroll_on = true;
mainvid.vid_overlay.visible = false;
var _local2 = chmaincontrols;
with (_local2) {
changelockmode("false");
seekcontrols.reset_playbar();
visible = false;
loadercircle_toggle(true);
};
if ((((playerbrand == "CH")) && (bigplaybtn))){
bigplaybtn.visible = false;
};
}
override public function watch_gOverlay():void{
if (gOverlay.ready){
gOverlay.playing = true;
gOverlay.play();
} else {
gOverlay.autoplay = true;
if (!gOverlay.loading){
gOverlay.load();
};
};
stage.setChildIndex(gOverlay.loader, (stage.numChildren - 1));
}
override public function mainvideofinished():void{
ggEvent(7, [mainvid.duration]);
mainvid.lastduration = 0;
if (ssOverlay.delayed == 1){
ssOverlay.delayed = 2;
};
if (((has_postroll) && (!((postrollclass._filename == ""))))){
if (gPostroll.enabled){
gPostroll.active = true;
};
if (gPostroll.active){
if (gOverlay.enabled){
gOverlay.completed();
};
if (ssOverlay.enabled){
ssOverlay.completed();
};
if (gPostroll.ready){
watch_gPostroll();
} else {
gPostroll.autoplay = true;
if (!gPostroll.loading){
gPostroll.load();
};
};
} else {
if (gOverlay.ready){
gOverlay.active = true;
stage.setChildIndex(gOverlay.loader, 2);
VMStats.adevent("gOverlay", "minimize");
gOverlay.minimized = true;
};
if (ssOverlay.ready){
ssOverlay.player.pauseAds();
};
var _local2 = postrollclass;
with (_local2) {
togglecountdown(true, true);
updatecountdown();
redrawcountdown(st_w, st_h);
onCountdownOut();
};
watchpostroll();
};
} else {
alldone();
};
}
public function ext_restartContinuous():void{
}
override public function dispatch_play_state_more(_arg1:Boolean, _arg2:Boolean=false):void{
bigplaybtn.play_state(((_arg1) || (_arg2)));
}
public function bbeError(_arg1:Event=null):void{
bbe_noworko = (bbe_noworko + 1);
bbe_loader.removeEventListener(Event.COMPLETE, bbeLoaded);
bbe_loader.removeEventListener("noload", bbeError);
atlas_fallback = true;
debug("No BBE, Re-calling Atlas");
}
public function flash_variable(_arg1:String, _arg2):void{
var varname = _arg1;
var varvalue = _arg2;
var valuestring:String = String(varvalue);
debug(((("change " + String(varname)) + " to ") + String(valuestring)), 0xFFAA00);
try {
switch (varname){
case "postroll_file":
if (((valuestring) && (!((valuestring == ""))))){
gPostroll.enabled = (gPostroll.active = (gPostroll.loading = (gPostroll.ready = false)));
gOverlay.enabled = (gOverlay.active = (gOverlay.loading = (gOverlay.ready = false)));
if (valuestring == "google"){
valuestring = ((playertype)=="infinity") ? "google_postroll" : "google_overlay";
};
if (valuestring == "google_postroll"){
valuestring = "google";
has_postroll = true;
gPostroll.enabled = true;
gPostroll.maxduration = "30000";
if (vizmezon){
VMStats.getadInfo("gPostroll");
};
} else {
if (valuestring == "google_overlay"){
valuestring = "google";
gOverlay.enabled = true;
if (vizmezon){
VMStats.getadInfo("gOverlay");
};
};
};
if (((((!((valuestring == postrollclass._filename))) && (!((valuestring == "google"))))) && (!((valuestring == "bbe"))))){
postrollclass.swapFLV();
};
if (valuestring == "google"){
debug("Google enabled!", 0xFFAA00);
if (((((mainvid) && ((mainvid.duration > 0)))) && (gOverlay.enabled))){
gOverlay.active = true;
};
if (((((gOverlay.active) && (!(gOverlay.loading)))) && (!(gOverlay.ready)))){
gOverlay.load();
if (((mainvid) && ((mainvid.duration > 0)))){
chmaincontrols.seekcontrols.ad_bar((10 / mainvid.duration));
};
};
} else {
if (valuestring == "bbe"){
if (bbe_noworko < 2){
bbeCall();
};
} else {
postrollclass._filename = valuestring;
postroll_preload();
ext_newpageID(false);
has_postroll = true;
had_postroll = true;
};
};
};
break;
case "overlay":
if (valuestring == "google"){
gOverlay.enabled = true;
if (vizmezon){
VMStats.getadInfo("gOverlay");
};
} else {
if (valuestring == "scanscout"){
ssOverlay.enabled = true;
debug("ScanScout enabled!", 0xFFAA00);
if (((mainvid) && ((mainvid.duration > 0)))){
ssOverlay.initiateScanscout();
};
if (vizmezon){
VMStats.getadInfo("ssOverlay");
};
};
};
break;
case "outro_file":
postrollclass.postthumbimage = valuestring;
postrollclass.reloadThumb();
break;
case "outro_width":
postrollclass.postwidth = Number(valuestring);
postrollclass.redraw(st_w, st_h);
break;
case "outro_height":
postrollclass.postheight = Number(valuestring);
postrollclass.redraw(st_w, st_h);
break;
case "click_url":
postrollclass.postthumblink = valuestring;
break;
case "postroll_tracking_pixel":
postroll_tracking_pixel = valuestring;
if (vizmezon){
VMStats.getadInfo("postroll");
};
break;
case "postroll_vericount_pixel":
postroll_vericount_pixel = valuestring;
break;
};
} catch(e:Error) {
};
}
public function watchpostroll():void{
var jt:Boolean;
postroll_otherstuff();
is_video_on = false;
is_postroll_on = true;
mainvid.vid_overlay.visible = false;
BigPlayBtn(bigplaybtn).play_state(true);
stage.addChild(postrollclass.postvid_overlay);
var _local2 = chmaincontrols;
with (_local2) {
changelockmode("true");
seekcontrols.reset_playbar();
};
_local2 = postrollclass;
with (_local2) {
postvid_overlay.visible = true;
startVideo(mainvol);
};
stage.swapChildren(postrollclass.postvid_overlay, chmaincontrols);
if (((cont_play) && ((playerbrand == "CH")))){
jt = !(nextvid_afterpostroll);
postrollclass.togglecountdown(true, jt);
};
}
public function call_atlas():void{
atlas_fallback = false;
var _local1:Atlas = new Atlas(this);
if (xml_config){
_local1.fill_atlas(String(xml_config.video.rating), ((xml_config.video.chtv)=="true") ? true : false, "yes", "yes", false);
} else {
_local1.fill_atlas(rating, chtv, "yes", "yes", false);
};
}
public function ext_newpageID(_arg1:Boolean):void{
}
public function loadAdVars():void{
if (rootparams.overlay == "smartbar"){
smartloader.loadthis("path to smartbar.swf", onSmartBarLoaded);
};
if (rootparams.postroll_file == "adaptv"){
adaptv = true;
rootparams.postroll_file = false;
};
if ((((((rootparams.postroll_file == "google")) && ((playertype == "infinity")))) || ((rootparams.postroll_file == "google_postroll")))){
rootparams.postroll_file = "google";
gPostroll.enabled = true;
gPostroll.maxduration = (rootparams.postroll_duration) ? rootparams.postroll_duration : "30000";
debug("Google postroll enabled!", 0xFFAA00);
};
if ((((((rootparams.overlay == "google")) || ((rootparams.postroll_file == "google_overlay")))) || ((((((rootparams.postroll_file == "google")) && (!((playertype == "infinity"))))) && (!(gPostroll.enabled)))))){
rootparams.overlay = "google";
if ((((rootparams.postroll_file == "google_overlay")) || ((((rootparams.postroll_file == "google")) && (!((playertype == "infinity"))))))){
rootparams.postroll_file = "";
};
debug("Google overlay enabled!", 0xFFAA00);
gOverlay.enabled = true;
};
if (rootparams.postroll_file == "scanscout"){
if ((((playertype == "infinity")) && (!((rootparams.overlay == "scanscout"))))){
ssOverlay.enabled = true;
ssOverlay.type = "video";
ssOverlay.vizmez_type = "ssPostroll";
debug("ScanScout postroll enabled!", 0xFFAA00);
} else {
rootparams.postroll_file = "";
};
};
if (rootparams.overlay == "scanscout"){
ssOverlay.enabled = true;
ssOverlay.highpixel = (rootparams.overlay_highpixel) ? rootparams.overlay_highpixel : "";
ssOverlay.lowpixel = (rootparams.overlay_lowpixel) ? rootparams.overlay_lowpixel : "";
debug("ScanScout overlay enabled!", 0xFFAA00);
};
if (rootparams.postroll_file == "bbe"){
bbeCall();
};
has_preroll = (((rootparams.bumper_file) && (!((playertype == "embed"))))) ? true : false;
has_postroll = (((rootparams.postroll_file) && (!((rootparams.postroll_file == ""))))) ? true : false;
had_postroll = has_postroll;
vidpath = (CONFIG_PATH_BASE + video_id);
loadMainVideoXML(vidpath);
var _local1:String = (rootparams.bumper_file) ? rootparams.bumper_file : "";
var _local2:String = (rootparams.bumper_width) ? rootparams.bumper_width : "640";
var _local3:String = (rootparams.bumper_height) ? rootparams.bumper_height : "360";
var _local4:String = (rootparams.bumper_audio) ? rootparams.bumper_audio : "";
if (rootparams.bumper_file){
debug("INITIAL PREROLL", 0xFFAA00);
debug(((((((("image: " + String(_local1)) + ", audio: ") + String(_local4)) + ", w: ") + String(_local2)) + ", h: ") + String(_local3)), 0xFFAA00);
};
if (rootparams.bumper_tracking_pixel){
bumper_tracking_pixel = (rootparams.bumper_tracking_pixel) ? rootparams.bumper_tracking_pixel : bumper_tracking_pixel;
};
var _local5:String = (rootparams.postroll_file) ? rootparams.postroll_file : "";
var _local6:String = (rootparams.postroll_width) ? rootparams.postroll_width : "640";
var _local7:String = (rootparams.postroll_height) ? rootparams.postroll_height : "360";
var _local8:String = (rootparams.outro_file) ? rootparams.outro_file : "";
var _local9:String = (rootparams.outro_width) ? rootparams.outro_width : "45";
var _local10:String = (rootparams.outro_height) ? rootparams.outro_height : "45";
var _local11:String = (rootparams.click_url) ? rootparams.click_url : "";
postroll_vericount_pixel = (rootparams.postroll_vericount_pixel) ? rootparams.postroll_vericount_pixel : "";
postroll_tracking_pixel = (rootparams.postroll_tracking_pixel) ? rootparams.postroll_tracking_pixel : postroll_tracking_pixel;
overlay_tracking_pixel = (rootparams.overlay_tracking_pixel) ? rootparams.overlay_tracking_pixel : "";
overlay_vericount_pixel = (rootparams.overlay_vericount_pixel) ? rootparams.overlay_vericount_pixel : "";
var _local12:String = (rootparams.perc0_pixel) ? rootparams.perc0_pixel : "";
var _local13:String = (rootparams.perc25_pixel) ? rootparams.perc25_pixel : "";
var _local14:String = (rootparams.perc50_pixel) ? rootparams.perc50_pixel : "";
var _local15:String = (rootparams.perc100_pixel) ? rootparams.perc100_pixel : "";
if (rootparams.postroll_file){
debug("INITIAL POSTROLL", 0xFFAA00);
if (rootparams.postroll_file == "google"){
if (playertype == "infinity"){
has_postroll = (had_postroll = false);
};
} else {
if (rootparams.postroll_file == "scanscout"){
if (playertype == "infinity"){
has_postroll = (had_postroll = false);
};
} else {
debug(((((((((((((("video: " + String(_local5)) + ", banner_image: ") + String(_local8)) + ", banner_w: ") + String(_local9)) + ", banner_h: ") + String(_local10)) + ", clickURL: ") + String(_local11)) + ", tracking_pixel: ") + String(postroll_tracking_pixel)) + ", vericount_pixel: ") + String(postroll_vericount_pixel)), 0xFFAA00);
};
};
};
if (playertype == "infinity"){
if (has_postroll){
ext_newpageID(false);
};
has_postroll = false;
};
prerollclass = new PreRoll(stage, _local1, _local2, _local3, _local4);
postrollclass = new PostRoll(stage, _local5, _local6, _local7, _local8, _local9, _local10, _local11, [_local12, _local13, _local14, _local15]);
}
override public function postroll_preload():void{
if (has_postroll){
if (((((((((((postrollclass) && (!((postrollclass._filename == ""))))) && (!((postrollclass._filename == "google"))))) && (!((postrollclass._filename == "scanscout"))))) && (!(postrollclass._is_loading)))) && (!(postrollclass._is_loaded)))){
postrollclass.load();
} else {
if (gPostroll.enabled){
gPostroll.active = true;
if (((((!(gPostroll.ready)) && (!(gPostroll.loading)))) && (!(gOverlay.active)))){
gPostroll.load();
};
};
};
};
}
public function player_version():String{
return (version);
}
override public function streamprogressPixel(_arg1:Number):void{
var _local2:*;
if (((((!((playerbrand == "TBT"))) && (!(is_postroll_on)))) && (!(kill_ze_stats)))){
_local2 = (Math.floor((_arg1 / 10)) * 10);
if ((((_local2 > 0)) && (!((_local2 == last_tracked_time))))){
ggEvent(49, [Math.round(mainvid._stream.time)]);
if (playertype != "embed"){
trackingPixel(("$1time/" + secondsToMinutes(_local2)), {disable_nielson:true});
};
trackingPixel("$1time", {disable_google:true, dav:((_local2 > 5)) ? 1 : 0});
last_tracked_time = _local2;
};
if ((((_arg1 > 0)) && ((playertype == "infinity")))){
postrollcounter_time = (postrollcounter_time + 0.1);
if (postroll_vidwatched < 10){
postroll_vidwatched = (postroll_vidwatched + 1);
} else {
if (postroll_vidwatched == 10){
postrollcounter_views = (postrollcounter_views + 1);
};
};
check_postrolltriggers();
};
};
}
public function onSmartBarLoaded():void{
smartBar = (smartloader.content as MovieClip);
stage.addChild(smartBar);
}
override public function toggle_ze_ads(_arg1:ContextMenuEvent):void{
if (!kill_ze_ads){
if (gOverlay.ready){
gOverlay.completed();
};
if (gPostroll.ready){
gPostroll.completed();
};
if (ssOverlay.ready){
ssOverlay.completed();
};
};
super.toggle_ze_ads(_arg1);
}
}
}//package com.vidplayer
Section 54
//MoogaSprite (com.vidplayer.MoogaSprite)
package com.vidplayer {
import flash.events.*;
import flash.display.*;
public class MoogaSprite extends Sprite {
public function MoogaSprite():void{
}
public function initialize(_arg1:Object):void{
}
public function onAddedToStage(_arg1:Event=null):void{
}
}
}//package com.vidplayer
Section 55
//TweenLite (com.vidplayer.TweenLite)
package com.vidplayer {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
import flash.geom.*;
import flash.media.*;
import fl.transitions.easing.*;
public class TweenLite {
public var delay:Number;
protected var _initted:Boolean;
protected var _subTweens:Array;
public var startTime:int;
public var target:Object;
public var duration:Number;
protected var _hst:Boolean;
protected var _active:Boolean;
public var tweens:Array;
public var vars:Object;
public var initTime:int;
private static var _timer:Timer = new Timer(2000);
private static var _classInitted:Boolean;
public static var defaultEase:Function = Strong.easeOut;
public static var version:Number = 6.21;
private static var _sprite:Sprite = new Sprite();
protected static var _all:Dictionary = new Dictionary();
public static var killDelayedCallsTo:Function = killTweensOf;
protected static var _curTime:uint;
private static var _listening:Boolean;
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
if (_arg1 == null){
return;
};
if (((((!((_arg3.overwrite == false))) && (!((_arg1 == null))))) || ((_all[_arg1] == undefined)))){
delete _all[_arg1];
_all[_arg1] = new Dictionary();
};
_all[_arg1][this] = this;
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.target = _arg1;
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
};
this.tweens = [];
_subTweens = [];
_hst = (_initted = false);
_active = (((_arg2 == 0)) && ((this.delay == 0)));
if (!_classInitted){
_curTime = getTimer();
_sprite.addEventListener(Event.ENTER_FRAME, executeAll);
_classInitted = true;
};
this.initTime = _curTime;
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (_active))){
initTweenVals();
this.startTime = _curTime;
if (_active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
};
if (((!(_listening)) && (!(_active)))){
_timer.addEventListener("timer", killGarbage);
_timer.start();
_listening = true;
};
}
protected function addSubTween(_arg1:Function, _arg2:Object, _arg3:Object, _arg4:Object=null):void{
var _local6:String;
var _local5:Object = {proxy:_arg1, target:_arg2, info:_arg4};
_subTweens.push(_local5);
for (_local6 in _arg3) {
if (_arg2.hasOwnProperty(_local6)){
if (typeof(_arg3[_local6]) == "number"){
this.tweens.push({o:_arg2, p:_local6, s:_arg2[_local6], c:(_arg3[_local6] - _arg2[_local6]), sub:_local5});
} else {
this.tweens.push({o:_arg2, p:_local6, s:_arg2[_local6], c:Number(_arg3[_local6]), sub:_local5});
};
};
};
_hst = true;
}
public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local4:String;
var _local5:int;
var _local6:Array;
var _local7:ColorTransform;
var _local8:ColorTransform;
var _local9:Object;
var _local3 = (this.target is DisplayObject);
if ((this.target is Array)){
_local6 = ((this.vars.endArray) || ([]));
_local5 = 0;
while (_local5 < _local6.length) {
if (((!((this.target[_local5] == _local6[_local5]))) && (!((this.target[_local5] == undefined))))){
this.tweens.push({o:this.target, p:_local5.toString(), s:this.target[_local5], c:(_local6[_local5] - this.target[_local5])});
};
_local5++;
};
} else {
for (_local4 in this.vars) {
if ((((((((((((((((((((((((((((((((((((_local4 == "ease")) || ((_local4 == "delay")))) || ((_local4 == "overwrite")))) || ((_local4 == "onComplete")))) || ((_local4 == "onCompleteParams")))) || ((_local4 == "onCompleteScope")))) || ((_local4 == "runBackwards")))) || ((_local4 == "onUpdate")))) || ((_local4 == "onUpdateParams")))) || ((_local4 == "onUpdateScope")))) || ((_local4 == "autoAlpha")))) || ((_local4 == "onStart")))) || ((_local4 == "onStartParams")))) || ((_local4 == "onStartScope")))) || ((_local4 == "renderOnStart")))) || ((_local4 == "proxiedEase")))) || ((_local4 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local4) + " ")) == -1))))))){
} else {
if ((((_local4 == "tint")) && (_local3))){
_local7 = this.target.transform.colorTransform;
_local8 = new ColorTransform();
if (this.vars.alpha != undefined){
_local8.alphaMultiplier = this.vars.alpha;
delete this.vars.alpha;
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
if (this.tweens[_local5].p == "alpha"){
this.tweens.splice(_local5, 1);
break;
};
_local5--;
};
} else {
_local8.alphaMultiplier = this.target.alpha;
};
if (((((!((this.vars[_local4] == null))) && (!((this.vars[_local4] == ""))))) || ((this.vars[_local4] == 0)))){
_local8.color = this.vars[_local4];
};
addSubTween(tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local7, endColor:_local8});
} else {
if ((((_local4 == "frame")) && (_local3))){
addSubTween(frameProxy, {frame:this.target.currentFrame}, {frame:this.vars[_local4]}, {target:this.target});
} else {
if ((((_local4 == "volume")) && (((_local3) || ((this.target is SoundChannel)))))){
addSubTween(volumeProxy, this.target.soundTransform, {volume:this.vars[_local4]}, {target:this.target});
} else {
if (this.target.hasOwnProperty(_local4)){
if (typeof(this.vars[_local4]) == "number"){
this.tweens.push({o:this.target, p:_local4, s:this.target[_local4], c:(this.vars[_local4] - this.target[_local4])});
} else {
this.tweens.push({o:this.target, p:_local4, s:this.target[_local4], c:Number(this.vars[_local4])});
};
};
};
};
};
};
};
};
if (this.vars.runBackwards == true){
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local9 = this.tweens[_local5];
this.tweens[_local5].s = (_local9.s + _local9.c);
_local9.c = (_local9.c * -1);
_local5--;
};
};
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = !((((this.vars.runBackwards == true)) && ((this.target.alpha == 0))));
};
_initted = true;
}
public function get active():Boolean{
if (_active){
return (true);
};
if (((_curTime - this.initTime) / 1000) > this.delay){
_active = true;
this.startTime = (this.initTime + (this.delay * 1000));
if (!_initted){
initTweenVals();
} else {
if (typeof(this.vars.autoAlpha) == "number"){
this.target.visible = true;
};
};
if (this.vars.onStart != null){
this.vars.onStart.apply(this.vars.onStartScope, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
return (true);
//unresolved jump
};
return (false);
}
public function render(_arg1:uint):void{
var _local4:Object;
var _local5:int;
var _local2:Number = ((_arg1 - this.startTime) / 1000);
if (_local2 > this.duration){
_local2 = this.duration;
};
var _local3:Number = this.vars.ease(_local2, 0, 1, this.duration);
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4.o[_local4.p] = (_local4.s + (_local3 * _local4.c));
_local5--;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5]);
_local5--;
};
};
if (this.vars.onUpdate != null){
this.vars.onUpdate.apply(this.vars.onUpdateScope, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
if (!_initted){
initTweenVals();
};
this.startTime = (_curTime - (this.duration * 1000));
render(_curTime);
return;
};
if ((((typeof(this.vars.autoAlpha) == "number")) && ((this.target.alpha == 0)))){
this.target.visible = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(this.vars.onCompleteScope, this.vars.onCompleteParams);
};
removeTween(this);
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function frameProxy(_arg1:Object):void{
_arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame));
}
public static function removeTween(_arg1:TweenLite=null):void{
if (((!((_arg1 == null))) && (!((_all[_arg1.target] == undefined))))){
delete _all[_arg1.target][_arg1];
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Object;
var _local4:*;
if (((!((_arg1 == null))) && (!((_all[_arg1] == undefined))))){
if (_arg2){
_local3 = _all[_arg1];
for (_local4 in _local3) {
_local3[_local4].complete(false);
};
};
delete _all[_arg1];
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, onCompleteScope:_arg4, overwrite:false}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function executeAll(_arg1:Event=null):void{
var t:uint;
var a:Dictionary;
var p:Object;
var tw:Object;
var $e = _arg1;
try {
t = (_curTime = getTimer());
if (_listening){
a = _all;
for each (p in a) {
for (tw in p) {
if (((!((p[tw] == undefined))) && (p[tw].active))){
p[tw].render(t);
};
};
};
};
} catch(e:Error) {
};
}
public static function volumeProxy(_arg1:Object):void{
_arg1.info.target.soundTransform = _arg1.target;
}
public static function killGarbage(_arg1:TimerEvent):void{
var _local3:Boolean;
var _local4:Object;
var _local5:Object;
var _local6:Object;
var _local2:uint;
for (_local4 in _all) {
_local3 = false;
for (_local5 in _all[_local4]) {
_local3 = true;
break;
};
if (!_local3){
delete _all[_local4];
} else {
_local2++;
};
};
if (_local2 == 0){
_timer.removeEventListener("timer", killGarbage);
_timer.stop();
_listening = false;
};
}
public static function tintProxy(_arg1:Object):void{
var _local2:Number = _arg1.target.progress;
var _local3:Number = (1 - _local2);
var _local4:Object = _arg1.info.color;
var _local5:Object = _arg1.info.endColor;
_arg1.info.target.transform.colorTransform = new ColorTransform(((_local4.redMultiplier * _local3) + (_local5.redMultiplier * _local2)), ((_local4.greenMultiplier * _local3) + (_local5.greenMultiplier * _local2)), ((_local4.blueMultiplier * _local3) + (_local5.blueMultiplier * _local2)), ((_local4.alphaMultiplier * _local3) + (_local5.alphaMultiplier * _local2)), ((_local4.redOffset * _local3) + (_local5.redOffset * _local2)), ((_local4.greenOffset * _local3) + (_local5.greenOffset * _local2)), ((_local4.blueOffset * _local3) + (_local5.blueOffset * _local2)), ((_local4.alphaOffset * _local3) + (_local5.alphaOffset * _local2)));
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package com.vidplayer
Section 56
//APILoader (com.vmc.integration.APILoader)
package com.vmc.integration {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import com.vidplayer.vidstuff.TPA.*;
import flash.system.*;
public class APILoader {
public static const NODE_TYPE_AD:String = "ad";
public static const DEFAULT_VMC_API_URL:String = "http://cdn.visiblemeasures.com/swf/as3/v4.2/vmcutility.swf";
public static const NODE_TYPE_VIDEO:String = "video";
public static const VERSION:String = "1.6";
private static var vmcUtility:Object;
private static var callback:Function;
private static var target:Object;
private static var initInfo:Object;
private static var accountKey:String;
private static var apiUrl:String;
private static function log(_arg1:Object):void{
trace(("[APILoader] " + _arg1));
}
private static function loadApi():void{
var _local1:String = APILoader.initInfo.apiUrl;
var _local2:Loader = new Loader();
_local2.contentLoaderInfo.addEventListener(Event.INIT, onLoadInit);
_local2.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
log(("Loading " + _local1));
_local2.load(new URLRequest(_local1));
}
private static function onLoadInit(_arg1:Event):void{
completeLoad(LoaderInfo(_arg1.target).content);
}
public static function getRemoteNode(_arg1:String=null, _arg2:String=null):Object{
if (vmcUtility){
return (vmcUtility.getRemoteNode(_arg1, _arg2));
};
return (null);
}
private static function onLoadError(_arg1:IOErrorEvent):void{
log(("Error: " + _arg1.text));
if (callback != null){
callback.apply(APILoader.target);
};
}
public static function load(_arg1:Object):void{
Security.allowDomain("cdn.visiblemeasures.com");
Security.allowDomain("qa.visiblemeasures.com");
log(VERSION);
if (!_arg1.apiUrl){
_arg1.apiUrl = APILoader.DEFAULT_VMC_API_URL;
};
var _local2:Number = new Date().getTime();
_arg1.apiLoadStartTime = _local2;
if (!_arg1.playerStartTime){
_arg1.playerStartTime = _local2;
};
var _local3:Boolean;
if (!_arg1.callback){
log("*** ERROR: No initInfoParam.callback propery supplied in APILoader.load()");
_local3 = true;
};
if (!_arg1.target){
log("*** WARNING: No initInfoParam.target propery supplied in APILoader.load()");
};
if (!_arg1.accountKey){
log("*** WARNING: No initInfoParam.accountKey propery supplied in APILoader.load()");
};
if (_local3){
log("*** ERROR: Could not load VMCUtility due to bad arguments in APILoader.");
return;
};
APILoader.initInfo = _arg1;
APILoader.callback = _arg1.callback;
APILoader.target = _arg1.target;
if (vmcUtility){
completeLoad(vmcUtility);
return;
};
loadApi();
}
public static function getVMCUtility():Object{
return (APILoader.vmcUtility);
}
private static function completeLoad(_arg1:Object):void{
trace("~~~API COMPLETE");
VizMez.ready = true;
vmcUtility = _arg1;
vmcUtility.configure(APILoader.initInfo);
if (callback != null){
callback.apply(APILoader.target);
};
}
}
}//package com.vmc.integration
Section 57
//Quartic (fl.motion.easing.Quartic)
package fl.motion.easing {
public class Quartic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((-(_arg3) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return (((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((-(_arg3) / 2) * ((((_arg1 * _arg1) * _arg1) * _arg1) - 2)) + _arg2));
}
}
}//package fl.motion.easing
Section 58
//Color (fl.motion.Color)
package fl.motion {
import flash.display.*;
import flash.geom.*;
public class Color extends ColorTransform {
private var _tintColor:Number;// = 0
private var _tintMultiplier:Number;// = 0
public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
private function deriveTintColor():uint{
var _local1:Number = (1 / this.tintMultiplier);
var _local2:uint = Math.round((this.redOffset * _local1));
var _local3:uint = Math.round((this.greenOffset * _local1));
var _local4:uint = Math.round((this.blueOffset * _local1));
var _local5:uint = (((_local2 << 16) | (_local3 << 8)) | _local4);
return (_local5);
}
public function set brightness(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < -1){
_arg1 = -1;
};
};
var _local2:Number = (1 - Math.abs(_arg1));
var _local3:Number = 0;
if (_arg1 > 0){
_local3 = (_arg1 * 0xFF);
};
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2));
this.redOffset = (this.greenOffset = (this.blueOffset = _local3));
}
private function parseXML(_arg1:XML=null):Color{
var _local3:XML;
var _local4:String;
var _local5:uint;
if (!_arg1){
return (this);
};
var _local2:XML = _arg1.elements()[0];
if (!_local2){
return (this);
};
for each (_local3 in _local2.attributes()) {
_local4 = _local3.localName();
if (_local4 == "tintColor"){
_local5 = (Number(_local3.toString()) as uint);
this.tintColor = _local5;
} else {
this[_local4] = Number(_local3.toString());
};
};
return (this);
}
public function get tintColor():uint{
return (this._tintColor);
}
public function set tintColor(_arg1:uint):void{
this.setTint(_arg1, this.tintMultiplier);
}
public function get brightness():Number{
return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1));
}
public function set tintMultiplier(_arg1:Number):void{
this.setTint(this.tintColor, _arg1);
}
public function get tintMultiplier():Number{
return (this._tintMultiplier);
}
public function setTint(_arg1:uint, _arg2:Number):void{
this._tintColor = _arg1;
this._tintMultiplier = _arg2;
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2)));
var _local3:uint = ((_arg1 >> 16) & 0xFF);
var _local4:uint = ((_arg1 >> 8) & 0xFF);
var _local5:uint = (_arg1 & 0xFF);
this.redOffset = Math.round((_local3 * _arg2));
this.greenOffset = Math.round((_local4 * _arg2));
this.blueOffset = Math.round((_local5 * _arg2));
}
public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{
var _local4:Number = (1 - _arg3);
var _local5:uint = ((_arg1 >> 24) & 0xFF);
var _local6:uint = ((_arg1 >> 16) & 0xFF);
var _local7:uint = ((_arg1 >> 8) & 0xFF);
var _local8:uint = (_arg1 & 0xFF);
var _local9:uint = ((_arg2 >> 24) & 0xFF);
var _local10:uint = ((_arg2 >> 16) & 0xFF);
var _local11:uint = ((_arg2 >> 8) & 0xFF);
var _local12:uint = (_arg2 & 0xFF);
var _local13:uint = ((_local5 * _local4) + (_local9 * _arg3));
var _local14:uint = ((_local6 * _local4) + (_local10 * _arg3));
var _local15:uint = ((_local7 * _local4) + (_local11 * _arg3));
var _local16:uint = ((_local8 * _local4) + (_local12 * _arg3));
var _local17:uint = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16);
return (_local17);
}
public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{
var _local4:Number = (1 - _arg3);
var _local5:ColorTransform = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3)));
return (_local5);
}
public static function fromXML(_arg1:XML):Color{
return (Color(new (Color).parseXML(_arg1)));
}
}
}//package fl.motion
Section 59
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 60
//LoadingGraphic (LoadingGraphic)
package {
import flash.text.*;
import flash.display.*;
public dynamic class LoadingGraphic extends MovieClip {
public var loadingcaption:TextField;
public var loadingcircle:MovieClip;
}
}//package
Section 61
//Seek_Loaded (Seek_Loaded)
package {
import flash.display.*;
public dynamic class Seek_Loaded extends Sprite {
}
}//package
Section 62
//Seek_Scrubber (Seek_Scrubber)
package {
import flash.display.*;
public dynamic class Seek_Scrubber extends Sprite {
}
}//package
Section 63
//Seek_Total (Seek_Total)
package {
import flash.display.*;
public dynamic class Seek_Total extends Sprite {
}
}//package
Section 64
//TimeBubble (TimeBubble)
package {
import flash.text.*;
import flash.display.*;
public dynamic class TimeBubble extends MovieClip {
public var timecode_txt:TextField;
}
}//package
Section 65
//Volume_Needle (Volume_Needle)
package {
import flash.display.*;
public dynamic class Volume_Needle extends Sprite {
public var volneedlebg:MovieClip;
}
}//package
Section 66
//Volume_Scale (Volume_Scale)
package {
import flash.display.*;
public dynamic class Volume_Scale extends Sprite {
}
}//package