Frame 1
com.google.youtube.players.modules.ad.Main.main(this);
Symbol 8 MovieClip [preloader] Frame 22
stop();
Symbol 20480 MovieClip [__Packages.com.gs.TweenLite] Frame 0
class com.gs.TweenLite
{
static var _e, _classInitted, _curTime, _gc, _listening;
var tweenID, endTargetID, vars, duration, delay, _active, target, tweens, _subTweens, _hst, _initted, initTime, startTime, _hasUpdate;
function TweenLite ($target, $duration, $vars) {
_cnt++;
tweenID = "tw" + _cnt;
endTargetID = getID($target, true);
if (($vars.overwrite != false) && ($target != undefined)) {
delete _all[endTargetID];
_all[endTargetID] = {info:[$target, endTargetID]};
}
_all[endTargetID][tweenID] = this;
vars = $vars;
duration = $duration || 0.001;
delay = $vars.delay || 0;
_active = ($duration == 0) && (delay == 0);
target = $target;
if (typeof(vars.ease) != "function") {
vars.ease = defaultEase;
}
if (vars.easeParams != undefined) {
vars.proxiedEase = vars.ease;
vars.ease = easeProxy;
}
if (typeof(vars.autoAlpha) == "number") {
vars._alpha = vars.autoAlpha;
vars._visible = vars._alpha > 0;
}
tweens = [];
_subTweens = [];
_hst = (_initted = false);
if ((_e._visible != false) || (!_classInitted)) {
_curTime = getTimer();
var _local5 = 999;
while (_root.getInstanceAtDepth(_local5) != undefined) {
_local5++;
}
_e = _root.createEmptyMovieClip("__tweenLite_mc", _local5);
_e._visible = false;
_global.clearInterval(_gc);
_gc = _global.setInterval(killGarbage, 2000);
_e.onEnterFrame = executeAll;
_classInitted = true;
}
initTime = _curTime;
if (_active || ((vars.runBackwards == true) && (vars.renderOnStart != true))) {
initTweenVals();
startTime = _curTime;
if (_active) {
render(startTime + 1);
} else {
render(startTime);
}
if ((vars._visible != undefined) && (vars.runBackwards == true)) {
target._visible = vars._visible;
}
}
if ((!_active) && (!_listening)) {
_listening = true;
}
}
function initTweenVals($hrp, $reservedProps) {
var _local4 = typeof(target) == "movieclip";
if (target instanceof Array) {
var _local7 = vars.endArray || ([]);
var _local6 = 0;
for ( ; _local6 < _local7.length ; _local6++) {
if ((target[_local6] != _local7[_local6]) && (target[_local6] != undefined)) {
tweens[tweens.length] = {o:target, p:_local6.toString(), s:target[_local6], c:_local7[_local6] - target[_local6]};
}
}
} else {
if (((vars.tint != undefined) || (vars.removeTint == true)) && (_local4 || (target instanceof TextField))) {
var _local8 = new Color(target);
var _local9 = vars._alpha;
if (_local9 != undefined) {
delete vars._alpha;
} else {
_local9 = target._alpha;
}
if ((vars.removeTint == true) || ((vars.tint == null) || (vars.tint == ""))) {
addSubTween(tintProxy, _local8.getTransform(), {rb:0, gb:0, bb:0, ab:0, ra:_local9, ga:_local9, ba:_local9, aa:_local9}, {color:_local8});
} else {
addSubTween(tintProxy, _local8.getTransform(), {rb:vars.tint >> 16, gb:(vars.tint >> 8) & 255, bb:vars.tint & 255, ra:0, ga:0, ba:0, aa:_local9}, {color:_local8});
}
}
if ((vars.frame != undefined) && (_local4)) {
addSubTween(frameProxy, {frame:target._currentframe}, {frame:vars.frame}, {mc:target});
}
if ((vars.volume != undefined) && (_local4 || (target instanceof Sound))) {
if (_local4) {
var _local10 = new Sound(target);
} else {
var _local10 = Sound(target);
}
addSubTween(volumeProxy, {volume:_local10.getVolume()}, {volume:vars.volume}, {sound:_local10});
}
for (var _local5 in vars) {
if ((_local5 == "ease") || ((_local5 == "delay") || ((_local5 == "overwrite") || ((_local5 == "onComplete") || ((_local5 == "onCompleteParams") || ((_local5 == "onCompleteScope") || ((_local5 == "runBackwards") || ((_local5 == "onUpdate") || ((_local5 == "onUpdateParams") || ((_local5 == "onUpdateScope") || ((_local5 == "persist") || ((_local5 == "volume") || ((_local5 == "onStart") || ((_local5 == "onStartParams") || ((_local5 == "onStartScope") || ((_local5 == "renderOnStart") || ((_local5 == "proxiedEase") || ((_local5 == "easeParams") || ($hrp && ($reservedProps.indexOf((" " + _local5) + " ") != -1)))))))))))))))))))) {
} else if ((!(_local4 && ((_local5 == "_visible") || ((_local5 == "autoAlpha") || ((_local5 == "tint") || ((_local5 == "removeTint") || (_local5 == "frame"))))))) && (target[_local5] != undefined)) {
if (typeof(vars[_local5]) == "number") {
tweens[tweens.length] = {o:target, p:_local5, s:target[_local5], c:vars[_local5] - target[_local5]};
} else {
tweens[tweens.length] = {o:target, p:_local5, s:target[_local5], c:Number(vars[_local5])};
}
}
}
}
if (vars.runBackwards == true) {
var _local6 = tweens.length - 1;
for ( ; _local6 > -1 ; _local6--) {
var _local11 = tweens[_local6];
_local11.s = _local11.s + _local11.c;
_local11.c = _local11.c * -1;
}
}
if (vars._visible == true) {
target._visible = true;
}
if (vars.onUpdate != null) {
_hasUpdate = true;
}
_initted = true;
}
function addSubTween($proxy, $target, $props, $info) {
var _local6 = {proxy:$proxy, target:$target, info:$info};
_subTweens[_subTweens.length] = _local6;
for (var p in $props) {
if (typeof($props[p]) == "number") {
tweens[tweens.length] = {o:$target, p:p, s:$target[p], c:$props[p] - $target[p], sub:_local6};
} else {
tweens[tweens.length] = {o:$target, p:p, s:$target[p], c:Number($props[p]), sub:_local6};
}
}
_hst = true;
}
static function to($target, $duration, $vars) {
return(new com.gs.TweenLite($target, $duration, $vars));
}
static function from($target, $duration, $vars) {
$vars.runBackwards = true;
return(new com.gs.TweenLite($target, $duration, $vars));
}
static function delayedCall($delay, $onComplete, $onCompleteParams, $onCompleteScope) {
return(new com.gs.TweenLite($onComplete, 0, {delay:$delay, onComplete:$onComplete, onCompleteParams:$onCompleteParams, onCompleteScope:$onCompleteScope, overwrite:false}));
}
function render($t) {
var _local3 = ($t - startTime) / 1000;
if (_local3 >= duration) {
_local3 = duration;
var _local4 = 1;
} else {
var _local4 = vars.ease(_local3, 0, 1, duration);
}
var _local6 = tweens.length - 1;
for ( ; _local6 > -1 ; _local6--) {
var _local5 = tweens[_local6];
_local5.o[_local5.p] = _local5.s + (_local4 * _local5.c);
}
if (_hst) {
_local6 = _subTweens.length - 1;
for ( ; _local6 > -1 ; _local6--) {
_subTweens[_local6].proxy(_subTweens[_local6]);
}
}
if (_hasUpdate) {
vars.onUpdate.apply(vars.onUpdateScope, vars.onUpdateParams);
}
if (_local3 == duration) {
complete(true);
}
}
static function executeAll() {
var _local2 = (_curTime = getTimer());
if (_listening) {
var _local3 = _all;
for (var _local6 in _local3) {
for (var _local5 in _local3[_local6]) {
var _local4 = _local3[_local6][_local5];
if (_local4.active) {
_local4.render(_local2);
}
}
}
}
}
static function removeTween($t) {
_all[$t.endTargetID][$t.tweenID] = {active:false};
delete _all[$t.endTargetID][$t.tweenID];
}
static function killTweensOf($tg, $complete) {
var _local4 = getID($tg, true);
if ($complete) {
var _local5 = _all[_local4];
for (var tw in _local5) {
_local5[tw].complete(false);
}
}
delete _all[_local4];
}
function complete($skipRender) {
if ($skipRender != true) {
if (!_initted) {
initTweenVals();
}
startTime = _curTime - (duration * 1000);
render(_curTime);
return(undefined);
}
if (vars._visible != undefined) {
if ((vars.autoAlpha != undefined) && (target._alpha == 0)) {
target._visible = false;
} else if (vars.runBackwards != true) {
target._visible = vars._visible;
}
}
if (vars.onComplete) {
vars.onComplete.apply(vars.onCompleteScope, vars.onCompleteParams);
}
if (vars.persist != true) {
removeTween(this);
}
}
static function getID($tg, $lookup) {
if ($lookup) {
var _local5 = _all;
if (typeof($tg) == "movieclip") {
if (_local5[String($tg)] != undefined) {
return(String($tg));
}
var _local4 = String($tg);
_all[_local4] = {info:[$tg, _local4]};
return(_local4);
}
for (var p in _local5) {
if (_local5[p].info[0] == $tg) {
return(p);
}
}
}
_cnt++;
var _local4 = "t" + _cnt;
_all[_local4] = {info:[$tg, _local4]};
return(_local4);
}
static function killGarbage() {
if (_listening) {
var _local2 = _all;
var _local6 = 0;
var _local7 = 0;
for (var _local4 in _local2) {
_local7 = 0;
for (var _local5 in _local2[_local4]) {
var _local3 = _local2[_local4][_local5];
if (_local3.tweens == undefined) {
} else {
_local7++;
}
}
if (_local7 == 0) {
delete _local2[_local4];
} else {
_local6++;
}
}
if (_local6 == 0) {
_listening = false;
}
}
}
static function defaultEase($t, $b, $c, $d) {
$t = $t / $d;
return((((-$c) * $t) * ($t - 2)) + $b);
}
function easeProxy($t, $b, $c, $d) {
var _local6 = this;
return(_local6.proxiedEase.apply(null, arguments.concat(_local6.easeParams)));
}
static function tintProxy($o) {
$o.info.color.setTransform($o.target);
}
static function frameProxy($o) {
$o.info.mc.gotoAndStop(Math.round($o.target.frame));
}
static function volumeProxy($o) {
$o.info.sound.setVolume($o.target.volume);
}
function get active() {
if (_active) {
return(true);
}
if (((_curTime - initTime) / 1000) > delay) {
_active = true;
startTime = initTime + (delay * 1000);
if (!_initted) {
initTweenVals();
} else if (vars._visible != undefined) {
target._visible = true;
}
if (duration == 0.001) {
startTime = startTime - 1;
}
if (vars.onStart != undefined) {
vars.onStart.apply(vars.onStartScope, vars.onStartParams);
}
return(true);
}
return(false);
}
static var version = 7.01;
static var killDelayedCallsTo = killTweensOf;
static var _all = new Object();
static var _cnt = -16000;
static var _hrp = false;
}
Symbol 20481 MovieClip [__Packages.ArrayParam] Frame 0
class ArrayParam
{
function ArrayParam () {
}
//ASSetPropFlags(_local1, null, 1);
}
Symbol 20482 MovieClip [__Packages.com.google.youtube.event.ModuleEvent] Frame 0
class com.google.youtube.event.ModuleEvent
{
function ModuleEvent () {
}
static var PLAY = "onPlay";
static var PAUSE = "onPause";
static var ENABLE = "onEnable";
static var DISABLE = "onDisable";
static var ADD_MARKER = "onAddMarker";
static var REMOVE_MARKERS = "onRemoveMarkers";
static var SEEK = "onSeek";
static var HIDE_END_SCREEN = "onHideEndScreen";
static var SHOW_END_SCREEN = "onShowEndScreen";
}
Symbol 20483 MovieClip [__Packages.com.google.youtube.IBroadcaster] Frame 0
class com.google.youtube.IBroadcaster
{
function IBroadcaster () {
}
}
Symbol 20484 MovieClip [__Packages.com.google.youtube.AbstractBroadcaster] Frame 0
class com.google.youtube.AbstractBroadcaster implements com.google.youtube.IBroadcaster
{
function AbstractBroadcaster () {
com.google.chianti.event.EventBroadcaster.initialize(this);
}
function broadcast(evt) {
}
function disableBroadcast() {
}
function enableBroadcast() {
}
function registerEvent(type, obj) {
}
function registerEvents() {
}
function unregisterEvent(type, obj) {
}
function unregisterEvents() {
}
function unregisterAll() {
}
}
Symbol 20485 MovieClip [__Packages.com.google.youtube.players.PlayerConfigData] Frame 0
class com.google.youtube.players.PlayerConfigData extends com.google.youtube.AbstractBroadcaster
{
var flashVars, compareInterval, source, eurl, trackingToken, playerId, videoStatsPlayerId, sourceId, sdetail, videoPubId, data, dataType, loop, enhancedGenieMenu, loadRelatedVideos, suppressNext, infringe, videoQuality, requestedDelay, fullScreen, enableCsiLogging, imageUrl, showHqThumbnail, interfaceLanguage, enableJsApi, autoPlay, startTime, jsApiCallback, playerApiId, videoQuery, channelId, contentXml, videoId, token, lengthInSeconds, useFeaturedForSuggested, color1, color2, loadModules, showCuePoints, border, mustangDocKey, useGetVideoInfo, acdcExperiment, appendVars, allowSeekAhead, disableKeyboard, playNext, BASE_YT_URL, query, sessionToken, experiment, samplingWeight, playerStyle, flvurl, ivModule, adModule, ccModule, karaokeModule, captions_video_id, broadcast;
function PlayerConfigData (mc) {
super();
flashVars = getFlashVars(mc);
copyPlayerParams(flashVars);
compareInterval = _global.setInterval(this, "compareSettings", 250);
}
function getUntypedFlashVars() {
return(flashVars);
}
function getFlashVars(mc) {
var _local3 = {};
source = ((!mc) ? (_root) : (mc));
for (var x in source) {
if (((typeof(source[x]) == "string") || (typeof(source[x]) == "number")) && ((source[x] != "") || (x == "eurl"))) {
_local3[x] = source[x];
}
}
if ((_local3.eurl == "") && (mc._parent._url != undefined)) {
_local3.eurl = mc._parent._url;
}
return(_local3);
}
function copyObject(src) {
var _local3 = {};
for (var i in src) {
_local3[i] = src[i];
}
return(_local3);
}
function copyPlayerParams(source) {
source = copyObject(source);
eurl = source.eurl;
delete source.eurl;
trackingToken = source.tk;
delete source.tk;
playerId = source.player_id;
delete source.player_id;
videoStatsPlayerId = source.plid;
delete source.plid;
sourceId = source.sourceid;
delete source.sourceid;
sdetail = source.sdetail;
delete source.sdetail;
videoPubId = source.video_pub_id;
delete source.video_pub_id;
data = source.data;
delete source.data;
dataType = source.datatype;
delete source.datatype;
loop = source.loop;
delete source.loop;
enhancedGenieMenu = source.egm;
delete source.egm;
loadRelatedVideos = source.rel;
delete source.rel;
suppressNext = source.sn;
delete source.sn;
infringe = source.infringe;
delete source.infringe;
videoQuality = source.vq;
delete source.vq;
requestedDelay = source.dtst;
delete source.dtst;
fullScreen = source.fs;
delete source.fs;
enableCsiLogging = source.enablecsi;
delete source.enablecsi;
if (com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(source.iurl)) {
imageUrl = source.iurl;
delete source.iurl;
}
showHqThumbnail = source.hqt;
delete source.hqt;
interfaceLanguage = source.hl;
delete source.hl;
enableJsApi = source.enablejsapi;
delete source.enablejsapi;
autoPlay = source.autoplay;
delete source.autoplay;
startTime = source.start;
delete source.start;
jsApiCallback = source.jsapicallback;
delete source.jsapicallback;
playerApiId = source.playerapiid;
delete source.playerapiid;
videoQuery = source.video_query;
delete source.video_query;
channelId = source.channel_id;
delete source.channel_id;
contentXml = source.content_xml;
delete source.content_xml;
videoId = source.video_id;
delete source.video_id;
token = source.t;
delete source.t;
lengthInSeconds = source.l;
delete source.l;
useFeaturedForSuggested = source.usef;
delete source.usef;
if (source.color1 != undefined) {
color1 = _global.parseInt(source.color1, 16);
delete source.color1;
} else {
color1 = DEFAULT_COLOR_1;
}
if (source.color2 != undefined) {
color2 = _global.parseInt(source.color2, 16);
delete source.color2;
} else {
color2 = DEFAULT_COLOR_2;
}
loadModules = source.load_modules;
delete source.load_modules;
showCuePoints = source.showcuepoints;
delete source.showcuepoints;
border = source.border;
delete source.border;
mustangDocKey = source.doc_key;
delete source.doc_key;
useGetVideoInfo = source.use_get_video_info;
delete source.use_get_video_info;
acdcExperiment = source.ax;
delete source.ax;
if (source.ap != undefined) {
appendVars = _global.unescape(source.ap);
delete source.ap;
}
allowSeekAhead = source.allowseekahead;
delete source.allowseekahead;
disableKeyboard = source.disablekb;
delete source.disablekb;
playNext = source.playnext;
delete source.playnext;
var _local3 = source.BASE_YT_URL;
delete source.BASE_YT_URL;
BASE_YT_URL = (com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(_local3) ? (_local3) : (LIVE_BASE_URL));
query = source.q;
delete source.q;
sessionToken = source.sk;
delete source.sk;
experiment = source.e;
delete source.e;
samplingWeight = source.sw;
delete source.sw;
playerStyle = source.ps;
delete source.ps;
flvurl = source.flvurl;
delete source.flvurl;
var _local4 = source.iv_module;
delete source.iv_module;
if (com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(_local4)) {
ivModule = _local4;
}
_local4 = source.ad_module;
delete source.ad_module;
if (com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(_local4)) {
adModule = _local4;
}
_local4 = source.subtitle_module;
delete source.subtitle_module;
if (com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(_local4)) {
ccModule = _local4;
}
_local4 = source.karaoke_module;
delete source.karaoke_module;
if (com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(_local4)) {
karaokeModule = _local4;
captions_video_id = source.captions_video_id;
delete source.captions_video_id;
}
delete source.$version;
delete source.swf;
validateNoRemainingFlashvars(source);
}
function validateNoRemainingFlashvars(obj) {
var _local3 = "";
for (var i in obj) {
_local3 = _local3 + (((i + ": ") + obj[i]) + ", ");
}
if (_local3.length > 0) {
}
}
function compareSettings() {
if ((source.setVideoQuality != undefined) && (source.vq != source.setVideoQuality)) {
videoQuality = source.setVideoQuality;
source.setVideoQuality = undefined;
broadcast({type:com.google.youtube.event.DataEvent.LOAD, target:this});
}
}
function getVideoFormat() {
var _local2 = "";
var _local3 = Math.max(0, com.google.utils.VideoStats.predictedBandwidthInBitsPerSecond());
var _local4 = VIDEO_QUALITY_SETTING_AUTO;
var _local5 = Math.max(0, _global.parseInt(videoQuality));
var _local6 = "";
var _local7 = flashVars.fmt_map.split(",");
var _local8 = 0;
for ( ; _local8 < _local7.length ; _local8++) {
if (_local7[_local8] == "default") {
break;
}
var _local9 = _local7[_local8].split("/");
var _local10 = _local9[0];
var _local11 = _global.parseInt(_local9[1]);
var _local12 = _global.parseInt(_local9[2]);
var _local13 = _global.parseInt(_local9[3]);
var _local14 = _global.parseInt(_local9[4]);
for ( ; _local10 == undefined ; _local8++) {
}
for ( ; _global.isNaN(_local12) || (_global.isNaN(_local13) || (_global.isNaN(_local14) || (_global.isNaN(_local11)))) ; _local8++) {
}
var _local15 = com.google.youtube.util.PlayerCapabilities.getPlayerVersion();
for ( ; !_local15.isAtLeastVersion(new com.google.youtube.util.PlayerVersion(_local12, _local13, _local14)) ; _local8++) {
}
if (_local11 == 0) {
_local6 = _local10;
break;
}
_local4 = VIDEO_QUALITY_SETTING_LOW;
if (((_local5 == VIDEO_QUALITY_SETTING_AUTO) && (_local11 <= _local3)) || (_local5 == VIDEO_QUALITY_SETTING_HIGH)) {
_local4 = VIDEO_QUALITY_SETTING_HIGH;
_local6 = _local10;
break;
}
}
flashVars.vq = _local4.toString();
broadcast({type:com.google.youtube.event.DataEvent.SET, target:this});
videoQuality = flashVars.vq;
return(_local6);
}
function getEmbedHtml(videoId) {
if (!videoId) {
return("");
}
var _local3 = BASE_YT_URL;
_local3 = _local3 + ("v/" + videoId);
_local3 = _local3 + ((loadRelatedVideos == "0") ? "&rel=0" : "");
_local3 = _local3 + ((border == "1") ? "&border=1" : "");
_local3 = _local3 + ((!(color1 === undefined)) ? ("&color1=0x" + color1.toString(16)) : "");
_local3 = _local3 + ((!(color2 === undefined)) ? ("&color2=0x" + color2.toString(16)) : "");
_local3 = _local3 + ((!(interfaceLanguage === undefined)) ? ("&hl=" + interfaceLanguage) : "");
_local3 = _local3 + "&fs=1";
var _local4 = ((border == "1") ? (EMBED_HEIGHT_BORDER) : (EMBED_HEIGHT_NOBORDER));
var _local5 = EMBED_HTML.split("{video_url}").join(_local3).split("{embed_height}").join(_local4);
return(_local5);
}
function toString() {
var _local2 = "PlayerConfigData{";
for (var i in this) {
if ((this[i] != undefined) && (this[i] != _global.NaN)) {
_local2 = _local2 + (((i + ": ") + this[i]) + ", ");
}
}
_local2 = _local2 + "}";
return(_local2);
}
static var VIDEO_QUALITY_SETTING_AUTO = 0;
static var VIDEO_QUALITY_SETTING_LOW = 1;
static var VIDEO_QUALITY_SETTING_HIGH = 2;
var LIVE_BASE_URL = "http://www.youtube.com/";
var LIVE_BASE_IMG_URL = "http://i.ytimg.com/";
var EMBED_HEIGHT_BORDER = "349";
var EMBED_HEIGHT_NOBORDER = "344";
var EMBED_HTML = ((((("<object width=\"425\" height=\"{embed_height}\">" + "<param name=\"movie\" value=\"{video_url}\"></param>") + "<param name=\"allowFullScreen\" value=\"true\"></param>") + "<embed src=\"{video_url}\" type=\"application/x-shockwave-flash\" ") + "allowfullscreen=\"true\" ") + "width=\"425\" height=\"{embed_height}\">") + "</embed></object>";
var REST_API_URL = "api2_rest?";
var REST_GET_PLAYLIST = "youtube.videos.list_by_playlist";
var REST_GET_VIDEO_DETAILS = "youtube.videos.get_video_info";
var REST_GET_FAVORITES = "youtube.users.list_user_favorite_videos";
var REST_GET_USER_VIDEOS = "youtube.videos.list_by_user";
var REST_EMBED_API_URL = "embed_api_rest?";
var GET_VIDEO_INFO_URL = "get_video_info";
var BASE_GDATA_URL = "http://gdata.youtube.com/";
var GDATA_VIDEO_FEEDS = "feeds/api/videos/";
var GDATA_RELATED_POSTFIX = "/related/?";
var GDATA_REQUEST_ONLY_EMBEDDED = "&format=5";
var REST_API_LIST_BY_RELATED = "youtube.videos.list_by_related";
var REST_LIST = "list_recs";
var REST_GET_VIDEO_TOKEN = "youtube.videos.get_video_token";
var GET_VIDEO_URL = "get_video?video_id=";
var TRACKER_URL = "tracker?";
var PAGE_SIZE_PARAMETER = "per_page";
var PLAYLIST_PAGE_SIZE = 8;
var PLAYLIST_PAGES_TO_LOAD = 6;
var PAGE_NUM_URL = "page";
var AD_TYPE_IMAGE = "image";
var AD_SIZE_728x90 = "728x90";
var AD_SERVER = "http://pagead2.googlesyndication.com";
var VIDEO_WATCH_URL = "watch?v=";
var DEFAULT_COLOR_1 = 11645361;
var DEFAULT_COLOR_2 = 13619151;
var CONTROLS_TOP_GRADIENT_COLOR = 16777215;
}
Symbol 20486 MovieClip [__Packages.com.google.youtube.AbstractElement] Frame 0
class com.google.youtube.AbstractElement extends MovieClip implements com.google.youtube.IBroadcaster
{
var _width, _height, _x, _y, _xscale, _yscale;
function AbstractElement () {
super();
com.google.chianti.event.EventBroadcaster.initialize(this);
}
function broadcast(evt) {
}
function disableBroadcast() {
}
function enableBroadcast() {
}
function registerEvent(type, obj) {
}
function registerEvents() {
}
function unregisterEvent(type, obj) {
}
function unregisterEvents() {
}
function unregisterAll() {
}
function setSize(newWidth, newHeight) {
_width = newWidth;
_height = newHeight;
}
function setLocation(newX, newY) {
_x = newX;
_y = newY;
}
function setScale(newXScale, newYScale) {
_xscale = newXScale;
_yscale = newYScale;
}
}
Symbol 20487 MovieClip [__Packages.com.google.youtube.players.modules.ad.AdMovie] Frame 0
class com.google.youtube.players.modules.ad.AdMovie extends com.google.youtube.AbstractElement
{
var _visible, dartLogger, configData, adVideoId, ytPlayer, visibleUrlField, createTextField, getNextHighestDepth, createEmptyMovieClip, playerChrome, videoHighlight, closeButton, attachMovie, pbBackground, progressBar, countdown, volumeControl, playerLoadedInterval, isPlayerLoaded, videoInterval, broadcast;
function AdMovie () {
super();
}
function init(newConfigData, newLogger) {
_visible = false;
dartLogger = newLogger;
configData = newConfigData;
build();
}
function setAdVideoId(newVideoId) {
adVideoId = newVideoId;
if (!getPlayerLoaded()) {
isAdWaiting = true;
return(undefined);
}
ytPlayer.cueVideoById(adVideoId);
}
function setVisibleUrl(newUrl) {
if (!newUrl) {
return(undefined);
}
if (!visibleUrlField) {
var _local3 = new TextFormat();
_local3.color = LINK_TEXT_COLOR;
_local3.size = 12;
_local3.font = "_sans";
_local3.align = "center";
var _local4 = _local3.getTextExtent("XXX").height;
visibleUrlField = createTextField("visibleUrlField", getNextHighestDepth(), 0, DEFAULT_HEIGHT + CLOSE_BUTTON_PADDING, DEFAULT_WIDTH, _local4);
visibleUrlField.setNewTextFormat(_local3);
visibleUrlField.selectable = false;
visibleUrlField.autoSize = "center";
visibleUrlField.html = true;
visibleUrlField.filters = new Array(alphaEnablingFilter);
}
visibleUrlField.htmlText = ("<u>" + newUrl) + "</u>";
DEFAULT_HEIGHT = (DEFAULT_HEIGHT + CLOSE_BUTTON_PADDING) + visibleUrlField._height;
buildClickTag();
}
function setInvideoAdType(adType) {
ytPlayer.setInvideoAdType(adType);
}
function buildClickTag() {
var _local2 = createEmptyMovieClip("clickTag", getNextHighestDepth());
var _local3 = {};
_local3 = {colors:[0], fillType:"linear", alphas:[0], ratios:[0], matrix:{matrixType:"box", x:0, y:0, w:DEFAULT_WIDTH, h:VIDEO_HEIGHT, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(_local2, 0, 0, DEFAULT_WIDTH, VIDEO_HEIGHT, _local3);
_local2.onRollOver = com.google.chianti.event.EventDelegate.create(this, onClickTagRollOver);
_local2.onRollOut = com.google.chianti.event.EventDelegate.create(this, onClickTagRollOut);
_local2.onRelease = com.google.chianti.event.EventDelegate.create(this, onClickTagRelease);
_local2.onReleaseOutside = com.google.chianti.event.EventDelegate.create(this, onClickTagRollOut);
_local2.swapDepths(playerChrome);
}
function build() {
var classRef = this;
var _local2 = {};
_local2 = {colors:[0], fillType:"linear", alphas:[100], ratios:[0], matrix:{matrixType:"box", x:0, y:0, w:VIDEO_WIDTH, h:VIDEO_HEIGHT, r:(90 / 180) * Math.PI}};
var _local3 = createEmptyMovieClip("bg", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(_local3, 0, 0, DEFAULT_WIDTH, VIDEO_HEIGHT, _local2);
ytPlayer = createEmptyMovieClip("ytPlayer", getNextHighestDepth());
videoHighlight = createEmptyMovieClip("videoHighlight", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(videoHighlight, HIGHLIGHT_THICKNESS / 2, HIGHLIGHT_THICKNESS / 2, VIDEO_WIDTH - HIGHLIGHT_THICKNESS, VIDEO_HEIGHT - HIGHLIGHT_THICKNESS, undefined, {alpha:100, thickness:HIGHLIGHT_THICKNESS, rgb:HIGHLIGHT_COLOR});
videoHighlight._alpha = 0;
var _local4 = new com.google.youtube.players.modules.ad.ui.AdText();
_local4.init(this, configData.playerConfigData.interfaceLanguage);
_local4.moveTo(AD_TEXT_PADDING, AD_TEXT_PADDING);
var _local5 = {};
_local5 = {colors:CHROME_FILL, fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0, y:0, w:VIDEO_WIDTH, h:DEFAULT_HEIGHT - VIDEO_HEIGHT, r:(90 / 180) * Math.PI}};
playerChrome = createEmptyMovieClip("playerChrome", getNextHighestDepth());
playerChrome._y = VIDEO_HEIGHT - 1;
com.google.youtube.util.Drawing.drawRect(playerChrome, 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT - VIDEO_HEIGHT, _local5, undefined, [0, 0, 5, 5]);
buildProgressBar();
buildCountdown();
buildVolumeControl();
closeButton = attachMovie(com.google.youtube.players.modules.ad.ui.CloseButton.LINK_NAME, "closeButton", getNextHighestDepth());
closeButton.setSize(CLOSE_BUTTON_SIZE);
closeButton.registerEvent(com.google.youtube.event.GenericButtonEvent.RELEASE, com.google.chianti.event.EventDelegate.create(this, onCloseButtonRelease));
closeButton._x = (DEFAULT_WIDTH - (closeButton._width / 2)) - CLOSE_BUTTON_PADDING;
closeButton._y = (closeButton._height / 2) + CLOSE_BUTTON_PADDING;
var _local6 = {};
_local6.onLoadInit = function () {
classRef.startPlayerLoadedInterval();
};
var _local7 = new MovieClipLoader();
_local7.addListener(_local6);
var _local8 = configData.playerConfigData.BASE_YT_URL + API_SWF_URL;
if (configData.playerConfigData.BASE_YT_URL != configData.playerConfigData.LIVE_BASE_URL) {
_local8 = _local8 + ("BASE_YT_URL=" + configData.playerConfigData.BASE_YT_URL);
}
_local7.loadClip(_local8, ytPlayer);
}
function buildProgressBar() {
var _local2 = {};
_local2 = {colors:[16772219, 14590981], fillType:"linear", alphas:[100, 100], ratios:[0, 190], matrix:{matrixType:"box", x:0, y:0, w:PROGRESS_BAR_WIDTH, h:PROGRESS_BAR_HEIGHT, r:(90 / 180) * Math.PI}};
var _local3 = {alpha:100, thickness:0, rgb:11961609};
var _local4 = {colors:[13421772, 14869218], fillType:"linear", alphas:[100, 100], ratios:[0, 190], matrix:{matrixType:"box", x:0, y:0, w:PROGRESS_BAR_WIDTH, h:PROGRESS_BAR_HEIGHT, r:(90 / 180) * Math.PI}};
var _local5 = {alpha:100, thickness:0, rgb:10263708};
pbBackground = playerChrome.createEmptyMovieClip("pbBackground", playerChrome.getNextHighestDepth());
pbBackground._y = ((DEFAULT_HEIGHT - VIDEO_HEIGHT) / 2) - (PROGRESS_BAR_HEIGHT / 2);
pbBackground._x = pbBackground._y;
com.google.youtube.util.Drawing.drawRect(pbBackground, 0, 0, PROGRESS_BAR_WIDTH, PROGRESS_BAR_HEIGHT, _local4, _local5);
progressBar = playerChrome.createEmptyMovieClip("progressBar", playerChrome.getNextHighestDepth());
progressBar._visible = false;
progressBar._x = pbBackground._x;
progressBar._y = pbBackground._y;
com.google.youtube.util.Drawing.drawRect(progressBar, 0, 0, PROGRESS_BAR_WIDTH, PROGRESS_BAR_HEIGHT, _local2, _local3);
progressBar._xscale = 0;
}
function buildCountdown() {
var _local2 = new TextFormat();
_local2.color = 6710886 /* 0x666666 */;
_local2.size = 11;
_local2.font = "Arial";
_local2.align = "center";
var _local3 = _local2.getTextExtent("00:00").height;
var _local4 = _local2.getTextExtent("00:00").width;
countdown = playerChrome.createTextField("countdown", playerChrome.getNextHighestDepth(), (pbBackground._y * 3) + pbBackground._width, ((DEFAULT_HEIGHT - VIDEO_HEIGHT) / 2) - Math.round(_local3 / 1.5), _local4, _local3);
countdown.setNewTextFormat(_local2);
countdown.selectable = false;
countdown.autoSize = "center";
countdown.filters = new Array(alphaEnablingFilter);
countdown.text = "00:00";
}
function buildVolumeControl() {
volumeControl = com.google.youtube.players.ui.VolumeControl(playerChrome.attachMovie(com.google.youtube.players.ui.VolumeControl.LINK_NAME, "volumeControl", playerChrome.getNextHighestDepth()));
volumeControl.init(CHROME_FILL[0], CHROME_FILL[1]);
volumeControl._xscale = 88;
volumeControl._yscale = 85;
volumeControl._x = (playerChrome._width - CLOSE_BUTTON_PADDING) - volumeControl._width;
volumeControl._y = 0;
volumeControl.registerEvent(com.google.youtube.event.VolumeControlEvent.MUTE, com.google.chianti.event.EventDelegate.create(this, onVolumeControlMute));
volumeControl.registerEvent(com.google.youtube.event.VolumeControlEvent.UNMUTE, com.google.chianti.event.EventDelegate.create(this, onVolumeControlUnMute));
volumeControl.registerEvent(com.google.youtube.event.VolumeControlEvent.CHANGE, com.google.chianti.event.EventDelegate.create(this, onVolumeControlChange));
}
function startPlayerLoadedInterval() {
if (!playerLoadedInterval) {
playerLoadedInterval = _global.setInterval(this, "checkPlayerLoaded", 100);
}
}
function checkPlayerLoaded() {
if (ytPlayer.isPlayerLoaded()) {
_global.clearInterval(playerLoadedInterval);
playerLoadedInterval = null;
onPlayerLoaded();
}
}
function onPlayerLoaded() {
setPlayerLoaded(true);
ytPlayer.setLogoVisible(false);
ytPlayer.addEventListener("onStateChange", com.google.chianti.event.EventDelegate.create(this, onPlayerStateChange));
ytPlayer.setSize(VIDEO_WIDTH, VIDEO_HEIGHT);
if (isAdWaiting) {
ytPlayer.cueVideoById(adVideoId);
}
}
function setPlayerLoaded(playerLoaded) {
isPlayerLoaded = playerLoaded;
}
function getPlayerLoaded() {
return(isPlayerLoaded);
}
function onPlayerStateChange(newState) {
switch (newState) {
case com.google.youtube.players.VideoLoader.PLAYING :
startVideoInterval();
break;
case com.google.youtube.players.VideoLoader.PAUSED :
stopVideoInterval();
break;
case com.google.youtube.players.VideoLoader.ENDED :
dartLogger.onAdVideoCompleted();
onCloseButtonRelease();
}
}
function startVideoInterval() {
progressBar._visible = true;
if (videoInterval == null) {
videoInterval = _global.setInterval(this, "onProgress", 250);
}
}
function stopVideoInterval() {
_global.clearInterval(videoInterval);
videoInterval = null;
}
function onProgress() {
dartLogger.trackPlayPercentage({currentTime:ytPlayer.getCurrentTime(), duration:ytPlayer.getDuration(), state:ytPlayer.getPlayerState()});
var _local2 = (ytPlayer.getCurrentTime() / ytPlayer.getDuration()) * 100;
progressBar._xscale = _local2;
countdown.text = com.google.youtube.util.StringUtil.secondsToTimeString(Math.round(ytPlayer.getDuration() - ytPlayer.getCurrentTime()));
}
function show(volumeInfo) {
ytPlayer.setVolume(volumeInfo.volume);
volumeControl.setValue(volumeInfo.volume, true);
if (volumeInfo.isMuted) {
ytPlayer.mute();
volumeControl.setState(com.google.youtube.players.ui.VolumeControl.MUTED);
} else {
ytPlayer.unMute();
volumeControl.setState(com.google.youtube.players.ui.VolumeControl.UNMUTED);
}
_visible = true;
ytPlayer.playVideo();
broadcast({type:com.google.youtube.event.DartAdEvent.DART_AD_OPENED, data:this});
}
function hide() {
ytPlayer.seekTo(0, true);
ytPlayer.pauseVideo();
progressBar._xscale = 0;
progressBar._visible = false;
_visible = false;
}
function end() {
broadcast({type:com.google.youtube.event.DartAdEvent.DART_AD_CLOSED, data:this});
}
function onCloseButtonRelease() {
end();
}
function onClickTagRollOver() {
videoHighlight._alpha = 100;
visibleUrlField.textColor = HIGHLIGHT_COLOR;
}
function onClickTagRollOut() {
videoHighlight._alpha = 0;
visibleUrlField.textColor = LINK_TEXT_COLOR;
}
function onClickTagRelease() {
broadcast({type:com.google.youtube.event.DartAdEvent.DART_AD_CLICKED, data:this});
}
function onVolumeControlMute() {
ytPlayer.mute();
volumeControl.setState(com.google.youtube.players.ui.VolumeControl.MUTED);
}
function onVolumeControlUnMute() {
ytPlayer.unMute();
volumeControl.setState(com.google.youtube.players.ui.VolumeControl.UNMUTED);
volumeControl.setValue(ytPlayer.getVolume());
}
function onVolumeControlChange(evt) {
ytPlayer.setVolume(evt.data);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.ad.AdMovie";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.ad.AdMovie);
static var DEFAULT_WIDTH = 350;
static var DEFAULT_HEIGHT = 282;
static var API_SWF_URL = "apiplayer?";
static var VIDEO_WIDTH = 350;
static var VIDEO_HEIGHT = 262;
static var PROGRESS_BAR_WIDTH = 270;
static var PROGRESS_BAR_HEIGHT = 7;
static var CLOSE_BUTTON_PADDING = 5;
static var CLOSE_BUTTON_SIZE = 13;
static var AD_TEXT_PADDING = 5;
static var HIGHLIGHT_THICKNESS = 1;
static var HIGHLIGHT_COLOR = 14277081;
static var LINK_TEXT_COLOR = 15516215;
static var CHROME_FILL = [14869218, 12632256];
var isAdWaiting = false;
var alphaEnablingFilter = new flash.filters.GlowFilter(0, 0.1, 1, 1, 0, 3, false, false);
}
Symbol 20488 MovieClip [__Packages.com.google.youtube.players.modules.ad.DartAd] Frame 0
class com.google.youtube.players.modules.ad.DartAd extends com.google.youtube.AbstractElement
{
var _visible, interfaceLanguage, dartAdHolder, broadcast, checkAdLoadedId, content, onEnterFrame, attachMovie, getNextHighestDepth;
function DartAd () {
super();
_visible = false;
}
function init(hl) {
interfaceLanguage = hl;
build();
}
function setAdTagUrl(adTag) {
if (dartAdHolder.adTagURL == adTag) {
return(undefined);
}
dartAdHolder.adTagURL = adTag;
}
function loadDartAd() {
dartAdHolder.loadNewAd();
}
function onCustomAdLoaded() {
broadcast({type:com.google.youtube.event.DartAdEvent.DART_CUSTOM_AD, data:this});
}
function onError() {
broadcast({type:com.google.youtube.event.DartAdEvent.DART_AD_ERROR, data:this});
}
function onF2FAdLoaded() {
checkAdLoadedId = _global.setInterval(this, "checkAdLoaded", 100);
}
function checkAdLoaded() {
if (dartAdHolder.getDARTAsset().m_assetLoaded) {
_global.clearInterval(checkAdLoadedId);
content = dartAdHolder.getDARTAsset().m_assetInstance;
onAdLoaded();
}
}
function onAdLoaded() {
setAdLoaded(true);
broadcast({type:com.google.youtube.event.DartAdEvent.DART_AD_LOADED, data:content});
if (_visible) {
startContent();
}
}
function setAdLoaded(adLoaded) {
isAdLoaded = adLoaded;
}
function getAdLoaded() {
return(isAdLoaded);
}
function setDartOrd(newNumber) {
dartAdHolder.setDartOrd(newNumber);
}
function getDartOrd() {
return(dartAdHolder.getDartOrd());
}
function resetDartOrd() {
dartAdHolder.resetDartOrd();
}
function end() {
broadcast({type:com.google.youtube.event.DartAdEvent.DART_AD_CLOSED, data:this});
}
function show() {
_visible = true;
if (isFirstPlay) {
dartAdHolder.showAsset();
onEnterFrame = function () {
this.startContent();
delete this.onEnterFrame;
};
isFirstPlay = false;
} else {
startContent();
}
broadcast({type:com.google.youtube.event.DartAdEvent.DART_AD_OPENED, data:this});
}
function hide() {
content.endAd();
_visible = false;
}
function startContent() {
content.startAd();
}
function build() {
dartAdHolder = com.doubleclick.dartadholder.DARTAdHolder(attachMovie(com.doubleclick.dartadholder.DARTAdHolder.LINK_NAME, "dartAdHolder", getNextHighestDepth()));
dartAdHolder.dartShellParameters = "&mtfNoFlush=true";
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.ad.DartAd";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.ad.DartAd);
var isAdLoaded = false;
var isFirstPlay = true;
}
Symbol 20489 MovieClip [__Packages.com.google.youtube.players.modules.ad.DartInteractive] Frame 0
class com.google.youtube.players.modules.ad.DartInteractive extends com.google.youtube.players.modules.ad.DartAd
{
var background, createEmptyMovieClip, getNextHighestDepth, dartAdHolder, adMask, interfaceLanguage, closeButton, attachMovie, end;
function DartInteractive () {
super();
}
function build() {
var _local3 = {colors:[0], fillType:"linear", alphas:[100], ratios:[0], matrix:{matrixType:"box", x:0, y:0, w:DEFAULT_WIDTH, h:DEFAULT_HEIGHT, r:(90 / 180) * Math.PI}};
var _local4 = {alpha:0, thickness:0, color:0};
background = createEmptyMovieClip("background", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(background, 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT, _local3, _local4, 0, false);
super.build();
dartAdHolder.autoPlay = true;
adMask = createEmptyMovieClip("adMask", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(adMask, 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT, _local3, _local4, 0, false);
dartAdHolder.setMask(adMask);
var _local5 = new com.google.youtube.players.modules.ad.ui.AdText();
_local5.init(this, interfaceLanguage);
_local5.moveTo(AD_TEXT_PADDING, AD_TEXT_PADDING);
closeButton = attachMovie(com.google.youtube.players.modules.ad.ui.CloseButton.LINK_NAME, "closeButton", getNextHighestDepth());
closeButton.setSize(CLOSE_BUTTON_SIZE);
closeButton.registerEvent(com.google.youtube.event.GenericButtonEvent.RELEASE, com.google.chianti.event.EventDelegate.create(this, onCloseButtonRelease));
closeButton._x = (DEFAULT_WIDTH - (closeButton._width / 2)) - CLOSE_BUTTON_PADDING;
closeButton._y = (closeButton._height / 2) + CLOSE_BUTTON_PADDING;
}
function onCloseButtonRelease() {
end();
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.ad.DartInteractive";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.ad.DartInteractive);
static var DEFAULT_WIDTH = 400;
static var DEFAULT_HEIGHT = 300;
static var CLOSE_BUTTON_PADDING = 5;
static var CLOSE_BUTTON_SIZE = 13;
static var AD_TEXT_PADDING = 5;
}
Symbol 20490 MovieClip [__Packages.com.google.youtube.players.modules.ad.PercentPlaybackTracking] Frame 0
class com.google.youtube.players.modules.ad.PercentPlaybackTracking
{
var percent, trackParam, time;
function PercentPlaybackTracking (percentPlayback, trackingParameter) {
percent = percentPlayback;
trackParam = trackingParameter;
}
function applyDuration(duration) {
time = 0.01 * Math.floor(duration * Math.min(99, percent));
}
function toString() {
return(((((("PercentPlaybackTracking: {percent :" + percent) + ", trackParam : ") + trackParam) + ", time : ") + time) + "}");
}
}
Symbol 20491 MovieClip [__Packages.com.google.youtube.event.AdControllerEvent] Frame 0
class com.google.youtube.event.AdControllerEvent
{
function AdControllerEvent () {
}
static var CONTENT_LOADED = "contentLoaded";
static var CONTENT_ERROR = "contentError";
static var IN_STREAM_AD_CLOSED = "adClosed";
static var IN_STREAM_AD_OPENED = "adOpened";
static var IN_STREAM_AD_HIDDEN = "adHidden";
static var IN_STREAM_AD_SHOWN = "adShown";
static var AD_CLICKED = "adClicked";
static var LOAD_ERROR = "onLibraryLoadError";
}
Symbol 20492 MovieClip [__Packages.com.google.youtube.players.IVideoPlayer] Frame 0
class com.google.youtube.players.IVideoPlayer implements com.google.youtube.IBroadcaster
{
function IVideoPlayer () {
}
}
Symbol 20493 MovieClip [__Packages.com.google.youtube.players.modules.IPlayerModule] Frame 0
class com.google.youtube.players.modules.IPlayerModule implements com.google.youtube.IBroadcaster
{
function IPlayerModule () {
}
}
Symbol 20494 MovieClip [__Packages.com.google.youtube.players.modules.base.BasePlayerModule] Frame 0
class com.google.youtube.players.modules.base.BasePlayerModule extends com.google.youtube.AbstractElement implements com.google.youtube.players.modules.IPlayerModule
{
var overallHolder, moduleStatus, moduleAdapter, configData, videoData;
function BasePlayerModule (mc) {
super()
overallHolder = mc;
moduleStatus = com.google.youtube.players.modules.ModuleStatus.LOADING;
}
function init(ma, moduleConfigData) {
moduleStatus = com.google.youtube.players.modules.ModuleStatus.LOADING;
moduleAdapter = ma;
configData = moduleConfigData;
allowCrossDomainAccess();
initData(ma);
onInited();
if (moduleStatus == com.google.youtube.players.modules.ModuleStatus.LOADING) {
setStatus(com.google.youtube.players.modules.ModuleStatus.LOADED);
}
}
function initData(ma) {
}
function onInited() {
build();
}
function build() {
}
function onPlay(evt) {
}
function onPause(evt) {
}
function onEnd(evt) {
}
function onNewVideoLoad(evt) {
videoData = com.google.youtube.players.VideoData(evt.data);
}
function onSeek(evt) {
}
function onPlaylistScroll(evt) {
}
function onPlaylistClipSelected(evt) {
}
function onProgress(evt) {
}
function onMarker(evt) {
}
function onResize(evt) {
}
function onStartResize(evt) {
}
function getReservedRect() {
return(new com.google.geom.Rect());
}
function getStatus() {
return(moduleStatus);
}
function setStatus(state) {
if (moduleStatus != state) {
moduleStatus = state;
moduleAdapter.notify();
}
}
function getSubmenu(holder) {
return(undefined);
}
function getLoggingOptions() {
return({});
}
function destroy() {
}
function allowCrossDomainAccess() {
System.security.allowDomain("www.youtube.com");
System.security.allowDomain("s.ytimg.com");
System.security.allowDomain("youtube.com");
System.security.allowDomain("web1.sjl.youtube.com");
System.security.allowDomain("au.youtube.com");
System.security.allowDomain("br.youtube.com");
System.security.allowDomain("ca.youtube.com");
System.security.allowDomain("de.youtube.com");
System.security.allowDomain("es.youtube.com");
System.security.allowDomain("fr.youtube.com");
System.security.allowDomain("hk.youtube.com");
System.security.allowDomain("ie.youtube.com");
System.security.allowDomain("in.youtube.com");
System.security.allowDomain("it.youtube.com");
System.security.allowDomain("jp.youtube.com");
System.security.allowDomain("kr.youtube.com");
System.security.allowDomain("mx.youtube.com");
System.security.allowDomain("nl.youtube.com");
System.security.allowDomain("nz.youtube.com");
System.security.allowDomain("pl.youtube.com");
System.security.allowDomain("ru.youtube.com");
System.security.allowDomain("tw.youtube.com");
System.security.allowDomain("uk.youtube.com");
System.security.allowDomain("il.youtube.com");
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.base.BasePlayerModule";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.base.BasePlayerModule);
}
Symbol 20495 MovieClip [__Packages.com.google.youtube.players.ui.ShadowText] Frame 0
class com.google.youtube.players.ui.ShadowText
{
var overallHolder, shadowTextHolder, textHolder;
function ShadowText () {
}
function AdText() {
}
function init(targetClip) {
var _local3 = new TextFormat();
_local3.color = 13421772 /* 0xCCCCCC */;
_local3.size = 10;
_local3.font = "_sans";
var _local4 = new TextFormat();
_local4.color = 5066061 /* 0x4D4D4D */;
_local4.size = 10;
_local4.font = "_sans";
overallHolder = targetClip.createEmptyMovieClip("overallHolder", targetClip.getNextHighestDepth());
shadowTextHolder = overallHolder.createTextField("shadowTextHolder", overallHolder.getNextHighestDepth(), 1, 0, 0, 0);
textHolder = overallHolder.createTextField("textHolder", overallHolder.getNextHighestDepth(), 0, 0, 0, 0);
textHolder.setNewTextFormat(_local3);
shadowTextHolder.setNewTextFormat(_local4);
textHolder.selectable = false;
shadowTextHolder.selectable = false;
textHolder.autoSize = true;
shadowTextHolder.autoSize = true;
var _local5 = new flash.filters.GlowFilter(0, 0.1, 1, 1, 0, 3, false, false);
overallHolder.filters = new Array(_local5);
}
function setText(newText) {
textHolder.text = newText;
shadowTextHolder.text = newText;
}
function moveTo(newX, newY) {
overallHolder._x = newX;
overallHolder._y = newY;
}
function getWidth() {
return(overallHolder._width);
}
function getHeight() {
return(overallHolder._height);
}
function setVisible(isVisible) {
overallHolder._visible = isVisible;
}
static var HEIGHT_TEST_STRING = "XXX";
}
Symbol 20496 MovieClip [__Packages.com.google.youtube.players.IPlayerController] Frame 0
class com.google.youtube.players.IPlayerController implements com.google.youtube.IBroadcaster
{
function IPlayerController () {
}
}
Symbol 20497 MovieClip [__Packages.com.google.youtube.players.modules.ad.Main] Frame 0
class com.google.youtube.players.modules.ad.Main
{
function Main () {
}
static function main(mc) {
mc.createInstance = function () {
return(new com.google.youtube.players.modules.ad.AdModule(mc));
};
}
}
Symbol 20498 MovieClip [__Packages.com.google.chianti.event.EventBroadcaster] Frame 0
class com.google.chianti.event.EventBroadcaster
{
static var self;
var _eb_enabled, _eb_listeners, _eb_all_listeners, _eb_name;
function EventBroadcaster () {
}
static function initialize(obj, opt_ename) {
if (self == undefined) {
self = new com.google.chianti.event.EventBroadcaster();
}
for (var i in methods) {
obj[methods[i]] = self[methods[i]];
_global.ASSetPropFlags(obj, methods, 1);
}
obj._eb_listeners = new Object();
obj._eb_all_listeners = new Array();
obj._eb_enabled = true;
obj._eb_name = opt_ename;
_global.ASSetPropFlags(obj, ["_eb_listeners", "_eb_all_listeners", "_eb_enabled", "_eb_name"], 1);
}
static function bubbleEvent(event, target) {
event.bubbles = true;
var _local4 = target._parent;
while (_local4) {
if (_local4.broadcast != undefined) {
event.currentTarget = _local4;
_local4.broadcast(event);
break;
}
_local4 = _local4._parent;
}
}
function disableBroadcast() {
_eb_enabled = false;
}
function enableBroadcast() {
_eb_enabled = true;
}
function broadcast(event) {
if (_eb_enabled) {
if (event.target == undefined) {
event.target = this;
}
if (_eb_listeners[event.type] == undefined) {
_eb_listeners[event.type] = _eb_all_listeners.slice();
}
var _local3 = _eb_listeners[event.type].slice();
var _local4 = _local3.length;
if (_local4 > 0) {
var _local5 = 0;
for ( ; _local5 < _local4 ; _local5++) {
_local3[_local5](event);
}
}
if (event.bubbles) {
bubbleEvent(event, this);
}
}
}
function registerEvent(type, obj) {
if (typeof(obj) != "function") {
if (obj[_eb_name] == undefined) {
return(undefined);
}
obj = com.google.chianti.event.EventDelegate.create(obj, obj[_eb_name]);
}
if (type == ALL) {
_eb_all_listeners.push(obj);
for (var i in _eb_listeners) {
_eb_listeners[i].push(obj);
}
} else {
if (_eb_listeners[type] == undefined) {
_eb_listeners[type] = _eb_all_listeners.slice();
}
_eb_listeners[type].push(obj);
}
}
function registerEvents() {
var _local2 = arguments.pop();
var _local3 = arguments.length;
var _local4 = 0;
for ( ; _local4 < _local3 ; _local4++) {
registerEvent(arguments[_local4], _local2);
}
}
function unregisterEvent(type, obj) {
if (type == ALL) {
for (var i in _eb_listeners) {
unregisterEvent(i, obj);
}
var _local4 = _eb_all_listeners;
} else {
var _local4 = _eb_listeners[type];
}
var _local5 = _local4.length;
var _local6 = 0;
for ( ; _local6 < _local5 ; _local6++) {
if (_local4[_local6] == obj) {
_local4.splice(_local6, 1);
break;
}
}
}
function unregisterEvents() {
var _local2 = arguments.pop();
var _local3 = arguments.length;
var _local4 = 0;
for ( ; _local4 < _local3 ; _local4++) {
unregisterEvent(arguments[_local4], _local2);
}
}
function unregisterAll(opt_type) {
if (opt_type == undefined) {
delete _eb_listeners;
_eb_listeners = new Object();
} else {
delete _eb_listeners[opt_type];
}
}
function setEventName(name) {
_eb_name = name;
}
function getEventName() {
return(_eb_name);
}
static var ALL = "ALL";
static var methods = ["broadcast", "registerEvent", "unregisterEvent", "registerEvents", "unregisterEvents", "unregisterAll", "setEventName", "getEventName", "disableBroadcast", "enableBroadcast"];
}
Symbol 20499 MovieClip [__Packages.com.google.youtube.data.RestRequest] Frame 0
class com.google.youtube.data.RestRequest extends com.google.youtube.AbstractBroadcaster
{
var params, _restUrl, xmlData, broadcast;
function RestRequest (restUrl, opt_useSystemSuccessStatus) {
super();
params = [];
_restUrl = restUrl;
xmlData = new com.google.youtube.data.XMLData(opt_useSystemSuccessStatus);
xmlData.registerEvent(com.google.youtube.event.DataEvent.LOAD, com.google.chianti.event.EventDelegate.create(this, onDataLoad));
xmlData.registerEvent(com.google.youtube.event.DataEvent.ERROR, com.google.chianti.event.EventDelegate.create(this, onDataLoadError));
}
function addParameter(param, value) {
params.push((param + "=") + value);
}
function send() {
var _local2 = _restUrl;
if (_local2.indexOf("?") == -1) {
_local2 = _local2 + "?";
}
_local2 = _local2 + ("&" + params.join("&"));
xmlData.loadXML(_local2);
}
function onDataLoad(evt) {
broadcast(evt);
}
function onDataLoadError(evt) {
broadcast(evt);
}
}
Symbol 20500 MovieClip [__Packages.com.google.youtube.players.modules.IPlayerModuleDescriptor] Frame 0
class com.google.youtube.players.modules.IPlayerModuleDescriptor
{
function IPlayerModuleDescriptor () {
}
}
Symbol 20501 MovieClip [__Packages.com.google.youtube.players.modules.ISubmenu] Frame 0
class com.google.youtube.players.modules.ISubmenu
{
function ISubmenu () {
}
}
Symbol 20502 MovieClip [__Packages.com.google.youtube.util.StringUtil] Frame 0
class com.google.youtube.util.StringUtil
{
function StringUtil () {
}
static function secondsToTimeString(totalSeconds, opt_minRequiredPositions) {
if (!opt_minRequiredPositions) {
opt_minRequiredPositions = 1;
}
var _local4 = 0;
var _local5 = 0;
var _local6 = Math.max(totalSeconds, 0);
_local4 = Math.floor(_local6 / 3600);
_local6 = _local6 % 3600;
_local5 = Math.floor(_local6 / 60);
_local6 = _local6 % 60;
var _local7 = (((_local4 ? (_local4 + ":") : "") + (((_local4 > 0) && (_local5 < 10)) ? ("0" + _local5) : (_local5))) + ":") + ((_local6 < 10) ? ("0" + _local6) : (_local6));
var _local8 = _local7.split(":").join("").length;
while (_local8 < opt_minRequiredPositions) {
_local7 = ((_local8 % 2) ? ("0" + _local7) : ("0:" + _local7));
_local8 = _local7.split(":").join("").length;
}
return(_local7);
}
static function ellipsis(str, _textField, opt_textFormat) {
var _local5 = str;
if (opt_textFormat) {
_textField.setNewTextFormat(opt_textFormat);
}
var _local6 = _textField.text;
_textField.text = str;
if ((_textField.textWidth > _textField._width) || (_textField.textHeight > _textField._height)) {
var _local7 = Math.round(str.length / 2);
var _local8 = _local7;
do {
_local7 = Math.floor(_local7 / 2);
_textField.text = str.substr(0, _local8) + "...";
if ((_textField.textWidth > _textField._width) || (_textField.textHeight > _textField._height)) {
_local8 = _local8 - _local7;
} else {
_local8 = _local8 + _local7;
_local5 = _textField.text;
}
} while (_local7);
}
_textField.text = _local6;
return(_local5);
}
static function getLongestString(stringArray) {
var _local3 = stringArray.length;
var _local4 = "";
var _local5 = 0;
for ( ; _local5 < _local3 ; _local5++) {
if (stringArray[_local5].length > _local4.length) {
_local4 = stringArray[_local5];
}
}
return(_local4);
}
}
Symbol 20503 MovieClip [__Packages.com.google.youtube.players.modules.ad.CBSPlaylist] Frame 0
class com.google.youtube.players.modules.ad.CBSPlaylist extends com.google.youtube.AbstractBroadcaster
{
var ads, trackingEvents, status, playlistXML, trackingContext, broadcast, baseAdTag, positionIndex, baseTrackingTag, trackXML;
function CBSPlaylist () {
super();
ads = [];
trackingEvents = [];
status = STATUS_DEFAULT;
}
function init(playlistURL, context) {
playlistXML = new XML();
playlistXML.ignoreWhite = true;
playlistXML.onLoad = com.google.chianti.event.EventDelegate.create(this, onPlaylistXMLLoad);
var _local4 = "&part=ytube&domain=youtube.com";
setStatus(STATUS_INIT);
playlistXML.load(playlistURL + _local4);
trackingContext = context;
}
function setStatus(pendingStatus) {
if ((pendingStatus != undefined) && (status != pendingStatus)) {
status = pendingStatus;
broadcast({type:com.google.youtube.event.DataEvent.SET, target:this, data:status});
}
}
function onPlaylistXMLLoad(ok) {
if (ok) {
parsePlaylist();
} else {
setStatus(STATUS_COMPLETE);
}
}
function parsePlaylist() {
var _local2 = playlistXML.firstChild.firstChild;
for ( ; _local2 != null ; _local2 = _local2.nextSibling) {
if (_local2.nodeName == "seq") {
baseAdTag = _local2.firstChild.firstChild.toString();
positionIndex = baseAdTag.indexOf(POS_KEY);
var _local5 = _local2.firstChild.nextSibling.firstChild;
for ( ; _local5 != null ; _local5 = _local5.nextSibling) {
var _local4 = new com.google.youtube.players.modules.ad.CBSAd(_local5);
if (_local3) {
_local3.end = _local4.start - 1;
}
ads.push(_local4);
var _local3 = _local4;
}
} else if (_local2.nodeName == "trackings") {
baseTrackingTag = _local2.firstChild.firstChild.firstChild.toString();
var _local8 = _local2.firstChild.firstChild.nextSibling.firstChild;
for ( ; _local8 != null ; _local8 = _local8.nextSibling) {
var _local7 = new com.google.youtube.players.modules.ad.CBSTracking(_local8);
_local6.end = _local7.time - 1;
trackingEvents.push(_local7);
var _local6 = _local7;
}
}
}
if (ads.length || (trackingEvents.length)) {
ads.sortOn("start", Array.NUMERIC);
trackingEvents.sortOn("start", Array.NUMERIC);
setStatus(STATUS_ACTIVE);
} else {
setStatus(STATUS_COMPLETE);
}
broadcast({type:com.google.youtube.event.DataEvent.LOAD, target:this, status:getStatus()});
}
function onTrackXMLLoaded(ok, trackPath) {
var _local4 = {};
if (ok) {
var _local5 = trackXML.firstChild.firstChild.firstChild.firstChild;
var _local6 = _local5.attributes.src;
var _local7 = _local5.attributes.title;
var _local8 = trackPath.indexOf("ADID");
var _local9 = (trackPath.slice(0, _local8) + _local7.slice(0, 9)) + trackPath.slice(_local8 + 4);
var _local10 = _local5.nextSibling.attributes.href;
var _local11 = _local5.nextSibling.firstChild.attributes.href;
var _local12 = _local5.attributes["tp:trackingURLs"];
var _local13 = _local12.split(",");
var _local14 = [];
for (var i in _local13) {
var _local15 = _local13[i].split(";");
var _local16 = _local15[0].slice(0, -1);
var _local17 = Math.max(0, _global.parseInt(_local16));
var _local18 = new com.google.youtube.players.modules.ad.PercentPlaybackTracking(_local17, _local15[1]);
_local14.push(_local18);
}
if (_local10 == undefined) {
_local10 = _local11;
}
var _local19 = _local5.nextSibling.firstChild.attributes.alt;
var _local20 = _local5.nextSibling.attributes.src;
var _local21 = null;
if (_local11.length && (_local19.length && (_local20.length))) {
_local21 = ((((("<a href=\"" + _local11) + "\" target=\"_blank\" alt=\"") + _local19) + "\"/><img src=\"") + _local20) + "\"></a>";
}
_local4 = {mediaURL:_local6, clickThrough:_local10, title:_local7, trackingPath:_local9, percentTracking:_local14, companion:_local21};
} else {
setStatus(STATUS_COMPLETE);
}
broadcast({type:com.google.youtube.event.DataEvent.SET, target:this, status:getStatus(), data:_local4});
}
function getStatus() {
return(status);
}
function getAdTimes(duration) {
var _local3 = [];
for (var i in ads) {
var _local4 = com.google.youtube.players.modules.ad.CBSAd(ads[i]);
var _local5 = Math.max(1, Math.min(_local4.start, duration));
_local3.push(_local5);
}
return(_local3);
}
function requestAdForTime(rawVideoTime) {
var _local3 = Math.max(0, rawVideoTime);
var _local4 = ads.length;
var _local7 = false;
var _local8 = 0;
for ( ; _local8 < _local4 ; _local8++) {
var _local6 = com.google.youtube.players.modules.ad.CBSAd(ads[_local8]);
if ((_local6.start <= _local3) && ((_local3 <= _local6.end) && (!_local6.isDone))) {
var _local9 = (baseAdTag.slice(0, positionIndex) + _local6.pos) + baseAdTag.slice(positionIndex + 3);
loadContentXML(_local9, _global.unescape(baseTrackingTag + _local6.trackParam));
_local6.isDone = true;
_local7 = true;
break;
}
}
getTrackingForTime(rawVideoTime);
return(_local7);
}
function getTrackingForTime(rawVideoTime) {
var _local3 = Math.max(0, rawVideoTime);
var _local4 = trackingEvents.length;
var _local6 = 0;
for ( ; _local6 < _local4 ; _local6++) {
var _local5 = com.google.youtube.players.modules.ad.CBSTracking(trackingEvents[_local6]);
if ((_local5.time <= _local3) && (!_local5.isDone)) {
logEvent(_global.unescape(baseTrackingTag + _local5.trackParam));
_local5.isDone = true;
break;
}
}
}
function logEvent(path) {
if (path.length) {
var _local3 = trackingContext.createEmptyMovieClip("context", trackingContext.getNextHighestDepth());
var _local4 = new MovieClipLoader();
_local4.loadClip(path, _local3);
}
}
function loadContentXML(path, trackPath) {
trackXML = new XML();
trackXML.ignoreWhite = true;
trackXML.onLoad = com.google.chianti.event.EventDelegate.create(this, onTrackXMLLoaded, trackPath);
trackXML.load(path);
}
static var POS_KEY = "POS";
static var STATUS_ERROR = -1;
static var STATUS_DEFAULT = 0;
static var STATUS_INIT = 1;
static var STATUS_PENDING = 2;
static var STATUS_ACTIVE = 3;
static var STATUS_COMPLETE = 4;
var increment = 0;
}
Symbol 20504 MovieClip [__Packages.com.google.youtube.players.VideoPlayer] Frame 0
class com.google.youtube.players.VideoPlayer extends com.google.youtube.AbstractElement implements com.google.youtube.players.IVideoPlayer
{
var playMode, isSized, configData, soundController, dataType, data, playState, videoLoader, still, cuedVideoData, currentVideoData, broadcast, videoDisplay, videoDisplayBg, videoDisplayButton, preloader, errorDisplay, stillLoaderListener, attachMovie, createEmptyMovieClip, moduleDisplay, topmostModuleDisplay;
function VideoPlayer () {
super();
playMode = PLAY_ONE;
setPlayState(UNSTARTED);
isSized = false;
}
function init(configDataObj, soundController_, opt_layout, opt_dataType, opt_data) {
configData = configDataObj;
soundController = soundController_;
dataType = opt_dataType;
data = opt_data;
build();
}
function play() {
if ((playState != PLAYING) && (playState != BUFFERING)) {
if ((playState == ENDED) && (!getCurrentVideoData().startingFromOffset)) {
seekTo(0, true);
}
if (isVideoLoaded()) {
videoLoader.play();
} else if (getCuedVideoData() != null) {
loadVideoByVideoData(getCuedVideoData());
}
}
still._visible = false;
}
function pause() {
if (getPlayState() == PLAYING) {
videoLoader.pause();
}
}
function getCurrentTime() {
return(videoLoader.getCurrentTime());
}
function getVideoSize() {
return(videoLoader.getVideoSize());
}
function close() {
videoLoader.close();
cuedVideoData = null;
currentVideoData = null;
videoLoaded = false;
still.holder.unloadMovie();
}
function getBufferEmptyEvents() {
return(videoLoader.getBufferEmptyEvents());
}
function getNSBytesLoaded() {
return(videoLoader.getNSBytesLoaded());
}
function getNSBytesTotal() {
return(videoLoader.getNSBytesTotal());
}
function getStartPosition() {
return(videoLoader.getStartPosition());
}
function getDuration() {
return(videoLoader.getDuration());
}
function seekTo(seconds, allowSeekAhead) {
if (!videoLoader.isMetaDataLoaded()) {
getCurrentVideoData().startSeconds = seconds;
getCurrentVideoData().startingFromOffset = true;
play();
} else {
videoLoader.seekTo(seconds, allowSeekAhead);
if (getPlayState() == ENDED) {
videoLoader.pause();
}
}
broadcast({type:com.google.youtube.event.VideoPlayerEvent.SEEKING});
}
function testHit(x, y) {
return(videoDisplay.hitTest(x, y));
}
function getDisplayRect() {
return(new com.google.geom.Rect(videoDisplay._x, videoDisplay._y, videoDisplay._width, videoDisplay._height));
}
function getViewportRect() {
return(new com.google.geom.Rect(videoDisplayBg._x, videoDisplayBg._y, videoDisplayBg._width, videoDisplayBg._height));
}
function getViewportScale(opt_useUiScale) {
var _local5 = getViewportRect();
if ((_local5.width / STILL_ASPECT_RATIO) > _local5.height) {
var _local3 = _local5.height;
var _local4 = (opt_useUiScale ? (DEFAULT_UI_HEIGHT) : (DEFAULT_HEIGHT));
} else {
var _local3 = _local5.width;
var _local4 = (opt_useUiScale ? (DEFAULT_UI_WIDTH) : (DEFAULT_WIDTH));
}
return((_local3 / _local4) * 100);
}
function setViewportSize(newX, newY, newWidth, newHeight, doSmoothTransition) {
newX = Math.round(newX);
newY = Math.round(newY);
newWidth = Math.round(newWidth);
newHeight = Math.round(newHeight);
var _local7 = new com.google.geom.Rect(newX, newY, newWidth, newHeight);
var _local8 = getVideoSize();
var _local9 = _local8.width;
var _local10 = _local8.height;
if ((!_local9) || (!_local10)) {
_local9 = videoDisplay.video.width;
_local10 = videoDisplay.video.height;
if ((!_local9) || (!_local10)) {
_local9 = com.google.youtube.players.VideoLoader.DEFAULT_VIDEO_WIDTH;
_local10 = com.google.youtube.players.VideoLoader.DEFAULT_VIDEO_HEIGHT;
}
}
var _local11 = _local9 / _local10;
var _local12 = newWidth;
var _local13 = newHeight;
if (_local12 > (_local11 * newHeight)) {
_local12 = _local11 * newHeight;
} else {
_local13 = newWidth / _local11;
}
var _local14 = newX;
var _local15 = newY;
if (_local12 < _local7.width) {
_local14 = Math.floor((_local7.width - _local12) / 2) + _local7.x;
}
if (_local13 < _local7.height) {
_local15 = Math.floor((_local7.height - _local13) / 2) + _local7.y;
}
_local14 = Math.round(_local14);
_local15 = Math.round(_local15);
_local12 = Math.round(_local12);
_local13 = Math.round(_local13);
if ((_local12 == _local9) && (_local13 == _local10)) {
setSmoothing(false);
} else {
setSmoothing(true);
}
var _local16 = _local7.width;
var _local17 = _local7.height;
if (_local16 > (STILL_ASPECT_RATIO * _local7.height)) {
_local16 = STILL_ASPECT_RATIO * _local17;
} else {
_local17 = _local16 / STILL_ASPECT_RATIO;
}
var _local18 = Math.round((_local7.width - _local16) / 2) + _local7.x;
var _local19 = Math.round((_local7.height - _local17) / 2) + _local7.y;
if (doSmoothTransition) {
broadcast({type:com.google.youtube.event.UIEvent.START_RESIZE, target:this});
com.gs.TweenLite.to(videoDisplay, MENU_TRANSITION_SPEED, {_width:_local12, _height:_local13, _x:_local14, _y:_local15, onComplete:com.google.chianti.event.EventDelegate.create(this, broadcastViewportSizeChange)});
com.gs.TweenLite.to(videoDisplayButton, MENU_TRANSITION_SPEED, {_width:_local12, _height:_local13, _x:_local14, _y:_local15});
com.gs.TweenLite.to(still, MENU_TRANSITION_SPEED, {_width:_local16, _height:_local17, _x:_local18, _y:_local19});
com.gs.TweenLite.to(preloader, MENU_TRANSITION_SPEED, {_x:(_local12 / 2) + _local14, _y:(_local13 / 2) + _local15});
com.gs.TweenLite.to(errorDisplay, MENU_TRANSITION_SPEED, {_width:_local7.width, _height:_local7.height, _x:_local7.x, _y:_local7.y});
com.gs.TweenLite.to(videoDisplayBg, MENU_TRANSITION_SPEED, {_width:_local7.width, _height:_local7.height, _x:_local7.x, _y:_local7.y});
} else {
videoDisplay._x = (videoDisplayButton._x = _local14);
videoDisplay._y = (videoDisplayButton._y = _local15);
videoDisplay._width = (videoDisplayButton._width = _local12);
videoDisplay._height = (videoDisplayButton._height = _local13);
errorDisplay._x = _local7.x;
errorDisplay._y = _local7.y;
errorDisplay._width = _local7.width;
errorDisplay._height = _local7.height;
preloader._x = (_local7.width / 2) + _local7.x;
preloader._y = (_local7.height / 2) + _local7.y;
still._x = _local18;
still._y = _local19;
still._width = _local16;
still._height = _local17;
videoDisplayBg._x = _local7.x;
videoDisplayBg._y = _local7.y;
videoDisplayBg._width = _local7.width;
videoDisplayBg._height = _local7.height;
broadcastViewportSizeChange();
}
}
function broadcastViewportSizeChange() {
broadcast({type:com.google.youtube.event.UIEvent.RESIZE, target:this});
}
function isVideoLoaded() {
return(videoLoaded);
}
function getPlayState() {
return(playState);
}
function setPlayState(newPlayState) {
if (newPlayState != getPlayState()) {
playState = newPlayState;
broadcast({type:com.google.youtube.event.VideoPlayerEvent.STATE_CHANGE, data:playState, target:this});
}
}
function loadVideoByVideoData(videoData) {
if ((!videoData.id) && (!videoData.flvurl)) {
return(undefined);
}
clear();
videoLoader.reset();
videoLoaded = false;
currentVideoData = null;
cuedVideoData = null;
isSized = false;
if (recoverableErrorActive) {
errorDisplay.error_txt.text = "";
errorDisplay._visible = false;
}
still._visible = false;
if (videoData.loadingFromOffset) {
cuedVideoData = videoData;
getCurrentVideoData().loadingFromOffset = null;
seekTo(getCurrentVideoData().startSeconds, true);
} else {
currentVideoData = videoData;
videoLoaded = true;
videoLoader.loadVideoByVideoData(videoData);
setPreloaderVisibility(true);
}
}
function cueVideoByVideoData(videoData) {
if (!videoData.id) {
return(undefined);
}
clear();
videoLoader.reset();
videoLoaded = false;
still._visible = true;
var _local3 = new com.google.utils.ImageLoader(true);
stillLoaderListener = {};
stillLoaderListener.onLoadInit = com.google.chianti.event.EventDelegate.create(this, onStillLoaded);
_local3.addListener(stillLoaderListener);
still.holder.removeMovieClip();
still.createEmptyMovieClip("holder", 1);
still.holder._alpha = 0;
if (videoData.thumbnailUrlHighQuality != undefined) {
_local3.loadImage(videoData.thumbnailUrlHighQuality, still.holder);
} else {
_local3.loadImage(videoData.thumbnailUrl.toString(), still.holder);
}
cuedVideoData = videoData;
currentVideoData = null;
setPlayState(VIDEO_CUED);
broadcast({type:com.google.youtube.event.VideoPlayerEvent.VIDEO_CUED, data:videoData, target:this});
}
function clear() {
videoDisplay.video.clear();
}
function getCuedVideoData() {
return(cuedVideoData);
}
function showRecoverableError(msg) {
errorDisplay._visible = true;
errorDisplay.error_txt.text = msg;
recoverableErrorActive = true;
}
function showFatalError(msg) {
errorDisplay._visible = true;
errorDisplay.error_txt.text = msg;
}
function setPlayMode(newMode) {
playMode = newMode;
broadcast({type:com.google.youtube.event.VideoPlayerEvent.PLAY_MODE_CHANGE, data:{mode:newMode}, target:this});
}
function getPlayMode() {
return(playMode);
}
function onStillLoaded(mc) {
mc._width = DEFAULT_WIDTH;
mc._height = DEFAULT_HEIGHT;
mc._alpha = 100;
}
function onLoadNewVideo(evt) {
setNetStream(videoLoader.getNetStream());
broadcast({type:com.google.youtube.event.VideoPlayerEvent.LOAD_NEW_VIDEO, data:evt.data, target:this});
}
function onUnloadVideo(evt) {
broadcast({type:com.google.youtube.event.VideoPlayerEvent.UNLOAD_VIDEO, target:this});
}
function onProgress(evt) {
broadcast({type:com.google.youtube.event.VideoPlayerEvent.PROGRESS, data:evt.data, target:this});
if ((!isSized) && (videoDisplay.video.width && (videoDisplay.video.height))) {
isSized = true;
var _local3 = getViewportRect();
setViewportSize(_local3.x, _local3.y, _local3.width, _local3.height);
}
}
function onBytesLoaded(evt) {
broadcast({type:com.google.youtube.event.VideoPlayerEvent.BYTES_LOADED, data:evt.data, target:this});
}
function onMetaLoaded(evt) {
if (getCurrentVideoData().startingFromOffset) {
getCurrentVideoData().startingFromOffset = false;
seekTo(getCurrentVideoData().startSeconds, true);
}
var _local3 = getViewportRect();
setViewportSize(_local3.x, _local3.y, _local3.width, _local3.height);
broadcast({type:com.google.youtube.event.VideoPlayerEvent.META_LOAD, data:evt.data, target:this});
}
function onVideoLoaderStateChange(evt) {
switch (evt.type) {
case com.google.youtube.event.VideoLoaderEvent.PLAY :
if (getPlayState() != PLAYING) {
setPlayState(PLAYING);
setPreloaderVisibility(false);
broadcast({type:com.google.youtube.event.VideoPlayerEvent.PLAY, target:this});
}
break;
case com.google.youtube.event.VideoLoaderEvent.BUFFERING :
if (getPlayState() != BUFFERING) {
setPlayState(BUFFERING);
setPreloaderVisibility(true);
broadcast({type:com.google.youtube.event.VideoPlayerEvent.BUFFERING, target:this});
}
break;
case com.google.youtube.event.VideoLoaderEvent.PAUSE :
setPlayState(PAUSED);
broadcast({type:com.google.youtube.event.VideoPlayerEvent.PAUSE, target:this});
break;
case com.google.youtube.event.VideoLoaderEvent.END :
setPlayState(ENDED);
setPreloaderVisibility(false);
broadcast({type:com.google.youtube.event.VideoPlayerEvent.END, target:this});
}
}
function getCurrentVideoData() {
if (videoLoaded) {
return(currentVideoData);
}
return(cuedVideoData);
}
function getVideoUrl() {
var _local2 = configData.BASE_YT_URL + "watch?v=";
var _local3 = getCurrentVideoData().id;
if (_local3) {
_local2 = _local2 + _local3;
_local2 = _local2 + (configData.eurl ? ("&eurl=" + configData.eurl) : "");
return(_local2);
}
return("");
}
function setPreloaderVisibility(visible) {
if (visible) {
preloader = attachMovie("preloader", "preloader", PRELOADER_DEPTH);
preloader._xscale = (preloader._yscale = 200);
var _local3 = getDisplayRect();
preloader._x = _local3.x + (_local3.width / 2);
preloader._y = _local3.y + (_local3.height / 2);
} else {
preloader.removeMovieClip();
}
}
function onVideoDisplayRelease() {
broadcast({type:com.google.youtube.event.GenericButtonEvent.RELEASE, target:this});
}
function getVideoEmbedCode() {
return(configData.getEmbedHtml(getCurrentVideoData().id));
}
function onStreamNotFound(evt) {
setPreloaderVisibility(false);
broadcast(evt);
}
function onVideoDataError(evt) {
setPreloaderVisibility(false);
broadcast(evt);
}
function onVideoDataLoaded(evt) {
broadcast(evt);
}
function setNetStream(ns) {
videoDisplay.video.attachVideo(ns);
}
function setSmoothing(enable) {
videoDisplay.video.smoothing = enable;
}
function onKeyUp() {
switch (Key.getCode()) {
case Key.SPACE :
if (getPlayState() == PLAYING) {
pause();
} else {
play();
}
break;
case Key.LEFT :
seekTo(0, true);
break;
case Key.RIGHT :
var _local2 = getDuration() / 10;
seekTo(Math.min(getCurrentTime() + _local2, getDuration()), true);
}
}
function enableKeyboardControls() {
Key.addListener(this);
}
function createVideoLoader() {
return(new com.google.youtube.players.VideoLoader(configData, soundController, dataType, data));
}
function build() {
still = createEmptyMovieClip("still", STILL_DEPTH);
var _local2 = still.createEmptyMovieClip("mask", 2);
com.google.youtube.util.Drawing.drawRect(_local2, 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT, 6684672);
still.setMask(_local2);
videoLoader = createVideoLoader();
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.PLAY, com.google.chianti.event.EventDelegate.create(this, onVideoLoaderStateChange));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.PAUSE, com.google.chianti.event.EventDelegate.create(this, onVideoLoaderStateChange));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.BUFFERING, com.google.chianti.event.EventDelegate.create(this, onVideoLoaderStateChange));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.NET_STREAM_STATUS, com.google.chianti.event.EventDelegate.create(this, onVideoLoaderStateChange));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.END, com.google.chianti.event.EventDelegate.create(this, onVideoLoaderStateChange));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.PROGRESS, com.google.chianti.event.EventDelegate.create(this, onProgress));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.BYTES_LOADED, com.google.chianti.event.EventDelegate.create(this, onBytesLoaded));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.META_LOAD, com.google.chianti.event.EventDelegate.create(this, onMetaLoaded));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.LOAD_NEW_VIDEO, com.google.chianti.event.EventDelegate.create(this, onLoadNewVideo));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.UNLOAD_VIDEO, com.google.chianti.event.EventDelegate.create(this, onUnloadVideo));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.STREAM_NOT_FOUND, com.google.chianti.event.EventDelegate.create(this, onStreamNotFound));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.VIDEO_DATA_ERROR, com.google.chianti.event.EventDelegate.create(this, onVideoDataError));
videoLoader.registerEvent(com.google.youtube.event.VideoLoaderEvent.VIDEO_DATA_LOADED, com.google.chianti.event.EventDelegate.create(this, onVideoDataLoaded));
videoDisplayBg = createEmptyMovieClip("videoDisplayBg", VIDEO_DISPLAY_BG_DEPTH);
com.google.youtube.util.Drawing.drawRect(videoDisplayBg, 0, 0, com.google.youtube.players.VideoLoader.DEFAULT_VIDEO_WIDTH, com.google.youtube.players.VideoLoader.DEFAULT_VIDEO_HEIGHT, 0);
videoDisplay = attachMovie("VideoDisplay", "videoDisplay", VIDEO_DISPLAY_DEPTH);
videoDisplayButton = createEmptyMovieClip("videoDisplayButton", DISPLAY_BUTTON_DEPTH);
com.google.youtube.util.Drawing.drawRect(videoDisplayButton, 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT, 16711680);
enableVideoDisplayButton();
videoDisplayButton._alpha = 0;
moduleDisplay = createEmptyMovieClip("moduleDisplay", MODULE_DISPLAY_DEPTH);
topmostModuleDisplay = createEmptyMovieClip("topmostModuleDisplay", TOPMOST_MODULE_DISPLAY_DEPTH);
errorDisplay = createEmptyMovieClip("errorDisplay", ERROR_DISPLAY_DEPTH);
com.google.youtube.util.Drawing.drawRect(errorDisplay, 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT, 0);
errorDisplay._alpha = 90;
var _local3 = new TextFormat();
_local3.color = 16777215 /* 0xFFFFFF */;
_local3.size = 15;
_local3.font = "_sans";
_local3.align = "center";
errorDisplay.createTextField("error_txt", errorDisplay.getNextHighestDepth(), 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT);
errorDisplay.error_txt.multiline = true;
errorDisplay.error_txt.wordWrap = true;
errorDisplay.error_txt.setNewTextFormat(_local3);
errorDisplay._visible = false;
if (configData.disableKeyboard != "1") {
enableKeyboardControls();
}
}
function enableVideoDisplayButton() {
videoDisplayButton.onRelease = com.google.chianti.event.EventDelegate.create(this, onVideoDisplayRelease);
}
function disableVideoDisplayButton() {
delete videoDisplayButton.onRelease;
}
function getModuleDisplay() {
return(moduleDisplay);
}
function getTopmostModuleDisplay() {
return(topmostModuleDisplay);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.VideoPlayer";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.VideoPlayer);
static var DEFAULT_WIDTH = 480;
static var DEFAULT_HEIGHT = 360;
static var DEFAULT_UI_WIDTH = 300;
static var DEFAULT_UI_HEIGHT = 225;
static var MENU_TRANSITION_SPEED = 1;
static var UNSTARTED = -1;
static var ENDED = 0;
static var PLAYING = 1;
static var PAUSED = 2;
static var BUFFERING = 3;
static var SEEKING = 4;
static var VIDEO_CUED = 5;
static var PLAY_ONE = "playone";
static var PLAY_ALL = "playall";
static var VIDEO_DISPLAY_BG_DEPTH = 10;
static var STILL_DEPTH = 20;
static var VIDEO_DISPLAY_DEPTH = 30;
static var DISPLAY_BUTTON_DEPTH = 40;
static var MODULE_DISPLAY_DEPTH = 50;
static var ERROR_DISPLAY_DEPTH = 60;
static var END_SCREEN_DEPTH = 70;
static var RESTORE_SIZE_BUTTON_DEPTH = 80;
static var TOPMOST_MODULE_DISPLAY_DEPTH = 90;
static var PRELOADER_DEPTH = 100;
static var LARGE_PLAY_BUTTON_DEPTH = 110;
static var STILL_ASPECT_RATIO = 4 / 3;
var videoLoaded = false;
var recoverableErrorActive = false;
}
Symbol 20505 MovieClip [__Packages.com.google.youtube.util.GradientFill] Frame 0
class com.google.youtube.util.GradientFill
{
var colors, fillType, alphas, ratios, matrix;
function GradientFill (newColors, newFillType, newAlphas, newRatios, newX, newY, newHeight, newWidth, optRotation) {
colors = newColors;
fillType = newFillType;
alphas = newAlphas;
ratios = newRatios;
matrix = {matrixType:"box", x:newX, y:newY, w:newWidth, h:newHeight, r:(optRotation ? ((optRotation / 180) * Math.PI) : 0)};
}
static var LINEAR_FILL = "linear";
static var RADIAL_FILL = "radial";
}
Symbol 20506 MovieClip [__Packages.com.google.youtube.players.modules.ad.DartOverlay] Frame 0
class com.google.youtube.players.modules.ad.DartOverlay extends com.google.youtube.players.modules.ad.DartAd
{
var broadcast, timeout, ctpAd, closeButton, end, adMask, createEmptyMovieClip, getNextHighestDepth, dartAdHolder, clickTarget, interfaceLanguage, attachMovie;
function DartOverlay () {
super();
}
function hide() {
super.hide();
showCloseButton();
}
function setAdTagUrl(adTag) {
if (adTag.charAt(adTag.length - 1) != ";") {
adTag = adTag + ";ptile=2;dcopt=ist";
} else {
adTag = adTag + "ptile=2;dcopt=ist";
}
super.setAdTagUrl(adTag);
}
function onOverlayClicked() {
broadcast({type:com.google.youtube.event.DartAdEvent.DART_AD_CLICKED, data:this});
}
function setAdTimeout(newTimeout) {
timeout = newTimeout;
}
function setCtpAd(newCtpAd) {
ctpAd = newCtpAd;
}
function hideCloseButton() {
closeButton._visible = false;
}
function showCloseButton() {
closeButton._visible = true;
}
function onCloseButtonRelease() {
end();
}
function build() {
super.build();
var _local3 = {colors:[0], fillType:"linear", alphas:[0], ratios:[0], matrix:{matrixType:"box", x:0, y:0, w:DEFAULT_WIDTH, h:DEFAULT_HEIGHT, r:(90 / 180) * Math.PI}};
var _local4 = {alpha:0, thickness:0, color:0};
adMask = createEmptyMovieClip("adMask", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(adMask, 0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT, _local3, _local4, 0, false);
dartAdHolder.setMask(adMask);
clickTarget = createEmptyMovieClip("clickTarget", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(clickTarget, 0, 0, DEFAULT_WIDTH, OPAQUE_HEIGHT, _local3, _local4, 0, false);
clickTarget.onRelease = com.google.chianti.event.EventDelegate.create(this, onOverlayClicked);
var _local5 = new com.google.youtube.players.modules.ad.ui.AdText();
_local5.init(this, interfaceLanguage);
_local5.moveTo((DEFAULT_WIDTH - AD_TEXT_PADDING) - _local5.getWidth(), (DEFAULT_HEIGHT - AD_TEXT_PADDING) - _local5.getHeight());
closeButton = attachMovie(com.google.youtube.players.modules.ad.ui.CloseButton.LINK_NAME, "closeButton", getNextHighestDepth());
closeButton.setSize(CLOSE_BUTTON_SIZE);
closeButton.registerEvent(com.google.youtube.event.GenericButtonEvent.RELEASE, com.google.chianti.event.EventDelegate.create(this, onCloseButtonRelease));
closeButton._x = (DEFAULT_WIDTH - (closeButton._width / 2)) - CLOSE_BUTTON_PADDING;
closeButton._y = (DEFAULT_HEIGHT - OPAQUE_HEIGHT) + ((closeButton._height / 2) + CLOSE_BUTTON_PADDING);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.ad.DartOverlay";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.ad.DartOverlay);
static var DEFAULT_WIDTH = 480;
static var DEFAULT_HEIGHT = 70;
static var OPAQUE_HEIGHT = 55;
static var CLOSE_BUTTON_PADDING = 5;
static var CLOSE_BUTTON_SIZE = 13;
static var AD_TEXT_PADDING = 5;
}
Symbol 20507 MovieClip [__Packages.com.google.youtube.data.XMLDataNode] Frame 0
class com.google.youtube.data.XMLDataNode extends com.google.youtube.AbstractBroadcaster
{
var ASSetPropFlags, _value;
function XMLDataNode () {
super();
}
function get length() {
if (!lengthSet) {
lengthSet = true;
this[0] = {};
for (var p in this) {
this[0][p] = this[p];
}
_length = 1;
ASSetPropFlags(this, ["_length", 0, "lengthSet"], 1);
}
return(_length);
}
function toString() {
return(_value);
}
var _length = 0;
var lengthSet = false;
}
Symbol 20508 MovieClip [__Packages.com.google.chianti.event.EventDelegate] Frame 0
class com.google.chianti.event.EventDelegate extends Object
{
function EventDelegate () {
super();
}
static function create(scope, handler, data) {
var _local2 = function () {
if (data != undefined) {
arguments.push(data);
}
return(handler.apply(scope, arguments));
};
_local2.scope = scope;
return(_local2);
}
}
Symbol 20509 MovieClip [__Packages.com.google.youtube.players.modules.ISubmenuObservable] Frame 0
class com.google.youtube.players.modules.ISubmenuObservable
{
function ISubmenuObservable () {
}
}
Symbol 20510 MovieClip [__Packages.com.google.youtube.players.modules.ad.DartAdTagHandler] Frame 0
class com.google.youtube.players.modules.ad.DartAdTagHandler
{
var currentTile, isValid, callTypeSplit, postCallTypeSplit, sizeSplit, postSizeSplit, ordValue, adId;
function DartAdTagHandler () {
}
function init(adTag) {
currentTile = 1;
splitTag(adTag);
}
function isRichMediaTag() {
return(isValid);
}
function splitTag(adTag) {
var _local3 = adTag.indexOf("pfadx");
var _local4 = adTag.indexOf(";sz=");
var _local5 = adTag.indexOf(";", _local4 + 1);
if ((_local3 < 0) || ((_local4 < 0) || (_local5 < 0))) {
isValid = false;
return(undefined);
}
isValid = true;
callTypeSplit = adTag.substr(0, _local3);
postCallTypeSplit = adTag.substr(_local3 + 5, (_local4 + 1) - (_local3 + 5));
sizeSplit = adTag.substr(_local4 + 1, _local5 - (_local4 + 1));
postSizeSplit = adTag.substr(_local5, adTag.length - _local5);
if (postSizeSplit.charAt(postSizeSplit.length - 1) != ";") {
postSizeSplit = postSizeSplit + ";";
}
}
function getOrdValue() {
if (_global.isNaN(ordValue)) {
ordValue = random(999999999);
}
return(ordValue);
}
function setOrdValue(newNumber) {
ordValue = newNumber;
}
function setAdId(newAdId) {
adId = newAdId;
}
function getRichMediaTag() {
return(((((((callTypeSplit + "adx") + postCallTypeSplit) + "sz=450x60") + postSizeSplit) + "ptile=3;") + "ord=") + getOrdValue());
}
function getInteractiveTag() {
return((((((((((callTypeSplit + "adi") + postCallTypeSplit) + "dc_seed=") + adId) + ";") + "sz=400x285") + postSizeSplit) + "tile=2") + ";ord=") + getOrdValue());
}
}
Symbol 20511 MovieClip [__Packages.com.google.utils.DownloadTimer] Frame 0
class com.google.utils.DownloadTimer
{
var startBytes, endBytes, startTime, endTime, firstSample;
function DownloadTimer (curBytes, curTime) {
resetEstimator(curBytes, curTime);
}
function clearHistory() {
startBytes = endBytes;
startTime = endTime;
}
function resetEstimator(curBytes, curTime) {
startBytes = (endBytes = curBytes);
startTime = (endTime = curTime);
firstSample = true;
}
function addData(curBytes, curTime) {
if (curBytes < endBytes) {
resetEstimator(curBytes, curTime);
} else if (curBytes > endBytes) {
endBytes = curBytes;
endTime = curTime;
if (firstSample) {
clearHistory();
firstSample = false;
}
}
}
function getDuration() {
return(endTime - startTime);
}
function getSize() {
return(endBytes - startBytes);
}
}
Symbol 20512 MovieClip [__Packages.com.google.utils.StringUtils] Frame 0
class com.google.utils.StringUtils
{
function StringUtils () {
}
static function beginsWith(str, beginning) {
if ((str == undefined) || ((str == null) || ((!str.length) || ((beginning == undefined) || ((beginning == null) || ((!beginning.length) || (str.length < beginning.length))))))) {
return(false);
}
var _local4 = 0;
for ( ; _local4 < beginning.length ; _local4++) {
if (str.charAt(_local4) != beginning.charAt(_local4)) {
return(false);
}
}
return(true);
}
static function FormatTime(time) {
time = Math.floor(time);
var _local3 = time % 60;
var _local4 = Math.floor((time / 60) % 60);
var _local5 = Math.floor(time / 3600);
var _local6 = "";
if (_local5 > 0) {
_local6 = _local6 + (_local5 + ":");
}
if (_local4 < 10) {
_local6 = _local6 + "0";
}
_local6 = _local6 + (_local4 + ":");
if (_local3 < 10) {
_local6 = _local6 + "0";
}
_local6 = _local6 + String(_local3);
return(_local6);
}
static function trim(str) {
if ((str == undefined) || (str == null)) {
return(str);
}
var _local3 = " \t\n\r";
var _local4 = 0;
// unexpected jump
do {
_local4++;
if (_local4 >= str.length) {
break;
}
} while (_local3.indexOf(str.charAt(_local4)) >= 0);
var _local5 = str.length - 1;
// unexpected jump
do {
_local5--;
if (_local5 < _local4) {
break;
}
} while (_local3.indexOf(str.charAt(_local5)) >= 0);
if (_local4 > _local5) {
return("");
}
return(str.substring(_local4, _local5 + 1));
}
static function truncate(str, num) {
if (str.length <= num) {
return(str);
}
return(str.substr(0, num - 3) + "...");
}
static function replace(str, pat, rep) {
if ((str == undefined) || ((pat == undefined) || (pat == ""))) {
return(str);
}
if (rep == undefined) {
rep = "";
}
return(str.split(pat).join(rep));
}
static function isEmpty(str) {
return((str == null) || ((str == undefined) || (str == "")));
}
}
Symbol 20513 MovieClip [__Packages.com.google.utils.UrlConstructor] Frame 0
class com.google.utils.UrlConstructor
{
var baseUrl_, hasParameter_;
function UrlConstructor (baseUrl) {
baseUrl_ = baseUrl;
hasParameter_ = true;
if (baseUrl_.indexOf("?") < 0) {
hasParameter_ = false;
baseUrl_ = baseUrl_ + "?";
}
}
function addGlobalParameters(args) {
baseUrl_ = makeUrl(args);
hasParameter_ = true;
}
function get url() {
return(baseUrl_);
}
function makeUrl(args) {
var _local3 = baseUrl_;
var _local4 = hasParameter_;
for (var key in args) {
if (_local4) {
_local3 = _local3 + "&";
}
_local3 = _local3 + ((key + "=") + args[key]);
_local4 = true;
}
return(_local3);
}
}
Symbol 20514 MovieClip [__Packages.com.google.youtube.event.DartAdEvent] Frame 0
class com.google.youtube.event.DartAdEvent
{
function DartAdEvent () {
}
static var DART_CUSTOM_AD = "onDartCustomAd";
static var DART_AD_LOADED = "onDartAdLoaded";
static var DART_AD_CLOSED = "onDartAdClosed";
static var DART_AD_OPENED = "onDartAdOpened";
static var DART_AD_CLICKED = "onDartAdClicked";
static var DART_AD_POSTROLL = "onDartAdPostroll";
static var DART_AD_ERROR = "onDartAdError";
}
Symbol 20515 MovieClip [__Packages.com.google.utils.SecurityUtils] Frame 0
class com.google.utils.SecurityUtils
{
function SecurityUtils () {
}
static function hasValidUrlScheme(url) {
return(com.google.utils.StringUtils.beginsWith(url, "http:") || (com.google.utils.StringUtils.beginsWith(url, "https:") || (com.google.utils.StringUtils.beginsWith(url, "ftp:"))));
}
static function hasUrlDirectoryTraversal(url) {
var _local3 = _global.unescape(url).toUpperCase();
return((_local3.indexOf("..") >= 0) || ((_local3.indexOf(".%2E") >= 0) || ((_local3.indexOf("%2E.") >= 0) || (_local3.indexOf("%2E%2E") >= 0))));
}
static function isSafeUrl(url) {
return(hasValidUrlScheme(url) && (!hasUrlDirectoryTraversal(url)));
}
}
Symbol 20516 MovieClip [__Packages.com.google.utils.VideoStats] Frame 0
class com.google.utils.VideoStats
{
static var downloadPerfLoaded_, downloadPerf_;
var urlBase_, namespace_, parameters_, playbackStarted_, startTimes_, endTimes_, sendSegments_, lastBufferEmptyEvents_, thresholdCount_, multipleInterval_, eventReporter_, sendDownloadData_, getBytesDownloaded, recordedDownloadPerformance_, downloadTimer_, downloadPerformanceTimer_, numSegments_, numSegmentsSent_, startTime_, lastMediaTime_, getMediaTime, lastRealTime_, segmentStart_, sendInterval_, sentInitialPing_, sentTimeoutPing_, mediaInterval_, count_, lastBytes_, getMediaDuration, getVideoDownloadRetries, getBufferEmptyEvents, getPlayerState;
function VideoStats (urlBase, namespace, parameters) {
urlBase_ = urlBase;
namespace_ = namespace;
parameters_ = {};
for (var key in parameters) {
if ((typeof(parameters[key]) == "string") || (typeof(parameters[key]) == "number")) {
parameters_[key] = parameters[key];
}
}
playbackStarted_ = false;
startTimes_ = new Array();
endTimes_ = new Array();
sendSegments_ = false;
lastBufferEmptyEvents_ = 0;
downloadPerfLoaded_ = false;
thresholdCount_ = 3;
multipleInterval_ = 4;
}
function setEventReporterParameters(docid, format, sw) {
if ((namespace_ != undefined) && (namespace_ != "")) {
eventReporter_.addGlobalParameters({ns:namespace_});
}
eventReporter_.addGlobalParameters({docid:docid});
if (sw != undefined) {
eventReporter_.addGlobalParameters({sw:sw});
}
if ((format != undefined) && (format != "")) {
eventReporter_.addGlobalParameters({fmt:format});
}
eventReporter_.addGlobalParameters(parameters_);
}
function registerImpression(docid, format, sw) {
if (playbackStarted_) {
endPlayback();
}
if (eventReporter_) {
delete eventReporter_;
}
eventReporter_ = new com.google.utils.EventReporter(urlBase_);
setEventReporterParameters(docid, sw, format);
var _local5 = {};
_local5.vi = "1";
eventReporter_.send(_local5);
}
function startPlayback(docid, format, sw) {
if (playbackStarted_) {
endPlayback();
}
playbackStarted_ = true;
if (eventReporter_ == undefined) {
eventReporter_ = new com.google.utils.EventReporter(urlBase_);
setEventReporterParameters(docid, format, sw);
}
if (sw != undefined) {
sendSegments_ = true;
}
loadBandwidthData();
var _local5 = 0;
var _local6 = 0;
for (var index in downloadPerf_) {
_local5 = _local5 + downloadPerf_[index].bytes;
_local6 = _local6 + downloadPerf_[index].time;
}
if ((_local5 > 0) && (_local6 > 0)) {
eventReporter_.addGlobalParameters({hbd:_local5});
eventReporter_.addGlobalParameters({hbt:_local6});
}
sendDownloadData_ = false;
var _local7 = getBytesDownloaded();
var _local8 = getTimerInSeconds();
recordedDownloadPerformance_ = false;
downloadTimer_ = new com.google.utils.DownloadTimer(_local7, _local8);
downloadPerformanceTimer_ = new com.google.utils.DownloadTimer(_local7, _local8);
numSegments_ = 0;
numSegmentsSent_ = 0;
startTime_ = _local8;
lastMediaTime_ = getMediaTime();
lastRealTime_ = startTime_;
segmentStart_ = lastMediaTime_;
sendInterval_ = null;
sentInitialPing_ = false;
sentTimeoutPing_ = false;
mediaInterval_ = _global.setInterval(this, "mediaUpdate", 100);
}
function endPlayback() {
if (playbackStarted_) {
playbackStarted_ = false;
if (mediaInterval_ != null) {
_global.clearInterval(mediaInterval_);
}
if (sendInterval_ != null) {
_global.clearInterval(sendInterval_);
}
addSegment();
sendSegments();
delete eventReporter_;
}
}
function get playbackStarted() {
return(playbackStarted_);
}
function sendReport(forced) {
addSegment();
sendSegments(forced);
}
function onInterval() {
if ((count_ <= thresholdCount_) || (((count_ - thresholdCount_) % multipleInterval_) == 0)) {
sendReport();
}
count_++;
}
function mediaUpdate() {
var _local2 = getBytesDownloaded();
var _local3 = getMediaTime();
var _local4 = getTimerInSeconds();
downloadTimer_.addData(_local2, _local4);
downloadPerformanceTimer_.addData(_local2, _local4);
lastBytes_ = _local2;
if ((!recordedDownloadPerformance_) && (downloadPerformanceTimer_.getSize() >= BW_SAMPLE_SIZE)) {
recordedDownloadPerformance_ = true;
var _local5 = new Object();
_local5.bytes = downloadPerformanceTimer_.getSize();
_local5.time = downloadPerformanceTimer_.getDuration();
if (downloadPerf_.length > BW_MAX_SAMPLES) {
downloadPerf_.shift();
}
downloadPerf_.push(_local5);
sendDownloadData_ = true;
var _local6 = SharedObject.getLocal("videostats", "/");
if (_local6 != null) {
_local6.data.perf = downloadPerf_;
_local6.flush();
}
}
if (sendSegments_ && ((!sentInitialPing_) && ((!sentTimeoutPing_) && ((_local2 == 0) && ((_local4 - startTime_) > PLAYBACK_TIMEOUT))))) {
sentTimeoutPing_ = true;
var _local7 = {st:_local3, et:_local3, pt:1};
setStandardArgs(_local7);
eventReporter_.send(_local7);
}
if ((!sentInitialPing_) && (_local3 > 0)) {
sentInitialPing_ = true;
var _local8 = {st:_local3, et:_local3, fv:_global.escape(System.capabilities.version)};
setStandardArgs(_local8);
eventReporter_.send(_local8);
count_ = 1;
sendInterval_ = _global.setInterval(this, "onInterval", 10000);
}
var _local9 = _local3 - lastMediaTime_;
if (_local9 != 0) {
var _local10 = _local4 - lastRealTime_;
if ((_local9 < 0) || (_local9 > (_local10 + 0.2))) {
addSegment();
segmentStart_ = _local3;
}
lastRealTime_ = _local4;
}
lastMediaTime_ = _local3;
}
function setStandardArgs(args) {
var _local3 = getMediaDuration();
if (_local3 != undefined) {
args.len = _local3;
}
if (getVideoDownloadRetries != undefined) {
var _local4 = getVideoDownloadRetries();
if (_local4 > 0) {
args.retries = _local4;
}
}
if (getBufferEmptyEvents != undefined) {
var _local5 = getBufferEmptyEvents();
var _local6 = _local5 - lastBufferEmptyEvents_;
if (_local6 > 0) {
args.nbe = _local6;
}
lastBufferEmptyEvents_ = _local5;
}
if (sendDownloadData_) {
args.hcbd = downloadPerf_[downloadPerf_.length - 1].bytes;
args.hcbt = downloadPerf_[downloadPerf_.length - 1].time;
sendDownloadData_ = false;
}
if (lastBytes_ > 0) {
args.bc = lastBytes_;
}
var _local7 = downloadTimer_.getSize();
if (_local7 > 0) {
args.bd = _local7;
args.bt = downloadTimer_.getDuration();
downloadTimer_.clearHistory();
}
if (getPlayerState != undefined) {
var _local8 = getPlayerState();
if (_local8) {
for (var i in _local8) {
args[i] = _local8[i];
}
}
}
var _local9 = getTimerInSeconds() - startTime_;
args.rt = _local9;
}
function addSegment() {
if (numSegmentsSent_ > MAX_REQ) {
return(undefined);
}
if ((lastMediaTime_ - segmentStart_) > 3) {
startTimes_[numSegments_] = segmentStart_;
endTimes_[numSegments_] = lastMediaTime_;
numSegments_++;
segmentStart_ = lastMediaTime_;
}
}
function sendSegments(forced) {
if ((numSegments_ > 0) || (forced)) {
var _local3 = String(startTimes_[0]);
var _local4 = String(endTimes_[0]);
var _local5 = 1;
for ( ; _local5 < numSegments_ ; _local5++) {
_local3 = _local3 + ("," + String(startTimes_[_local5]));
_local4 = _local4 + ("," + String(endTimes_[_local5]));
}
if (sendSegments_ || (forced)) {
var _local6 = {st:_local3, et:_local4};
setStandardArgs(_local6);
eventReporter_.send(_local6);
}
numSegmentsSent_++;
numSegments_ = 0;
}
}
function sendWatchPoint() {
var _local2 = getMediaTime();
var _local3 = {st:_local2, et:_local2, yttk:1};
setStandardArgs(_local3);
eventReporter_.send(_local3);
}
static function loadBandwidthData() {
if (downloadPerfLoaded_) {
return(undefined);
}
downloadPerf_ = [];
var _local2 = SharedObject.getLocal("videostats", "/");
if ((_local2 != null) && (_local2.data.perf != undefined)) {
var _local3 = _local2.data.perf;
for (var index in _local3) {
var _local4 = new Object();
_local4.bytes = _local3[index].bytes;
_local4.time = _local3[index].time;
downloadPerf_.push(_local4);
}
}
downloadPerfLoaded_ = true;
}
static function predictedBandwidthInBitsPerSecond() {
loadBandwidthData();
var _local2 = 0;
var _local3 = 0;
for (var index in downloadPerf_) {
_local2 = _local2 + downloadPerf_[index].bytes;
_local3 = _local3 + downloadPerf_[index].time;
}
if (_local3 < 0.1) {
return(0);
}
return(((_local2 * 8) / _local3) * 0.636717);
}
static function getTimerInSeconds() {
return(getTimer() / 1000);
}
var MAX_REQ = 400;
var BW_SAMPLE_SIZE = 1048576;
var BW_MAX_SAMPLES = 3;
var PLAYBACK_TIMEOUT = 5;
}
Symbol 20517 MovieClip [__Packages.com.google.utils.EventReporter] Frame 0
class com.google.utils.EventReporter extends com.google.utils.UrlConstructor
{
var makeUrl;
function EventReporter (baseUrl) {
super(baseUrl);
}
function send(args) {
var _local3 = makeUrl(args);
sendUrl(_local3);
}
function sendUrl(url) {
var _local3 = new MovieClipLoader();
var _local4 = _root.createEmptyMovieClip("junkClip", 999999);
_local3.loadClip(url, _local4);
}
}
Symbol 20518 MovieClip [__Packages.com.google.webutil.url.YouTubeUtils] Frame 0
class com.google.webutil.url.YouTubeUtils
{
function YouTubeUtils () {
}
static function isValidYouTubeHost(host) {
if ((host.indexOf("?") > -1) || ((host.indexOf("%") > -1) || (host.indexOf("#") > -1))) {
return(false);
}
var _local3 = host.split(".");
if (((_local3[_local3.length - 2] == "youtube") || ((_local3[_local3.length - 2] == "ytimg") || ((_local3[_local3.length - 3] == "corp") && (_local3[_local3.length - 2] == "google")))) && (_local3[_local3.length - 1] == "com")) {
return(true);
}
return(false);
}
static function isValidYouTubeUrl(url) {
var _local3 = url.split("/")[2];
return(com.google.utils.SecurityUtils.isSafeUrl(url) && (isValidYouTubeHost(_local3)));
}
}
Symbol 20519 MovieClip [__Packages.com.google.youtube.ui.IButton] Frame 0
class com.google.youtube.ui.IButton
{
function IButton () {
}
}
Symbol 20520 MovieClip [__Packages.com.google.youtube.ui.BaseButton] Frame 0
class com.google.youtube.ui.BaseButton extends com.google.youtube.AbstractElement implements com.google.youtube.ui.IButton
{
var buttonWidth, buttonHeight, isEnabled, isTooltipEnabled, bg, onRollOver, onRollOut, tooltip, createEmptyMovieClip, getNextHighestDepth, hit;
function BaseButton () {
super();
buttonWidth = DEFAULT_BUTTON_WIDTH;
buttonHeight = DEFAULT_BUTTON_HEIGHT;
isEnabled = true;
isTooltipEnabled = false;
}
function enable() {
isEnabled = true;
}
function enableTooltip() {
isTooltipEnabled = true;
}
function disable() {
isEnabled = false;
}
function disableTooltip() {
isTooltipEnabled = false;
}
function drawBgUpState() {
bg._visible = false;
}
function drawBgDownState() {
bg._visible = true;
}
function hover() {
}
function unhover() {
}
function dragOver() {
onRollOver();
}
function dragOut() {
onRollOut();
}
function press() {
bg._visible = true;
}
function release() {
drawBgUpState();
}
function releaseOutside() {
unhover();
drawBgUpState();
}
function rollOver() {
hover();
}
function rollOut() {
unhover();
}
function setTooltip(s) {
tooltip = s;
}
function getTooltip() {
return(tooltip);
}
function build() {
bg = createEmptyMovieClip("bg", getNextHighestDepth());
bg._visible = false;
hit = createEmptyMovieClip("hit", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(hit, 0, 0, buttonWidth, buttonHeight, 16711680);
hit._alpha = 0;
hit.onRollOver = com.google.chianti.event.EventDelegate.create(this, rollOver);
hit.onRollOut = com.google.chianti.event.EventDelegate.create(this, rollOut);
hit.onPress = com.google.chianti.event.EventDelegate.create(this, press);
hit.onRelease = com.google.chianti.event.EventDelegate.create(this, release);
hit.onReleaseOutside = com.google.chianti.event.EventDelegate.create(this, releaseOutside);
hit.onDragOver = com.google.chianti.event.EventDelegate.create(this, dragOver);
hit.onDragOut = com.google.chianti.event.EventDelegate.create(this, dragOut);
}
static var LINK_NAME = "__Packages.com.google.youtube.ui.BaseButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.ui.BaseButton);
static var BUTTON_UP = "up";
static var BUTTON_DOWN = "down";
static var BUTTON_PLAYING = "playing";
static var BUTTON_PAUSED = "paused";
static var BUTTON_DISABLED = "disabled";
static var BUTTON_ERROR = "error";
static var DEFAULT_BUTTON_WIDTH = 28;
static var DEFAULT_BUTTON_HEIGHT = 23;
static var DISABLED_ALPHA = 45;
static var ICON_SHADOW_ALPHA = 60;
static var ICON_SHADOW_COLOR = 16777215;
}
Symbol 20521 MovieClip [__Packages.com.google.youtube.ui.CompoundButton] Frame 0
class com.google.youtube.ui.CompoundButton extends com.google.youtube.ui.BaseButton
{
var mouseActivity, monitorMouse, activated, timeoutDueToIdle, jumpInterval, broadcast, registerEvent, rollOver, rollOut;
function CompoundButton () {
super();
mouseActivity = new com.google.youtube.util.MouseActivity(true);
mouseActivity.registerEvent(com.google.youtube.util.MouseActivity.MOUSE_ACTIVE, com.google.chianti.event.EventDelegate.create(this, attemptActivate));
mouseActivity.registerEvent(com.google.youtube.util.MouseActivity.MOUSE_INACTIVE, com.google.chianti.event.EventDelegate.create(this, attemptDeactivate, true));
monitorMouse = false;
activated = false;
timeoutDueToIdle = false;
jumpInterval = 0;
}
function hover() {
if (!timeoutDueToIdle) {
broadcast({type:com.google.youtube.event.GenericButtonEvent.ROLL_OVER, target:this});
monitorMouse = true;
_global.clearInterval(jumpInterval);
attemptActivate();
}
}
function unhover() {
broadcast({type:com.google.youtube.event.GenericButtonEvent.ROLL_OUT, target:this});
monitorMouse = false;
_global.clearInterval(jumpInterval);
jumpInterval = _global.setInterval(this, "attemptDeactivate", JUMP_TIMEOUT);
}
function attemptActivate() {
timeoutDueToIdle = false;
if (monitorMouse && (!activated)) {
activate();
activated = true;
}
}
function attemptDeactivate(opt_mouseIdle) {
if (activated) {
timeoutDueToIdle = opt_mouseIdle;
deactivate();
activated = false;
}
_global.clearInterval(jumpInterval);
}
function activate() {
}
function deactivate() {
}
function registerParentButton(parent) {
registerEvent(com.google.youtube.event.GenericButtonEvent.ROLL_OVER, com.google.chianti.event.EventDelegate.create(parent, parent.hover));
registerEvent(com.google.youtube.event.GenericButtonEvent.ROLL_OUT, com.google.chianti.event.EventDelegate.create(parent, parent.unhover));
}
function includeMouseActivityOf(target) {
target.onRollOver = com.google.chianti.event.EventDelegate.create(this, rollOver);
target.onRollOut = com.google.chianti.event.EventDelegate.create(this, rollOut);
target.onReleaseOutside = com.google.chianti.event.EventDelegate.create(this, rollOut);
}
function build() {
super.build();
}
static var LINK_NAME = "__Packages.com.google.youtube.ui.CompoundButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.ui.CompoundButton);
static var JUMP_TIMEOUT = 250;
}
Symbol 20522 MovieClip [__Packages.com.google.youtube.ui.IVideoControl] Frame 0
class com.google.youtube.ui.IVideoControl implements com.google.youtube.IBroadcaster
{
function IVideoControl () {
}
}
Symbol 20523 MovieClip [__Packages.com.google.youtube.players.ui.VolumeControl] Frame 0
class com.google.youtube.players.ui.VolumeControl extends com.google.youtube.ui.CompoundButton implements com.google.youtube.ui.IVideoControl
{
var buttonWidth, currentState, color1, color2, sliderBg, hit, broadcast, iconMask, iconShadowMask, _x, _y, volumeSlider, drawBgUpState, isEnabled, sliderHolder, sliderVisibleY, sliderOriginalY, bg, buttonHeight, icon, createEmptyMovieClip, getNextHighestDepth, includeMouseActivityOf;
function VolumeControl () {
super();
buttonWidth = 29;
currentState = UNMUTED;
}
function init(c1, c2) {
color1 = c1;
color2 = c2;
build();
sliderBg.tabEnabled = false;
hit._accProps = {name:"Volume/Mute"};
}
function onSliderChange(evt) {
broadcast({type:com.google.youtube.event.VolumeControlEvent.CHANGE, data:evt.data, target:this});
updateIconMask(evt.data);
}
function updateIconMask(newVolume) {
iconMask._xscale = ((newVolume / 100) * 37) + 63;
iconShadowMask._xscale = ((newVolume / 100) * 37) + 63;
}
function isResizable() {
return(false);
}
function hasDivider() {
return(true);
}
function getWidth() {
return(buttonWidth);
}
function getMinRequiredControlsWidth() {
return(0);
}
function setWidth(newWidth) {
}
function setPosition(newX, newY) {
_x = newX;
_y = newY;
}
function setValue(newValue, cancelBroadcast) {
volumeSlider.setValue(newValue, cancelBroadcast);
updateIconMask(newValue);
}
function setState(newState) {
if (newState == MUTED) {
drawBgDownState();
drawIcon(true);
volumeSlider.setValue(0, true);
updateIconMask(0);
} else if (newState == UNMUTED) {
drawBgUpState();
drawIcon(false);
}
currentState = newState;
}
function activate() {
if (isEnabled) {
showSlider();
drawIcon(true);
}
}
function deactivate() {
hideSlider();
if (currentState != MUTED) {
drawIcon(false);
}
}
function showSlider() {
com.gs.TweenLite.to(sliderHolder, SLIDER_SHOW_HIDE_SPEED, {_y:sliderVisibleY});
}
function hideSlider() {
com.gs.TweenLite.to(sliderHolder, SLIDER_SHOW_HIDE_SPEED, {_y:sliderOriginalY});
}
function release() {
if (isEnabled) {
if (currentState == MUTED) {
broadcast({type:com.google.youtube.event.VolumeControlEvent.UNMUTE, target:this});
} else if (currentState == UNMUTED) {
broadcast({type:com.google.youtube.event.VolumeControlEvent.MUTE, target:this});
}
}
}
function drawBgDownState() {
super.drawBgDownState();
bg.clear();
var _local3 = {colors:[color2, color1], fillType:"linear", alphas:[100, 100], ratios:[35, 255], matrix:{matrixType:"box", x:0, y:0, w:buttonWidth, h:buttonHeight, r:(90 / 180) * Math.PI}};
var _local4 = {thickness:0, rgb:13355979, alpha:100};
com.google.youtube.util.Drawing.drawRect(bg, 0, 0, buttonWidth, buttonHeight, _local3);
}
function drawIcon(drawDownState) {
icon.clear();
var _local3 = (drawDownState ? 16724787 : 7960953);
var _local4 = (drawDownState ? 12193808 : 3355443);
var _local5 = [{x:0, y:6}, {x:1, y:4}, {x:4, y:4}, {x:4, y:9}, {x:1, y:9}, {x:0, y:7}];
var _local6 = {colors:[_local3, _local4], fillType:"linear", alphas:[100, 80], ratios:[0, 255], matrix:{matrixType:"box", x:0, y:0, w:4, h:5, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawPoly(icon, _local5, _local6);
var _local7 = [{x:5, y:3}, {x:9, y:1}, {x:10, y:1}, {x:10, y:12}, {x:9, y:12}, {x:5, y:10}];
var _local8 = {colors:[_local3, _local4], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0, y:0, w:5, h:11, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawPoly(icon, _local7, _local8);
var _local9 = {colors:[_local3, _local4], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0, y:0, w:1, h:13, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(icon, 12, 5, 1, 3, _local9);
com.google.youtube.util.Drawing.drawRect(icon, 14, 3, 1, 7, _local9);
com.google.youtube.util.Drawing.drawRect(icon, 16, 2, 1, 9, _local9);
com.google.youtube.util.Drawing.drawRect(icon, 18, -1, 1, 14, _local9);
}
function build() {
super.build();
drawBgDownState();
sliderHolder = createEmptyMovieClip("sliderHolder", getNextHighestDepth());
sliderBg = sliderHolder.createEmptyMovieClip("sliderBg", sliderHolder.getNextHighestDepth());
includeMouseActivityOf(sliderBg);
sliderBg.useHandCursor = false;
volumeSlider = com.google.youtube.ui.SliderControl(sliderHolder.attachMovie(com.google.youtube.ui.SliderControl.LINK_NAME, "slider", getNextHighestDepth()));
volumeSlider.registerParentButton(this);
volumeSlider.registerEvent(com.google.youtube.event.UIEvent.CHANGE, com.google.chianti.event.EventDelegate.create(this, onSliderChange));
volumeSlider.setValues(SLIDER_MIN_VALUE, SLIDER_MAX_VALUE);
volumeSlider.setSize(SLIDER_WIDTH, com.google.youtube.ui.SliderControl.SLIDER_ORIENTATION_VERTICAL);
volumeSlider._x = (buttonWidth - volumeSlider._width) / 2;
volumeSlider._y = SLIDER_VERTICAL_PADDING / 2;
com.google.youtube.util.Drawing.drawRect(sliderBg, 0, 0, buttonWidth, (volumeSlider._height + SLIDER_VERTICAL_PADDING) + 1, 16777215);
com.google.youtube.util.Drawing.drawRect(sliderBg, 1, 1, buttonWidth - 2, (volumeSlider._height + SLIDER_VERTICAL_PADDING) - 2, 11645361);
var _local3 = {colors:[15461355, 12369084], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0, y:0, w:buttonWidth, h:(volumeSlider._height + SLIDER_VERTICAL_PADDING) - 4, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(sliderBg, 2, 2, buttonWidth - 4, (volumeSlider._height + SLIDER_VERTICAL_PADDING) - 4, _local3);
var _local4 = createEmptyMovieClip("volumeSliderMask", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(_local4, -2, -(sliderBg._height + 2), buttonWidth + 4, (volumeSlider._height + SLIDER_VERTICAL_PADDING) + 2, 16750848);
sliderHolder.setMask(_local4);
sliderOriginalY = sliderHolder._y + 1;
sliderVisibleY = sliderHolder._y - sliderHolder._height;
icon = createEmptyMovieClip("icon", getNextHighestDepth());
icon._x = 5;
icon._y = 5;
drawIcon();
var _local5 = icon.duplicateMovieClip("iconShadow", getNextHighestDepth());
_local5._x = _local5._x + 1;
_local5._y = _local5._y + 1;
_local5._alpha = com.google.youtube.ui.BaseButton.ICON_SHADOW_ALPHA;
_local5.swapDepths(icon);
var _local6 = new Color(_local5);
_local6.setRGB(com.google.youtube.ui.BaseButton.ICON_SHADOW_COLOR);
iconMask = createEmptyMovieClip("iconMask", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(iconMask, icon._x, icon._y, icon._width + 2, icon._height + 2, 16711680);
icon.setMask(iconMask);
iconShadowMask = createEmptyMovieClip("iconShadowMask", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(iconShadowMask, _local5._x, _local5._y, _local5._width + 2, _local5._height + 2, 16711680);
_local5.setMask(iconShadowMask);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.VolumeControl";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.VolumeControl);
static var MUTED = "muted";
static var UNMUTED = "unmuted";
static var SLIDER_MIN_VALUE = 0;
static var SLIDER_MAX_VALUE = 100;
static var SLIDER_WIDTH = 53;
static var SLIDER_VERTICAL_PADDING = 10;
static var SLIDER_SHOW_HIDE_SPEED = 0.3;
}
Symbol 20524 MovieClip [__Packages.com.google.youtube.players.VideoData] Frame 0
class com.google.youtube.players.VideoData
{
var author, duration, runTime, url, id, title, description, index, viewCount, rating, thumbnailUrls, token, lengthInSeconds, mustangDocKey, flvurl, ivModule, adModule, ccModule, karaokeModule, captions_video_id, muted, averageRating, formatMap, thumbnailUrl, thumbnailUrlHighQuality, allowRating, trackEmbed, startSeconds, loadingFromOffset, hideLargePlayButton;
function VideoData () {
}
static function createFromDictionary(dict) {
var _local3 = new com.google.youtube.players.VideoData();
_local3.applyData(dict);
return(_local3);
}
static function createFromLoadVars(lv) {
var _local3 = new com.google.youtube.players.VideoData();
_local3.applyData(lv);
_local3.untypedVideoData = copyParameters(lv);
return(_local3);
}
static function createFromConfigData(configData) {
var _local3 = new com.google.youtube.players.VideoData();
_local3.applyData({id:configData.videoId, token:configData.token, lengthInSeconds:configData.lengthInSeconds, mustangDocKey:configData.mustangDocKey, imageUrl:(configData.imageUrl ? (configData.imageUrl) : (((configData.LIVE_BASE_IMG_URL + "vi/") + configData.videoId) + "/default.jpg")), flvurl:configData.flvurl, iv_module:configData.ivModule, ad_module:configData.adModule, cc_module:configData.ccModule, karaoke_module:configData.karaokeModule, captions_video_id:configData.captions_video_id});
_local3.untypedVideoData = copyParameters(configData.getUntypedFlashVars());
removeVideoDataFromPlayerConfigData(configData);
return(_local3);
}
static function removeVideoDataFromPlayerConfigData(configData) {
configData.videoId = undefined;
configData.token = undefined;
configData.lengthInSeconds = undefined;
configData.mustangDocKey = undefined;
configData.imageUrl = undefined;
configData.flvurl = undefined;
configData.ivModule = undefined;
configData.ccModule = undefined;
configData.karaokeModule = undefined;
configData.captions_video_id = undefined;
}
function getLength(configObject) {
if (configObject.lengthInSeconds != undefined) {
var _local3 = _global.parseInt(configObject.lengthInSeconds);
} else if (configObject.length_seconds.toString() != undefined) {
var _local3 = _global.parseInt(configObject.length_seconds.toString());
} else if (configObject.length.toString() != undefined) {
var _local3 = _global.parseInt(configObject.length.toString());
}
return(_local3);
}
static function copyParameters(src) {
var _local3 = {};
for (var i in src) {
if ((typeof(src[i]) == "string") || (typeof(src[i]) == "number")) {
_local3[i] = src[i];
}
}
return(_local3);
}
function applyData(data) {
author = data.author.toString();
if (data.length != undefined) {
duration = _global.parseFloat(data.length);
}
runTime = data.run_time;
url = data.url.toString();
id = data.id.toString();
title = data.title.toString();
description = data.description.toString();
index = data.index;
viewCount = data.view_count;
rating = Math.max(0, _global.parseFloat(data.rating));
thumbnailUrls = [];
if (data.thumbnail_url1) {
thumbnailUrls.push(data.thumbnail_url1.toString());
}
if (data.thumbnail_url2) {
thumbnailUrls.push(data.thumbnail_url2.toString());
}
if (data.thumbnail_url3) {
thumbnailUrls.push(data.thumbnail_url3.toString());
}
token = data.token.toString();
lengthInSeconds = getLength(data);
mustangDocKey = data.mustangDocKey;
flvurl = data.flvurl;
ivModule = data.iv_module;
adModule = data.ad_module;
ccModule = data.cc_module;
karaokeModule = data.karaoke_module;
captions_video_id = data.captions_video_id;
muted = data.muted;
averageRating = data.avg_rating;
formatMap = data.fmt_map;
thumbnailUrl = data.thumbnail_url.toString();
if (data.thumbnailUrl) {
thumbnailUrl = data.thumbnailUrl.toString();
}
if (data.thumbnailUrlHighQuality) {
thumbnailUrlHighQuality = data.thumbnailUrlHighQuality.toString();
}
if (data.imageUrl) {
thumbnailUrl = data.imageUrl.toString();
}
if (!com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(thumbnailUrl)) {
thumbnailUrl = undefined;
}
allowRating = data.allow_ratings;
trackEmbed = data.track_embed;
startSeconds = data.startSeconds;
loadingFromOffset = data.loadingFromOffset;
hideLargePlayButton = data.hideLargePlayButton;
}
function isLoadIvModule() {
return(ivModule != undefined);
}
function getIvModulePath() {
return(ivModule);
}
function isLoadAdModule() {
return(adModule != undefined);
}
function getAdModulePath() {
return(adModule);
}
function isLoadCaptionsModule() {
return(ccModule != undefined);
}
function isLoadKaraokeModule() {
return(karaokeModule != undefined);
}
function getCaptionsModulePath() {
return(ccModule);
}
function getKaraokeModulePath() {
return(karaokeModule);
}
function getCaptionsVideoId() {
return(captions_video_id);
}
function getUntypedVideoData() {
return(untypedVideoData);
}
function toString() {
var _local2 = "VideoData{";
for (var i in this) {
if ((this[i] != undefined) && (this[i] != _global.NaN)) {
_local2 = _local2 + (((i + ": ") + this[i]) + ", ");
}
}
_local2 = _local2 + "}";
return(_local2);
}
var untypedVideoData = {};
}
Symbol 20525 MovieClip [__Packages.com.google.youtube.players.VideoLoader] Frame 0
class com.google.youtube.players.VideoLoader extends com.google.youtube.AbstractBroadcaster
{
var configData, dataType, data, soundController, netStream, duration, videoMetaData, videoWidth, videoHeight, videoSource, broadcast, currentVideoData, seekTime, getVideoInfoLoadVars, restRequest, netConnection, state, loaderInterval, keyframeFileLocations;
function VideoLoader (configData, soundController, dataType, data) {
super();
this.configData = configData;
this.dataType = dataType;
this.data = data;
this.soundController = soundController;
setState(UNSTARTED);
netStream = getNetStream();
}
function reset() {
resetNetStream();
metaDataLoaded = false;
startSeconds = 0;
videoFileStartLocation = 0;
duration = null;
totalBytes = -1;
videoMetaData = null;
videoWidth = null;
videoHeight = null;
bufferEmptyCount = 0;
videoSource = null;
if (videoLoadStatus != VIDEO_LOAD_STATUS_UNLOADED) {
broadcast({type:com.google.youtube.event.VideoLoaderEvent.UNLOAD_VIDEO, target:this});
}
videoLoadStatus = VIDEO_LOAD_STATUS_UNLOADED;
}
function loadVideoByVideoData(videoData, seekToTime, loadingFromMiddle) {
currentVideoData = videoData;
if (!loadingFromMiddle) {
reset();
if (videoData.id) {
firstVideoPlayed = true;
}
}
seekTime = seekToTime;
if (videoData.flvurl) {
playNetStream(videoData.flvurl);
} else if (!currentVideoData.token) {
getVideoDataByVideoId(currentVideoData.id);
} else {
var _local5 = getVideoUrl(videoData, seekTime);
playNetStream(_local5);
}
setState(BUFFERING);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.BUFFERING, target:this});
}
function loadVideoByURLWithNetstream(the_netstream, the_name, the_duration) {
netStream = the_netstream;
duration = the_duration;
netStream.onStatus = com.google.chianti.event.EventDelegate.create(this, onNsStatus);
netStream.onMetaData = com.google.chianti.event.EventDelegate.create(this, onMetaData);
netStream.play(the_name);
netStream.setBufferTime(2);
setState(BUFFERING);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.BUFFERING, target:this});
}
function getVideoDataByVideoId(videoId) {
if (configData.useGetVideoInfo == "1") {
loadVideoDataFromGetVideoInfo(videoId);
} else {
loadVideoDataFromApi2Rest(videoId);
}
}
function loadVideoDataFromGetVideoInfo(videoId) {
getVideoInfoLoadVars = new LoadVars();
var _local3 = configData.BASE_YT_URL + configData.GET_VIDEO_INFO_URL;
_local3 = _local3 + "?";
_local3 = _local3 + ("&video_id=" + videoId);
if (configData.playerType == com.google.youtube.logging.YouTubeStatsLogger.IMPRESSION_TYPE_ACDC) {
_local3 = _local3 + ("&w=" + configData.playerType);
}
if ((configData.eurl != undefined) || (configData.eventLabel == com.google.youtube.logging.YouTubeStatsLogger.EVENT_LABEL_EMBEDDED)) {
_local3 = _local3 + "&eurl=";
_local3 = _local3 + ((configData.eurl != undefined) ? (_global.escape(configData.eurl)) : "");
}
getVideoInfoLoadVars.onLoad = com.google.chianti.event.EventDelegate.create(this, onVideoDataFromGetVideoInfoLoaded);
getVideoInfoLoadVars.load(_local3);
}
function loadVideoDataFromApi2Rest(videoId) {
restRequest = new com.google.youtube.data.RestRequest(configData.BASE_YT_URL + configData.REST_API_URL);
restRequest.addParameter("method", configData.REST_GET_VIDEO_TOKEN);
restRequest.addParameter("video_id", videoId);
restRequest.registerEvent(com.google.youtube.event.DataEvent.LOAD, com.google.chianti.event.EventDelegate.create(this, onVideoDataLoaded));
restRequest.registerEvent(com.google.youtube.event.DataEvent.ERROR, com.google.chianti.event.EventDelegate.create(this, onVideoDataError));
restRequest.send();
}
function playNetStream(flvUrl) {
getNetStream().play(flvUrl);
currentVideoData.duration = getDuration();
if (videoLoadStatus != VIDEO_LOAD_STATUS_LOADED) {
videoLoadStatus = VIDEO_LOAD_STATUS_LOADED;
broadcast({type:com.google.youtube.event.VideoLoaderEvent.LOAD_NEW_VIDEO, data:currentVideoData, target:this});
}
}
function onVideoDataLoaded(evt) {
currentVideoData.token = evt.data.t.toString();
var _local3 = getVideoUrl(currentVideoData, seekTime);
playNetStream(_local3);
setState(BUFFERING);
}
function onVideoDataFromGetVideoInfoLoaded(success) {
if (!success) {
fallbackToOldApi2Rest();
return(undefined);
}
if (getVideoInfoLoadVars.status != "ok") {
var _local3 = _global.parseInt(getVideoInfoLoadVars.errorcode);
var _local4 = getVideoInfoLoadVars.reason;
broadcast({type:com.google.youtube.event.VideoLoaderEvent.VIDEO_DATA_ERROR, errorCode:_local3, description:_local4});
return(undefined);
}
currentVideoData.token = getVideoInfoLoadVars.token;
var _local5 = getVideoUrl(currentVideoData, seekTime);
playNetStream(_local5);
setState(BUFFERING);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.VIDEO_DATA_LOADED, target:this, data:getVideoInfoLoadVars});
}
function fallbackToOldApi2Rest() {
if (configData.useGetVideoInfo == "1") {
configData.useGetVideoInfo = "0";
loadVideoDataFromApi2Rest(currentVideoData.id);
}
}
function onVideoDataError(evt) {
broadcast({type:com.google.youtube.event.VideoLoaderEvent.VIDEO_DATA_ERROR});
}
function getVideoUrl(videoData, startValue) {
var _local4 = configData.BASE_YT_URL + configData.GET_VIDEO_URL;
_local4 = _local4 + ((videoData.id != undefined) ? (videoData.id) : "");
if (startValue > 0) {
if (videoMetaData.canseekontime) {
_local4 = _local4 + ("&begin=" + startValue);
} else {
_local4 = _local4 + ("&start=" + startValue);
}
}
_local4 = _local4 + ((currentVideoData.token != undefined) ? ("&t=" + currentVideoData.token) : "");
currentVideoData.token = null;
if (configData.playerType == com.google.youtube.logging.YouTubeStatsLogger.IMPRESSION_TYPE_ACDC) {
_local4 = _local4 + ("&w=" + configData.playerType);
}
if ((configData.eurl != undefined) || (configData.eventLabel == com.google.youtube.logging.YouTubeStatsLogger.EVENT_LABEL_EMBEDDED)) {
_local4 = _local4 + "&eurl=";
_local4 = _local4 + ((configData.eurl != undefined) ? (_global.escape(configData.eurl)) : "");
}
_local4 = _local4 + ((configData.autoPlay == "1") ? "&autoplay=1" : "");
_local4 = _local4 + (configData.scriptedPlayback ? "&splay=1" : "");
_local4 = _local4 + ((configData.appendVars != undefined) ? (configData.appendVars) : "");
var _local5 = configData.getVideoFormat();
if (_local5.length) {
_local4 = _local4 + ("&fmt=" + _local5);
}
return(_local4);
}
function getVideoSize() {
return(new com.google.geom.Rect(0, 0, videoWidth, videoHeight));
}
function getStartPosition() {
return(videoFileStartLocation);
}
function seekTo(seconds, allowSeekAhead) {
if (videoMetaData.canseekontime) {
var _local4 = getNSBytesTotal() / getDuration();
var _local5 = (getNSBytesLoaded() / _local4) + startSeconds;
if (((seconds > _local5) || (seconds < startSeconds)) && (allowSeekAhead)) {
videoFileStartLocation = seconds * _local4;
var _local6 = seconds * 1000;
loadVideoByVideoData(currentVideoData, Math.round(_local6), true);
stopLoaderInterval();
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PROGRESS, data:{currentTime:seconds, duration:getDuration(), startSeconds:seconds}, target:this});
} else {
getNetStream().seek(seconds);
}
} else if (videoMetaData.keyframes) {
var _local7 = findClosestCuePointBefore(seconds);
var _local8 = getFileLocationForKeyframeTime(_local7);
_local8 = ((seconds == 0) ? 0 : (_local8));
if ((configData.allowSeekAhead != "0") && ((_local8 <= (getNSBytesLoaded() + getStartPosition())) && (_local8 >= videoFileStartLocation))) {
getNetStream().seek(_local7);
} else if (allowSeekAhead) {
stopLoaderInterval();
loadVideoByVideoData(currentVideoData, _local8, true);
videoFileStartLocation = _local8;
startSeconds = _local7;
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PROGRESS, data:{currentTime:startSeconds, duration:getDuration(), startSeconds:startSeconds}, target:this});
}
} else {
getNetStream().seek(seconds);
}
}
function findClosestCuePointBefore(seconds) {
var _local3 = videoMetaData.keyframes.times;
return(findKeyframeForSeconds(_local3, seconds, 0, _local3.length - 1));
}
function findKeyframeForSeconds(kf, targetSeconds, startIndex, endIndex) {
if (!targetSeconds) {
return(0);
}
if (startIndex >= endIndex) {
if (targetSeconds < kf[endIndex]) {
return(kf[endIndex - 1]);
}
return(kf[endIndex]);
}
var _local6 = Math.floor((startIndex + endIndex) / 2);
if (targetSeconds < kf[_local6]) {
return(findKeyframeForSeconds(kf, targetSeconds, startIndex, _local6));
}
if (targetSeconds > kf[_local6]) {
return(findKeyframeForSeconds(kf, targetSeconds, _local6 + 1, endIndex));
}
return(kf[_local6]);
}
function getNetStream() {
if (!netStream) {
netConnection = null;
netConnection = new NetConnection();
netConnection.connect(null);
netStream = new NetStream(netConnection);
soundController.getSoundMC().attachAudio(netStream);
netStream.setBufferTime(2);
netStream.onStatus = com.google.chianti.event.EventDelegate.create(this, onNsStatus);
netStream.onMetaData = com.google.chianti.event.EventDelegate.create(this, onMetaData);
}
return(netStream);
}
function resetNetStream() {
netStream.close();
netStream = null;
netStream = getNetStream();
}
function setState(newState) {
state = newState;
}
function getState() {
return(state);
}
function play() {
if (getState() != BUFFERING) {
getNetStream().pause(false);
setState(PLAYING);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PLAY, target:this});
}
}
function pause() {
getNetStream().pause(true);
setState(PAUSED);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PAUSE, target:this});
}
function close() {
seekTo(0);
reset();
if (getState() != UNSTARTED) {
broadcast({type:com.google.youtube.event.VideoLoaderEvent.END, target:this});
}
setState(ENDED);
}
function getDuration() {
if (duration != undefined) {
return(duration);
}
if (currentVideoData.lengthInSeconds != undefined) {
return(currentVideoData.lengthInSeconds);
}
return(getNSBytesTotal() / presumedBytesPerSecond);
}
function getBufferEmptyEvents() {
return(bufferEmptyCount);
}
function getCurrentTime() {
var _local2 = getNetStream().time;
return(Math.min(_local2, getDuration()));
}
function getNSBytesLoaded() {
var _local2 = getNSBytesTotal() - videoFileStartLocation;
return(Math.min(_local2, getNetStream().bytesLoaded));
}
function getNSBytesTotal() {
return(totalBytes);
}
function stopLoaderInterval() {
_global.clearInterval(loaderInterval);
loaderInterval = null;
}
function startLoaderInterval() {
if (loaderInterval == null) {
loaderInterval = _global.setInterval(this, "onProgress", PROGRESS_INTERVAL);
}
}
function onNsStatus(infoObject) {
switch (infoObject.code) {
case "NetStream.Play.Start" :
var _local3 = new com.google.youtube.util.FrameWaiter(_root, 4, com.google.chianti.event.EventDelegate.create(this, startLoaderInterval));
break;
case "NetStream.Buffer.Empty" :
if (getState() == ENDED) {
break;
}
if (Math.ceil(getDuration()) != Math.ceil(getCurrentTime())) {
bufferEmptyCount++;
setState(BUFFERING);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.BUFFERING, target:this});
} else {
setState(ENDED);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.END, data:infoObject, target:this});
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PROGRESS, data:{currentTime:getDuration(), duration:getDuration(), startSeconds:startSeconds}, target:this});
break;
if (getState() == BUFFERING) {
setState(PLAYING);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PLAY, data:infoObject, target:this});
}
break;
if ((getDuration() < netStream.bufferTime) && (getState != PAUSED)) {
setState(PLAYING);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PLAY, data:infoObject, target:this});
}
break;
if ((getState() != PAUSED) && (Math.ceil(getDuration()) == Math.ceil(getCurrentTime()))) {
stopLoaderInterval();
setState(ENDED);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PROGRESS, data:{currentTime:getDuration(), duration:getDuration(), startSeconds:startSeconds}, target:this});
broadcast({type:com.google.youtube.event.VideoLoaderEvent.END, data:infoObject, target:this});
}
break;
broadcast({type:com.google.youtube.event.VideoLoaderEvent.STREAM_NOT_FOUND, data:infoObject, target:this});
setState(ENDED);
break;
broadcast({type:com.google.youtube.event.VideoLoaderEvent.STREAM_NOT_EMBEDDABLE, data:infoObject, target:this});
setState(ENDED);
break;
startLoaderInterval();
broadcast({type:com.google.youtube.event.VideoLoaderEvent.NET_STREAM_STATUS, data:infoObject, target:this});
}
case "NetStream.Buffer.Full" :
if (getState() == BUFFERING) {
setState(PLAYING);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PLAY, data:infoObject, target:this});
}
break;
case "NetStream.Buffer.Flush" :
if ((getDuration() < netStream.bufferTime) && (getState != PAUSED)) {
setState(PLAYING);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PLAY, data:infoObject, target:this});
}
break;
case "NetStream.Play.Stop" :
if ((getState() != PAUSED) && (Math.ceil(getDuration()) == Math.ceil(getCurrentTime()))) {
stopLoaderInterval();
setState(ENDED);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PROGRESS, data:{currentTime:getDuration(), duration:getDuration(), startSeconds:startSeconds}, target:this});
broadcast({type:com.google.youtube.event.VideoLoaderEvent.END, data:infoObject, target:this});
}
break;
case "NetStream.Play.StreamNotFound" :
broadcast({type:com.google.youtube.event.VideoLoaderEvent.STREAM_NOT_FOUND, data:infoObject, target:this});
setState(ENDED);
break;
case "NetStream.Play.FileStructureInvalid" :
broadcast({type:com.google.youtube.event.VideoLoaderEvent.STREAM_NOT_EMBEDDABLE, data:infoObject, target:this});
setState(ENDED);
break;
default :
startLoaderInterval();
broadcast({type:com.google.youtube.event.VideoLoaderEvent.NET_STREAM_STATUS, data:infoObject, target:this});
}
}
function onProgress() {
var _local2 = getCurrentTime();
broadcast({type:com.google.youtube.event.VideoLoaderEvent.BYTES_LOADED, data:{bytesLoaded:getNSBytesLoaded(), bytesTotal:getNSBytesTotal(), duration:getDuration(), startSeconds:startSeconds, startPosition:videoFileStartLocation}, target:this});
broadcast({type:com.google.youtube.event.VideoLoaderEvent.PROGRESS, data:{currentTime:_local2, duration:getDuration(), startSeconds:startSeconds}, target:this});
if ((lastTime == _local2) && ((getState() == PLAYING) && ((getTimeDifference(_local2, getDuration()) < 3) && (_local2 > 1)))) {
stallCount++;
} else {
lastTime = _local2;
stallCount = 0;
unstallAttempted = false;
}
if ((stallCount > STALL_LIMIT_SHORT) && ((!unstallAttempted) && (getTimeDifference(_local2, getDuration()) > 1))) {
unstallAttempted = true;
seekTo(_local2 + 0.001);
lastTime = _local2;
}
if ((stallCount > STALL_LIMIT) && (state != ENDED)) {
stopLoaderInterval();
setState(ENDED);
broadcast({type:com.google.youtube.event.VideoLoaderEvent.END, target:this});
}
}
function getTimeDifference(time1, time2) {
return(Math.abs(time1 - time2));
}
function isMetaDataLoaded() {
return(metaDataLoaded);
}
function onMetaData(infoObject) {
videoMetaData = infoObject;
metaDataLoaded = true;
if (videoMetaData.keyframes && (videoMetaData.keyframes.filepositions)) {
var _local3 = videoMetaData.keyframes;
keyframeFileLocations = {};
var _local4 = 0;
for ( ; _local4 < _local3.times.length ; _local4++) {
keyframeFileLocations[_local3.times[_local4]] = _local3.filepositions[_local4];
}
}
if (infoObject.width && (infoObject.height)) {
videoWidth = infoObject.width;
videoHeight = infoObject.height;
}
if ((totalBytes == -1) && (infoObject.bytelength)) {
totalBytes = infoObject.bytelength;
} else if (totalBytes == -1) {
totalBytes = getNetStream().bytesTotal;
}
if (infoObject.starttime != undefined) {
startSeconds = infoObject.starttime;
videoFileStartLocation = startSeconds * (getNSBytesTotal() / getDuration());
}
if ((!duration) && (infoObject.totalduration)) {
duration = infoObject.totalduration;
} else if ((!duration) && (infoObject.duration)) {
duration = infoObject.duration;
}
infoObject.duration = getDuration();
broadcast({type:com.google.youtube.event.VideoLoaderEvent.META_LOAD, data:infoObject, target:this});
}
function getFileLocationForKeyframeTime(keyframe) {
return(keyframeFileLocations[keyframe]);
}
static var UNSTARTED = -1;
static var ENDED = 0;
static var PLAYING = 1;
static var PAUSED = 2;
static var BUFFERING = 3;
static var SEEKING = 4;
static var DEFAULT_VIDEO_WIDTH = 320;
static var DEFAULT_VIDEO_HEIGHT = 240;
static var STALL_LIMIT = 15;
static var STALL_LIMIT_SHORT = 5;
static var VIDEO_LOAD_STATUS_UNLOADED = 0;
static var VIDEO_LOAD_STATUS_LOADED = 1;
static var PROGRESS_INTERVAL = 250;
var videoLoadStatus = VIDEO_LOAD_STATUS_UNLOADED;
var totalBytes = -1;
var metaDataLoaded = false;
var stallCount = 0;
var lastTime = null;
var startSeconds = 0;
var unstallAttempted = false;
var presumedBytesPerSecond = 40000;
var videoFileStartLocation = 0;
var bufferEmptyCount = 0;
var firstVideoPlayed = false;
}
Symbol 20526 MovieClip [__Packages.com.google.youtube.players.ui.ProgressBar] Frame 0
class com.google.youtube.players.ui.ProgressBar extends MovieClip
{
var percentage, backgroundFill, backgroundLineStyle, progressBarFill, progressBarLineStyle, width, height, progressBar, background, createEmptyMovieClip, getNextHighestDepth;
function ProgressBar () {
super();
percentage = 0;
}
function init(newBackgroundFill, newBackgroundLineStyle, newProgressBarFill, newProgressBarLineStyle, newWidth, newHeight) {
backgroundFill = newBackgroundFill;
backgroundLineStyle = newBackgroundLineStyle;
progressBarFill = newProgressBarFill;
progressBarLineStyle = newProgressBarLineStyle;
width = newWidth;
height = newHeight;
build(width, height);
}
function setPercentage(newPercentage) {
percentage = (newPercentage ? (newPercentage) : (percentage));
progressBar._xscale = percentage;
if (percentage > 0) {
progressBar._visible = true;
} else {
progressBar._visible = false;
}
}
function setSize(newWidth, newHeight) {
drawProgressBar((newWidth ? (newWidth) : (width)), (newHeight ? (newHeight) : (height)));
setPercentage();
}
function getWidth() {
return(width);
}
function getHeight() {
return(height);
}
function build(newWidth, newHeight) {
background = createEmptyMovieClip("background", getNextHighestDepth());
progressBar = createEmptyMovieClip("progressBar", getNextHighestDepth());
progressBar._visible = false;
drawProgressBar(newWidth, newHeight);
progressBar._xscale = 0;
}
function drawProgressBar(newWidth, newHeight) {
background.clear();
com.google.youtube.util.Drawing.drawRect(background, 0, 0, newWidth, newHeight, backgroundFill, backgroundLineStyle);
progressBar.clear();
com.google.youtube.util.Drawing.drawRect(progressBar, 0, 0, newWidth, newHeight, progressBarFill, progressBarLineStyle);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.ProgressBar";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.ProgressBar);
}
Symbol 20527 MovieClip [__Packages.com.google.youtube.event.VideoLoaderEvent] Frame 0
class com.google.youtube.event.VideoLoaderEvent
{
function VideoLoaderEvent () {
}
static var PLAY = "onPlay";
static var STOP = "onStop";
static var PAUSE = "onPause";
static var END = "onEnd";
static var BUFFERING = "onBuffering";
static var SEEKING = "onSeeking";
static var NET_STREAM_STATUS = "onNetStreamEvent";
static var LOAD_NEW_VIDEO = "onLoadNewVideo";
static var STREAM_NOT_FOUND = "onStreamNotFound";
static var STREAM_NOT_EMBEDDABLE = "onStreamNotEmbeddable";
static var META_LOAD = "onMetaLoad";
static var BYTES_LOADED = "onBytesLoaded";
static var PROGRESS = "onProgress";
static var VIDEO_DATA_ERROR = "onVideoDataError";
static var VIDEO_DATA_LOADED = "onVideoDataLoad";
static var UNLOAD_VIDEO = "onVideoUnload";
}
Symbol 20528 MovieClip [__Packages.com.google.utils.Url] Frame 0
class com.google.utils.Url
{
var protocol, host, port, domain, file, path, params, paramsMap;
function Url (spec) {
parseAndInit(spec);
}
static function debugDescribeParams(params) {
var _local3 = "";
for (var param in params) {
if (_local3 != "") {
_local3 = _local3 + " ";
}
_local3 = _local3 + (((param + "=>{") + params[param].join(",")) + "}");
}
return(_local3);
}
static function diffUrl(url, goldenUrl) {
var _local4 = new Array();
if (url.getProtocol() != goldenUrl.getProtocol()) {
_local4.push((("Protocol: " + url.getProtocol()) + "!=") + goldenUrl.getProtocol());
}
if (url.getHost() != goldenUrl.getHost()) {
_local4.push((("Host: " + url.getHost()) + "!=") + goldenUrl.getHost());
}
if (url.getPort() != goldenUrl.getPort()) {
_local4.push((("Port: " + url.getPort()) + "!=") + goldenUrl.getPort());
}
if (url.getPath() != goldenUrl.getPath()) {
_local4.push((("Path: " + url.getPath()) + "!=") + goldenUrl.getPath());
}
var _local5 = url.getParamsMap();
var _local6 = goldenUrl.getParamsMap();
for (var param in _local5) {
if (_local6[param] == undefined) {
var _local7 = _local5[param].join("&");
_local4.push(((("Unexpected param: " + param) + "=>{") + _local7) + "}");
}
}
for (var param in _local6) {
var _local8 = _local6[param].join("&");
if (_local5[param] == undefined) {
_local4.push(((("missing param: " + param) + "=>{") + _local8) + "}");
} else {
var _local9 = _local5[param].join("&");
if (_local9 != _local8) {
_local4.push((((("Inconsistent values for param: " + param) + "=>") + _local9) + "!=") + _local8);
}
}
}
return(_local4.join(" "));
}
static function isEquivalent(url1, url2) {
return(diffUrl(url1, url2) == "");
}
function parseAndInit(spec) {
protocol = findProtocol(spec);
var _local3 = ((protocol == null) ? 0 : (protocol.length + 3));
var _local4 = spec.indexOf("/", _local3);
var _local5 = spec.indexOf("?", _local4);
_local4 = ((_local4 < 0) ? (spec.length) : (_local4));
_local5 = ((_local5 < 0) ? (spec.length) : (_local5));
var _local6 = spec.substring(_local3, _local4).split(":", 2);
host = _local6[0];
port = ((_local6.length > 1) ? (_local6[1]) : null);
var _local7 = host.split(".");
if (_local7.length > 1) {
domain = _local7.slice(_local7.length - 2).join(".");
} else {
domain = null;
}
file = spec.substring(_local4);
path = spec.substring(_local4, _local5);
if (_local5 < spec.length) {
params = spec.substring(_local5 + 1);
} else {
params = "";
}
paramsMap = {};
var _local8 = params.split("&");
var _local9 = 0;
for ( ; _local9 < _local8.length ; _local9++) {
var _local10 = _local8[_local9].split("=", 2);
if (_local10.length == 1) {
_local10.push("");
}
if (paramsMap[_local10[0]] == undefined) {
paramsMap[_local10[0]] = new Array();
}
paramsMap[_local10[0]].push(_local10[1]);
}
}
function findProtocol(spec) {
var _local3 = spec.split("://", 2);
return(((_local3.length > 1) ? (_local3[0]) : null));
}
function getProtocol() {
return(protocol);
}
function getHost() {
return(host);
}
function getDomain() {
return(domain);
}
function getPort() {
return(port);
}
function getFile() {
return(file);
}
function getPath() {
return(path);
}
function getParams() {
return(params);
}
function getParamsMap() {
return(paramsMap);
}
function debugDescribeUrl() {
return((((((((("protocol:" + protocol) + " host:") + host) + " port:") + port) + " path: ") + path) + " params:") + debugDescribeParams(getParamsMap()));
}
}
Symbol 20529 MovieClip [__Packages.com.google.youtube.players.SoundController] Frame 0
class com.google.youtube.players.SoundController extends com.google.youtube.AbstractBroadcaster
{
static var instanceMap;
var soundMovieClip, soundObject, saveSettings, infringeMute, muted, soundSharedObject, soundSharedObjectData, currentVolume, localVolume, broadcast;
function SoundController (mc, saveSoundSettings) {
super();
soundMovieClip = mc.createEmptyMovieClip("sound_mc", mc.getNextHighestDepth());
soundObject = new Sound(soundMovieClip);
saveSettings = saveSoundSettings;
infringeMute = false;
muted = false;
soundSharedObject = SharedObject.getLocal(SOUND_DATA_SO_KEY, "/");
soundSharedObjectData = soundSharedObject.data;
if ((soundSharedObjectData.volume == _global.NaN) || ((soundSharedObjectData.volume == undefined) || (!saveSettings))) {
soundSharedObjectData.volume = 100;
}
if ((soundSharedObjectData.mute == undefined) || (!saveSettings)) {
soundSharedObjectData.mute = false;
}
if (saveSettings) {
soundSharedObject.flush();
restoreSoundOptions();
} else {
setVolume(100);
currentVolume = 100;
}
}
static function getPlayerInstance(mc, saveSoundSettings) {
if (!instanceMap) {
instanceMap = {};
}
var _local4 = String(mc);
if (!instanceMap[_local4]) {
instanceMap[_local4] = new com.google.youtube.players.SoundController(mc, saveSoundSettings);
}
return(instanceMap[_local4]);
}
static function destroyPlayerInstance(mc) {
var _local3 = String(mc);
instanceMap[_local3] = null;
}
function setInfringeMute(isInfringe) {
infringeMute = isInfringe;
localVolume = currentVolume;
}
function restoreSoundOptions() {
setVolume(soundSharedObjectData.volume);
currentVolume = soundSharedObjectData.volume;
if (soundSharedObjectData.mute) {
mute();
}
}
function setVolume(newVolume, cancelBroadcast) {
if (newVolume == undefined) {
return(undefined);
}
var _local4 = Math.round(newVolume);
_local4 = Math.min(_local4, 100);
_local4 = Math.max(_local4, 0);
if (infringeMute) {
localVolume = _local4;
return(undefined);
}
if (!soundSharedObjectData.mute) {
soundObject.setVolume(_local4);
soundSharedObjectData.volume = _local4;
if (saveSettings) {
soundSharedObject.flush();
}
currentVolume = _local4;
if (!cancelBroadcast) {
broadcast({type:com.google.youtube.event.SoundEvent.VOLUME_CHANGE, data:_local4, target:this});
}
}
}
function getVolume() {
if (!infringeMute) {
return(currentVolume);
}
return(localVolume);
}
function mute(doBroadcast, bypassSharedObject_opt) {
if ((!bypassSharedObject_opt) && (saveSettings && (!infringeMute))) {
soundSharedObjectData.mute = true;
soundSharedObject.flush();
}
muted = true;
soundObject.setVolume(0);
if (doBroadcast) {
broadcast({type:com.google.youtube.event.SoundEvent.MUTE, target:this});
}
}
function unMute(skipRestoreVolume, bypassSharedObject_opt) {
muted = false;
if (infringeMute) {
return(undefined);
}
if (!skipRestoreVolume) {
setVolume(currentVolume);
}
broadcast({type:com.google.youtube.event.SoundEvent.UNMUTE, target:this});
if ((!bypassSharedObject_opt) && (saveSettings)) {
soundSharedObjectData.mute = false;
soundSharedObject.flush();
}
}
function getMute() {
return(muted);
}
function getSoundMC() {
return(soundMovieClip);
}
static var SOUND_DATA_SO_KEY = "soundData";
}
Symbol 20530 MovieClip [__Packages.com.google.youtube.players.modules.ad.ui.CloseButton] Frame 0
class com.google.youtube.players.modules.ad.ui.CloseButton extends com.google.youtube.AbstractElement
{
var broadcast, bg, width, xHolder, createEmptyMovieClip, getNextHighestDepth;
function CloseButton () {
super();
}
function onPress() {
drawDownBg();
drawDownX();
}
function onRelease() {
broadcast({type:com.google.youtube.event.GenericButtonEvent.RELEASE, target:this});
}
function onRollOver() {
drawOverBg();
drawDownX();
}
function onRollOut() {
drawDefaultBg();
drawDefaultX();
}
function onReleaseOutside() {
drawDefaultBg();
drawDefaultX();
}
function drawOverBg() {
bg.clear();
var _local2 = {colors:[16774066, 13411921], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:(-width) / 2, y:(-width) / 2, w:width, h:width, r:(90 / 180) * Math.PI}};
var _local3 = {alpha:100, thickness:0, rgb:5066061};
com.google.youtube.util.Drawing.drawCircle(bg, 0, 0, width, _local2, _local3, false);
}
function drawDownBg() {
bg.clear();
var _local2 = {colors:[16768332, 13408782], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:(-width) / 2, y:(-width) / 2, w:width, h:width, r:(90 / 180) * Math.PI}};
var _local3 = {alpha:100, thickness:0, rgb:5066061};
com.google.youtube.util.Drawing.drawCircle(bg, 0, 0, width, _local2, _local3, false);
}
function drawDefaultBg() {
bg.clear();
var _local2 = {colors:[16777215, 12566463], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:(-width) / 2, y:(-width) / 2, w:width, h:width, r:(90 / 180) * Math.PI}};
var _local3 = {alpha:100, thickness:0, rgb:5066061};
com.google.youtube.util.Drawing.drawCircle(bg, 0, 0, width, _local2, _local3, false);
}
function drawDefaultX() {
var _local2 = 1;
var _local3 = width * PLUS_RATIO;
var _local4 = {colors:[5526612, 3355443], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:(-_local3) / 2, y:(-_local3) / 2, w:width, h:width, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawX(xHolder, (-_local3) / 2, (-_local3) / 2, _local3, _local2, _local4);
}
function drawDownX() {
var _local2 = 1;
var _local3 = width * PLUS_RATIO;
var _local4 = {colors:[6045446], fillType:"linear", alphas:[100], ratios:[0], matrix:{matrixType:"box", x:(-_local3) / 2, y:(-_local3) / 2, w:width, h:width, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawX(xHolder, (-_local3) / 2, (-_local3) / 2, _local3, _local2, _local4);
}
function setSize(newSize) {
width = newSize;
build();
}
function build() {
bg = createEmptyMovieClip("bg", getNextHighestDepth());
xHolder = createEmptyMovieClip("xHolder", getNextHighestDepth());
drawDefaultBg();
drawDefaultX();
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.ad.ui.CloseButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.ad.ui.CloseButton);
static var PLUS_RATIO = 0.47;
}
Symbol 20531 MovieClip [__Packages.com.google.youtube.players.VideoContainer] Frame 0
class com.google.youtube.players.VideoContainer extends com.google.youtube.AbstractElement
{
var httpPlayer, progressBar, videoDisplayBg, duration, href, getURL, broadcast, createEmptyMovieClip, attachMovie, getNextHighestDepth;
function VideoContainer () {
super();
}
function init() {
build();
}
function play(path) {
httpPlayer.play(path);
updateProgress(0);
progressBar._visible = true;
videoDisplayBg._visible = true;
}
function clear() {
httpPlayer.clear();
videoDisplayBg._visible = false;
progressBar._visible = false;
duration = undefined;
href = undefined;
}
function setVolume(volume) {
if (volume != undefined) {
httpPlayer.setVolume(volume);
}
}
function setViewportSize(newX, newY, newWidth, newHeight) {
newX = Math.round(newX);
newY = Math.round(newY);
newWidth = Math.round(newWidth);
newHeight = Math.round(newHeight);
var _local6 = new com.google.geom.Rect(newX, newY, newWidth, newHeight);
var _local7 = httpPlayer.getVideoSizeRect();
var _local8 = _local7.width / _local7.height;
var _local9 = newWidth;
var _local10 = newHeight;
if (_local9 > (_local8 * newHeight)) {
_local9 = _local8 * newHeight;
} else {
_local10 = newWidth / _local8;
}
var _local11 = newX;
var _local12 = newY;
if (_local9 < _local6.width) {
_local11 = Math.floor((_local6.width - _local9) / 2) + _local6.x;
}
if (_local10 < _local6.height) {
_local12 = Math.floor((_local6.height - _local10) / 2) + _local6.y;
}
_local11 = Math.round(_local11);
_local12 = Math.round(_local12);
_local9 = Math.round(_local9);
_local10 = Math.round(_local10);
httpPlayer.setViewportSize(_local11, _local12, _local9, _local10);
videoDisplayBg._x = _local6.x;
videoDisplayBg._y = _local6.y;
videoDisplayBg._width = _local6.width;
videoDisplayBg._height = _local6.height;
progressBar.setSize(_local6.width, undefined);
progressBar._x = _local6.x;
}
function setDuration(movieDuration) {
duration = Math.max(0, movieDuration);
}
function updateProgress(movieTime) {
if ((movieTime >= 0) && ((movieTime <= duration) && (duration > 0))) {
progressBar.setPercentage(100 * (movieTime / duration));
} else {
progressBar.setPercentage(1);
}
}
function setVideoButtonLink(link, label, title) {
href = link;
}
function onRelease() {
if (href.length) {
getURL(href, "_blank");
}
}
function onInstreamEvent(evt) {
evt.target = this;
broadcast(evt);
}
function build() {
videoDisplayBg = createEmptyMovieClip("videoDisplayBg", VIDEO_DISPLAY_BG_DEPTH);
com.google.youtube.util.Drawing.drawRect(videoDisplayBg, 0, 0, DEFAULT_VIDEO_WIDTH, DEFAULT_VIDEO_HEIGHT, 0);
httpPlayer = com.google.youtube.players.HTTPVideoPlayer(attachMovie(com.google.youtube.players.HTTPVideoPlayer.LINK_NAME, "httpPlayer", VIDEO_DISPLAY_DEPTH));
httpPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.END, com.google.chianti.event.EventDelegate.create(this, onInstreamEvent));
httpPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.META_LOAD, com.google.chianti.event.EventDelegate.create(this, onInstreamEvent));
httpPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.PLAY, com.google.chianti.event.EventDelegate.create(this, onInstreamEvent));
httpPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.PROGRESS, com.google.chianti.event.EventDelegate.create(this, onInstreamEvent));
var _local2 = new com.google.youtube.util.GradientFill([16772219, 14590981], com.google.youtube.util.GradientFill.LINEAR_FILL, [100, 100], [0, 190], 0, 0, videoDisplayBg._width, videoDisplayBg._height, 90);
var _local3 = new com.google.youtube.util.GradientFill([13421772, 14869218], com.google.youtube.util.GradientFill.LINEAR_FILL, [100, 100], [0, 190], 0, 0, videoDisplayBg._width, videoDisplayBg._height, 90);
var _local4 = new com.google.youtube.util.LineStyle(100, 0, 11961609);
var _local5 = new com.google.youtube.util.LineStyle(100, 0, 10263708);
progressBar = com.google.youtube.players.ui.ProgressBar(attachMovie(com.google.youtube.players.ui.ProgressBar.LINK_NAME, "progressBar", getNextHighestDepth()));
progressBar.init(_local3, _local5, _local2, _local4, videoDisplayBg._width, PROGRESS_BAR_HEIGHT);
progressBar._visible = false;
}
static var LINK_NAME = "__Packages.com.google.youtube.players.VideoContainer";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.VideoContainer);
static var DEFAULT_VIDEO_WIDTH = 480;
static var DEFAULT_VIDEO_HEIGHT = 360;
static var VIDEO_DISPLAY_BG_DEPTH = 10;
static var VIDEO_DISPLAY_DEPTH = 20;
static var AD_TEXT_PADDING = 5;
static var PROGRESS_BAR_HEIGHT = 4;
}
Symbol 20532 MovieClip [__Packages.com.google.youtube.players.modules.ad.AdVideoContainer] Frame 0
class com.google.youtube.players.modules.ad.AdVideoContainer extends com.google.youtube.players.VideoContainer
{
var locale, adText, httpPlayer, progressBar;
function AdVideoContainer () {
super();
}
function init(newLocale) {
locale = newLocale;
super.init();
}
function play(path) {
super.play(path);
adText.setVisible(true);
}
function clear() {
super.clear();
adText.setVisible(false);
}
function setVolume(volume) {
if (volume != undefined) {
httpPlayer.setVolume(volume);
}
}
function setViewportSize(newX, newY, newWidth, newHeight) {
super.setViewportSize(newX, newY, newWidth, newHeight);
adText.moveTo(newX + AD_TEXT_PADDING, progressBar.getHeight() + AD_TEXT_PADDING);
}
function build() {
super.build();
adText = new com.google.youtube.players.modules.ad.ui.AdText();
adText.init(this, locale);
adText.moveTo(AD_TEXT_PADDING, progressBar.getHeight() + AD_TEXT_PADDING);
adText.setVisible(false);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.ad.AdVideoContainer";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.ad.AdVideoContainer);
static var AD_TEXT_PADDING = 5;
}
Symbol 20533 MovieClip [__Packages.com.google.youtube.players.modules.IPlayerModuleMediator] Frame 0
class com.google.youtube.players.modules.IPlayerModuleMediator
{
function IPlayerModuleMediator () {
}
}
Symbol 20534 MovieClip [__Packages.com.google.youtube.players.modules.ad.DartLogger] Frame 0
class com.google.youtube.players.modules.ad.DartLogger extends com.google.youtube.AbstractBroadcaster
{
var canLogPlayEvent, postRollAdPlaying, inVideoEventArr, overlayViewUrl, dartAd;
function DartLogger () {
super();
canLogPlayEvent = [{count:0, active:true}, {count:25, active:true}, {count:50, active:true}, {count:75, active:true}];
postRollAdPlaying = false;
inVideoEventArr = midrollInvideoEventArr;
}
function setOverlayViewUrl(newOverlayViewUrl) {
overlayViewUrl = newOverlayViewUrl;
}
function setDartAd(newDartAd) {
dartAd = newDartAd;
}
function trackPlayPercentage(evt) {
var _local3 = (evt.currentTime / evt.duration) * 100;
if ((evt.state != com.google.youtube.players.VideoPlayer.PLAYING) || (_global.isNaN(_local3))) {
return(undefined);
}
var _local4 = 0;
for ( ; _local4 < canLogPlayEvent.length ; _local4++) {
if (canLogPlayEvent[_local4].active && (canLogPlayEvent[_local4].count <= _local3)) {
convertPercentToCounter(canLogPlayEvent[_local4].count);
canLogPlayEvent[_local4].active = false;
}
}
}
function onDartOverlayViewedEvent() {
if (overlayViewUrl) {
logEvent(overlayViewUrl);
overlayViewUrl = null;
}
}
function onAdOpenEvent(adViewUrl) {
onVideoTrackEvent(inVideoEventArr[0]);
if (adViewUrl) {
logEvent(adViewUrl);
}
resetTrackingCounters();
}
function setInvideoAdType(adType) {
switch (adType) {
case com.google.youtube.logging.YouTubeStatsLogger.AD_TYPE_MIDROLL :
postRollAdPlaying = false;
inVideoEventArr = midrollInvideoEventArr;
break;
case com.google.youtube.logging.YouTubeStatsLogger.AD_TYPE_POSTROLL :
postRollAdPlaying = true;
inVideoEventArr = postrollInvideoEventArr;
break;
}
}
function resetTrackingCounters() {
var _local2 = 0;
for ( ; _local2 < canLogPlayEvent.length ; _local2++) {
canLogPlayEvent[_local2].active = true;
}
}
function convertPercentToCounter(percent) {
switch (percent) {
case 25 :
onVideoTrackEvent(inVideoEventArr[1]);
break;
case 50 :
onVideoTrackEvent(inVideoEventArr[2]);
break;
case 75 :
onVideoTrackEvent(inVideoEventArr[3]);
}
}
function onVideoTrackEvent(counter) {
dartAd.conduit.counter(counter);
dartAd.conduit._flushMetEvents();
}
function onExitEvent() {
dartAd.exits(1);
}
function onAdVideoCompleted() {
onVideoTrackEvent(inVideoEventArr[4]);
}
function replaceWithRandomNumber(stringToReplace) {
var _local3 = stringToReplace.split("%n");
var _local4 = new Date();
var _local5 = String(Math.random(_local4.getTime()) * 10000000000000);
return(_local3.join(_local5));
}
function logEvent(newLogUrl) {
if (newLogUrl) {
var _local3 = new LoadVars();
var _local4 = new LoadVars();
_local4.sendAndLoad(replaceWithRandomNumber(newLogUrl), _local3, "POST");
_local3.onLoad = function () {
};
}
}
var midrollInvideoEventArr = [1, 2, 3, 4, 5];
var postrollInvideoEventArr = [6, 7, 8, 9, 10];
}
Symbol 20535 MovieClip [__Packages.com.google.youtube.players.modules.ModuleDescriptor] Frame 0
class com.google.youtube.players.modules.ModuleDescriptor extends com.google.youtube.AbstractElement implements com.google.youtube.players.modules.IPlayerModuleDescriptor
{
var path, enabled, instance, broadcast;
function ModuleDescriptor () {
super();
}
function getPath() {
return(path);
}
function setEnabled(isEnabled) {
enabled = isEnabled;
}
function isEnabled() {
return(enabled);
}
function getLoggingOptions() {
if (instance && (instance.getLoggingOptions)) {
return(instance.getLoggingOptions());
}
return({});
}
function notify() {
broadcast({target:this, type:com.google.youtube.event.DataEvent.SET});
}
}
Symbol 20536 MovieClip [__Packages.com.google.youtube.players.modules.ad.ui.AdButton] Frame 0
class com.google.youtube.players.modules.ad.ui.AdButton extends com.google.youtube.AbstractElement
{
var broadcast, bg, icon, createEmptyMovieClip, getNextHighestDepth;
function AdButton () {
super();
build();
}
function getIconPoints() {
var _local2 = {x:Math.ceil((BUTTON_WIDTH / 2) - (ICON_WIDTH / 3)) + 0.5, y:Math.floor((BUTTON_HEIGHT / 2) - (ICON_HEIGHT / 2)) + 0.5};
var _local3 = [_local2, {x:_local2.x + ICON_WIDTH, y:_local2.y + (ICON_HEIGHT / 2)}, {x:_local2.x, y:_local2.y + ICON_HEIGHT}];
return(_local3);
}
function onRelease() {
broadcast({type:com.google.youtube.event.GenericButtonEvent.RELEASE, target:this});
}
function onRollOver() {
drawOverBg();
drawOverIcon();
}
function onRollOut() {
drawDefaultBg();
drawDefaultIcon();
}
function onReleaseOutside() {
drawDefaultBg();
drawDefaultIcon();
}
function drawDefaultBg() {
bg.clear();
var _local2 = {colors:[16777215, 12566463], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0.5, y:0.5, w:BUTTON_WIDTH, h:BUTTON_HEIGHT, r:(90 / 180) * Math.PI}};
var _local3 = {alpha:100, thickness:0, rgb:5855577};
com.google.youtube.util.Drawing.drawRect(bg, 0.5, 0.5, BUTTON_WIDTH, BUTTON_HEIGHT, _local2, _local3, BUTTON_RADIUS, false);
}
function drawDefaultIcon() {
icon.clear();
var _local2 = {colors:[5526612, 3355443], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0.5, y:0.5, w:ICON_WIDTH, h:ICON_HEIGHT, r:(100 / 180) * Math.PI}};
var _local3 = {alpha:0, thickness:0, rgb:5855577};
com.google.youtube.util.Drawing.drawPoly(icon, getIconPoints(), _local2, _local3);
}
function drawOverBg() {
bg.clear();
var _local2 = {colors:[16777215, 13421772], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0.5, y:0.5, w:BUTTON_WIDTH, h:BUTTON_HEIGHT, r:(90 / 180) * Math.PI}};
var _local3 = {alpha:100, thickness:0, rgb:6710886};
com.google.youtube.util.Drawing.drawRect(bg, 0.5, 0.5, BUTTON_WIDTH, BUTTON_HEIGHT, _local2, _local3, BUTTON_RADIUS, false);
}
function drawOverIcon() {
icon.clear();
var _local2 = {colors:[16772219, 14524672], fillType:"linear", alphas:[100, 100], ratios:[64, 190], matrix:{matrixType:"box", x:0.5, y:0.5, w:ICON_WIDTH, h:ICON_HEIGHT, r:(100 / 180) * Math.PI}};
var _local3 = {alpha:100, thickness:0, rgb:11961609};
com.google.youtube.util.Drawing.drawPoly(icon, getIconPoints(), _local2, _local3);
}
function build() {
bg = createEmptyMovieClip("bg", getNextHighestDepth());
icon = createEmptyMovieClip("iconHolder", getNextHighestDepth());
drawDefaultBg();
drawDefaultIcon();
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.ad.ui.AdButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.ad.ui.AdButton);
static var BUTTON_WIDTH = 26;
static var BUTTON_HEIGHT = 13;
static var BUTTON_RADIUS = 5;
static var ICON_WIDTH = 7;
static var ICON_HEIGHT = 7;
}
Symbol 20537 MovieClip [__Packages.com.google.youtube.event.UIEvent] Frame 0
class com.google.youtube.event.UIEvent
{
function UIEvent () {
}
static var RESIZE = "onResize";
static var SEEK = "onSeek";
static var CHANGE = "onChange";
static var START_RESIZE = "onStartResize";
}
Symbol 20538 MovieClip [__Packages.com.google.youtube.data.XMLData] Frame 0
class com.google.youtube.data.XMLData extends com.google.youtube.data.XMLDataNode
{
var useSystemSuccessStatus, xmlObj, rootNodeName, parsedData, broadcast, dataUrl;
function XMLData (opt_useSystemSuccessStatus, opt_xmlString) {
super();
if (opt_useSystemSuccessStatus != undefined) {
useSystemSuccessStatus = opt_useSystemSuccessStatus;
}
if (opt_xmlString != undefined) {
xmlObj = new XML(opt_xmlString);
onXmlLoad(true);
} else {
xmlObj = new XML();
xmlObj.ignoreWhite = true;
xmlObj.onLoad = com.google.chianti.event.EventDelegate.create(this, onXmlLoad);
}
}
function loadXML(dataUrl) {
xmlObj.load(dataUrl);
}
function onXmlLoad(success) {
if (success) {
_loaded = true;
rootNodeName = xmlObj.firstChild.nodeName;
parsedData = makeObj(xmlObj.firstChild);
if (useSystemSuccessStatus || ((parsedData.status == STATUS_OK) || (rootNodeName == ACDC_ROOT_NODE))) {
broadcast({type:com.google.youtube.event.DataEvent.LOAD, target:this, data:parsedData, dataUrl:dataUrl});
} else {
broadcast({type:com.google.youtube.event.DataEvent.ERROR, target:this, data:parsedData, dataUrl:dataUrl});
}
} else {
broadcast({type:com.google.youtube.event.DataEvent.ERROR, target:this, error:"XML Failed to load", dataUrl:dataUrl});
}
}
function makeObj(xObj, obj) {
if (xObj == null) {
xObj = xmlObj;
}
if (obj == null) {
obj = new com.google.youtube.data.XMLDataNode();
}
for (var _local4 in xObj.attributes) {
obj[_local4] = xObj.attributes[_local4];
}
for (var _local5 in xObj.childNodes) {
var _local6 = xObj.childNodes[_local5].nodeName;
var _local7 = xObj.childNodes[_local5].nodeType;
var _local8 = xObj.childNodes[_local5].nodeValue;
if (_local7 == 3) {
obj._value = (((_local8 != undefined) && (_local8 != "undefined")) ? (_local8) : "");
obj._type = "text";
}
if ((_local7 == 1) && (_local6 != null)) {
if (obj[_local6] == null) {
obj[_local6] = makeObj(xObj.childNodes[_local5], new com.google.youtube.data.XMLDataNode());
} else if (obj[_local6]._type != "array") {
obj[_local6] = [obj[_local6]];
obj[_local6]._type = "array";
}
if (obj[_local6]._type == "array") {
obj[_local6].unshift(makeObj(xObj.childNodes[_local5], new com.google.youtube.data.XMLDataNode()));
}
}
}
return(obj);
}
function get loaded() {
return(_loaded);
}
function getParsedData() {
return(parsedData);
}
static function xmlDataNodeToArray(obj) {
var _local3 = [];
var _local4 = 0;
for ( ; _local4 < obj.length ; _local4++) {
_local3[_local4] = obj[_local4];
}
return(_local3);
}
function toString() {
var _local2 = "[object XMLData]";
_local2 = _local2 + xmlObj.toString();
return(_local2);
}
static var STATUS_OK = "ok";
static var ACDC_ROOT_NODE = "GSP";
var _loaded = false;
}
Symbol 20539 MovieClip [__Packages.com.google.youtube.players.modules.IPlayerModuleAdapter] Frame 0
class com.google.youtube.players.modules.IPlayerModuleAdapter
{
function IPlayerModuleAdapter () {
}
}
Symbol 20540 MovieClip [__Packages.com.google.youtube.event.SoundEvent] Frame 0
class com.google.youtube.event.SoundEvent
{
function SoundEvent () {
}
static var MUTE = "onMute";
static var UNMUTE = "onUnMute";
static var VOLUME_CHANGE = "onVolumeChange";
}
Symbol 20541 MovieClip [__Packages.com.google.youtube.event.GenericButtonEvent] Frame 0
class com.google.youtube.event.GenericButtonEvent extends com.google.youtube.event.UIEvent
{
function GenericButtonEvent () {
super();
}
static var RELEASE = "onRelease";
static var PRESS = "onPress";
static var ROLL_OVER = "onRollOver";
static var ROLL_OUT = "onRollOut";
static var PLAY = "onPlay";
static var PAUSE = "onPause";
}
Symbol 20542 MovieClip [__Packages.com.google.youtube.players.modules.ad.AdModule] Frame 0
class com.google.youtube.players.modules.ad.AdModule extends com.google.youtube.players.modules.base.BasePlayerModule
{
var postRollEnabled, postRollPlaying, adStateMc, numStateSent, broadcast, urlValidator, dartAdTagHandler, dartLogger, baselineRect, moduleAdapter, moduleMask, overallHolder, configData, cbsStartupDelayInterval, cbsPlaylist, videoContainer, preAdPlayState, playbackTrackingPath, percentTracking, playCompleted, adButton, adBackground, getURL, pollReadyStateIntervalId, dartOrd, dartOverlay, dartInteractive, adMovie, afvOverlay, newScale, overlayPopupTime, isInvideoOverlayShowing, dartAd, currentAd, dartOverlayTimeoutId, dartOverlayTimeoutCounter, callFallbackImpression;
function AdModule (mc) {
super(mc);
postRollEnabled = false;
postRollPlaying = false;
adStateMc = new com.google.youtube.players.modules.ad.AdStateMachine(com.google.youtube.players.modules.ad.AdStateMachine.INIT);
numStateSent = 0;
}
function pauseMainVideo() {
broadcast({type:com.google.youtube.event.ModuleEvent.PAUSE});
}
function playMainVideo() {
broadcast({type:com.google.youtube.event.ModuleEvent.PLAY});
}
function disableVideoControls() {
broadcast({type:com.google.youtube.event.ModuleEvent.DISABLE});
}
function enableVideoControls() {
broadcast({type:com.google.youtube.event.ModuleEvent.ENABLE});
}
function addSeekBarMarker(newTime) {
broadcast({type:com.google.youtube.event.ModuleEvent.ADD_MARKER, time:newTime, markerWidth:DEFAULT_MARKER_WIDTH});
}
function removeSeekBarMarkers() {
broadcast({type:com.google.youtube.event.ModuleEvent.REMOVE_MARKERS});
}
function init(ma, moduleConfigData) {
var _local5 = ["http"];
var _local6 = ["doubleclick.net"];
urlValidator = new com.google.utils.UrlValidator(_local5, _local6);
dartAdTagHandler = new com.google.youtube.players.modules.ad.DartAdTagHandler();
dartLogger = new com.google.youtube.players.modules.ad.DartLogger();
super.init(ma, moduleConfigData);
}
function onInited(rootClip) {
super.onInited();
}
function build() {
baselineRect = moduleAdapter.getDisplayRect();
moduleMask = overallHolder.createEmptyMovieClip("moduleMask", overallHolder.getNextHighestDepth());
var _local2 = {colors:[16776994], fillType:"linear", alphas:[100], ratios:[0], matrix:{matrixType:"box", x:baselineRect.x, y:baselineRect.y, w:baselineRect.width, h:baselineRect.height, r:(0 / 180) * Math.PI}};
var _local3 = {alpha:0, thickness:0, color:0};
com.google.youtube.util.Drawing.drawRect(moduleMask, 0, 0, baselineRect.width, baselineRect.height, _local2, _local3, 0, false);
overallHolder.setMask(moduleMask);
var _local4 = configData.currentVideoData.getUntypedVideoData();
if (_local4.invideo) {
prepareBuildDartOverlay();
return(undefined);
}
if (_local4.afv) {
buildAfvOverlay();
}
var _local5 = _local4.cbs_ad_playlist_url;
if (_local5.length) {
cbsStartupDelayInterval = _global.setInterval(this, "dispatchInStream", DELAY_CBS_STARTUP_TIME, _local5);
}
}
function dispatchInStream(playlistUrl) {
_global.clearInterval(cbsStartupDelayInterval);
cbsStartupDelayInterval = undefined;
buildInStream(playlistUrl);
}
function buildInStream(playlistURL) {
disableVideoControls();
cbsPlaylist = new com.google.youtube.players.modules.ad.CBSPlaylist();
var _local3 = overallHolder.createEmptyMovieClip("context", REPORTING_CONTEXT_LEVEL);
cbsPlaylist.init(playlistURL, _local3);
cbsPlaylist.registerEvent(com.google.youtube.event.DataEvent.LOAD, com.google.chianti.event.EventDelegate.create(this, onNewCBSPlaylist));
cbsPlaylist.registerEvent(com.google.youtube.event.DataEvent.SET, com.google.chianti.event.EventDelegate.create(this, onNewCBSMedia));
videoContainer = com.google.youtube.players.modules.ad.AdVideoContainer(overallHolder.attachMovie(com.google.youtube.players.modules.ad.AdVideoContainer.LINK_NAME, "videoContainer", VIDEO_CONTAINER_LEVEL));
videoContainer.init(configData.playerConfigData.interfaceLanguage);
videoContainer.registerEvent(com.google.youtube.event.VideoPlayerEvent.END, com.google.chianti.event.EventDelegate.create(this, onInstreamEvent));
videoContainer.registerEvent(com.google.youtube.event.VideoPlayerEvent.META_LOAD, com.google.chianti.event.EventDelegate.create(this, onInstreamEvent));
videoContainer.registerEvent(com.google.youtube.event.VideoPlayerEvent.PLAY, com.google.chianti.event.EventDelegate.create(this, onInstreamEvent));
videoContainer.registerEvent(com.google.youtube.event.VideoPlayerEvent.PROGRESS, com.google.chianti.event.EventDelegate.create(this, onInstreamEvent));
}
function onNewCBSPlaylist(evt) {
var _local3 = moduleAdapter.getCurrentTime();
if (evt.status == com.google.youtube.players.modules.ad.CBSPlaylist.STATUS_ACTIVE) {
onResize();
cbsPlaylist.requestAdForTime(_local3);
} else if (evt.status == com.google.youtube.players.modules.ad.CBSPlaylist.STATUS_COMPLETE) {
playMainVideo();
enableVideoControls();
videoContainer.clear();
}
}
function onNewCBSMedia(evt) {
if ((evt.status == com.google.youtube.players.modules.ad.CBSPlaylist.STATUS_ACTIVE) && (evt.data.mediaURL.length)) {
preAdPlayState = moduleAdapter.getPlayState();
if (preAdPlayState == com.google.youtube.players.VideoPlayer.PLAYING) {
pauseMainVideo();
}
disableVideoControls();
videoContainer.play(evt.data.mediaURL);
var _local3 = (moduleAdapter.getIsMuted() ? 0 : (moduleAdapter.getVolume()));
videoContainer.setVolume(_local3);
videoContainer.setVideoButtonLink(evt.data.clickThrough);
playbackTrackingPath = evt.data.trackingPath;
percentTracking = evt.data.percentTracking;
setLongformCompanion(evt.data.companion);
videoContainer._x = 0;
videoContainer._y = 0;
var _local4 = Math.max(0, moduleAdapter.getDuration());
if (!_local4) {
_local4 = Math.max(0, configData.currentVideoData.lengthInSeconds);
}
if (_local4) {
var _local5 = cbsPlaylist.getAdTimes(_local4);
for (var i in _local5) {
addSeekBarMarker(_local5[i]);
}
}
} else if ((evt.status == com.google.youtube.players.modules.ad.CBSPlaylist.STATUS_COMPLETE) || (!evt.data.mediaURL.length)) {
playMainVideo();
enableVideoControls();
videoContainer.clear();
}
}
function onInstreamEvent(evt) {
switch (evt.type) {
case com.google.youtube.event.VideoPlayerEvent.END :
var _local3 = moduleAdapter.getCurrentTime();
enableVideoControls();
videoContainer.clear();
if (((!playCompleted) && (preAdPlayState == com.google.youtube.players.VideoPlayer.PLAYING)) || (Math.max(0, _local3) == 0)) {
playMainVideo();
}
break;
case com.google.youtube.event.VideoPlayerEvent.PROGRESS :
if (playbackTrackingPath.length) {
cbsPlaylist.logEvent(playbackTrackingPath);
playbackTrackingPath = undefined;
}
videoContainer.updateProgress(evt.data.time);
var _local4 = percentTracking.length;
var _local5 = _local4 - 1;
for ( ; _local5 >= 0 ; _local5--) {
var _local6 = percentTracking[_local5];
if (_local6.time <= evt.data.time) {
cbsPlaylist.logEvent(_local6.trackParam);
percentTracking.pop();
} else {
break;
}
}
break;
case com.google.youtube.event.VideoPlayerEvent.META_LOAD :
var _local7 = Math.max(0, evt.data.duration);
videoContainer.setDuration(_local7);
for (var i in percentTracking) {
var _local8 = percentTracking[i];
_local8.applyDuration(_local7);
}
if (!percentTracking.length) {
break;
}
percentTracking.sortOn("time", Array.DESCENDING, Array.NUMERIC);
}
}
function buildAdButton() {
var _local2 = moduleAdapter.getDisplayRect();
adButton = overallHolder.attachMovie(com.google.youtube.players.modules.ad.ui.AdButton.LINK_NAME, "adButton", overallHolder.getNextHighestDepth());
adButton.registerEvent(com.google.youtube.event.GenericButtonEvent.RELEASE, com.google.chianti.event.EventDelegate.create(this, onAdButtonRelease));
onResize();
adButton._visible = false;
}
function buildAdBackground() {
var _local2 = moduleAdapter.getDisplayRect();
adBackground = overallHolder.createEmptyMovieClip("adBackground", overallHolder.getNextHighestDepth());
var _local3 = {colors:[0], fillType:"linear", alphas:[100], ratios:[0], matrix:{matrixType:"box", x:0, y:0, w:_local2.width, h:_local2.height, r:(0 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(adBackground, 0, 0, _local2.width, _local2.height, _local3, undefined, 0, false);
adBackground._visible = false;
onResize();
}
function prepareBuildDartOverlay() {
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.call("setFlashPlayerReadyState");
} else {
getURL("javascript:setFlashPlayerReadyState();");
}
_global.clearInterval(pollReadyStateIntervalId);
var _local2 = 100;
pollReadyStateIntervalId = _global.setInterval(this, "checkReadyToBuildDartOverlay", _local2);
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.POLLING_JS_READY_TO_GO);
}
function checkReadyToBuildDartOverlay() {
if (_level0.dcRtg != undefined) {
dartOrd = _level0.dartOrd;
_global.clearInterval(pollReadyStateIntervalId);
buildDartOverlay();
}
}
function buildDartOverlay() {
var _local2 = moduleAdapter.getDisplayRect();
dartOverlay = overallHolder.attachMovie(com.google.youtube.players.modules.ad.DartOverlay.LINK_NAME, "dartOverlay", overallHolder.getNextHighestDepth());
dartOverlay.registerEvent(com.google.youtube.event.DartAdEvent.DART_CUSTOM_AD, com.google.chianti.event.EventDelegate.create(this, onDartCustomAd));
dartOverlay.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_LOADED, com.google.chianti.event.EventDelegate.create(this, onDartAdLoaded));
dartOverlay.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_OPENED, com.google.chianti.event.EventDelegate.create(this, onDartAdOpened));
dartOverlay.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_CLICKED, com.google.chianti.event.EventDelegate.create(this, onDartAdClicked));
dartOverlay.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_CLOSED, com.google.chianti.event.EventDelegate.create(this, onDartAdClosed));
dartOverlay.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_ERROR, com.google.chianti.event.EventDelegate.create(this, onDartAdError));
onResize();
dartOverlay.init(configData.playerConfigData.interfaceLanguage);
var _local3 = configData.currentVideoData.getUntypedVideoData().ad_tag;
if (!urlValidator.validateUrl(_local3)) {
return(undefined);
}
dartAdTagHandler.init(_local3);
dartOverlay.setAdTagUrl(_local3);
dartOverlay.setDartOrd(dartOrd);
dartAdTagHandler.setOrdValue(dartOrd);
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.REQUEST_480x70);
dartOverlay.loadDartAd();
}
function buildDartInteractive(newAdTagUrl) {
var _local3 = moduleAdapter.getDisplayRect();
buildAdBackground();
dartInteractive = overallHolder.attachMovie(com.google.youtube.players.modules.ad.DartInteractive.LINK_NAME, "dartInteractive", overallHolder.getNextHighestDepth());
dartInteractive.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_LOADED, com.google.chianti.event.EventDelegate.create(this, onDartAdLoaded));
dartInteractive.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_OPENED, com.google.chianti.event.EventDelegate.create(this, onDartInteractiveOpened));
dartInteractive.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_CLOSED, com.google.chianti.event.EventDelegate.create(this, onDartInteractiveClosed));
onResize();
dartInteractive.init(configData.playerConfigData.interfaceLanguage);
dartInteractive.setAdTagUrl(newAdTagUrl);
}
function buildAdMovie(newVideoId, newDisplayUrl) {
var _local4 = moduleAdapter.getDisplayRect();
buildAdBackground();
adMovie = overallHolder.attachMovie(com.google.youtube.players.modules.ad.AdMovie.LINK_NAME, "adMovie", overallHolder.getNextHighestDepth());
adMovie.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_CLOSED, com.google.chianti.event.EventDelegate.create(this, onDartInteractiveClosed));
adMovie.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_CLICKED, com.google.chianti.event.EventDelegate.create(this, onDartAdClicked));
adMovie.registerEvent(com.google.youtube.event.DartAdEvent.DART_AD_OPENED, com.google.chianti.event.EventDelegate.create(this, onDartInteractiveOpened));
adMovie.init(configData, dartLogger);
adMovie.setVisibleUrl(newDisplayUrl);
adMovie.setAdVideoId(newVideoId);
onResize();
}
function buildAfvOverlay() {
var _local2 = moduleAdapter.getViewportRect();
afvOverlay = overallHolder.attachMovie(com.google.youtube.players.modules.ad.AfvOverlay.LINK_NAME, "afvOverlay", overallHolder.getNextHighestDepth());
afvOverlay.registerEvent(com.google.youtube.event.AdControllerEvent.AD_CLICKED, com.google.chianti.event.EventDelegate.create(this, pauseMainVideo));
onResize();
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.REQUEST_AFV);
configData.currentVideoData.getUntypedVideoData().eurl = configData.playerConfigData.eurl;
afvOverlay.init(configData.currentVideoData);
setOverlayPopupTime(DEFAULT_AFV_OVERLAY_POPUP_TIME - 1);
addSeekBarMarker(DEFAULT_AFV_OVERLAY_POPUP_TIME);
}
function onResize(evt) {
var _local3 = moduleAdapter.getViewportRect();
if ((_local3.width / com.google.youtube.players.VideoPlayer.STILL_ASPECT_RATIO) > _local3.height) {
var _local4 = _local3.height;
var _local5 = com.google.youtube.players.VideoPlayer.DEFAULT_HEIGHT;
} else {
var _local4 = _local3.width;
var _local5 = com.google.youtube.players.VideoPlayer.DEFAULT_WIDTH;
}
newScale = _local4 / _local5;
var _local6 = (_local4 / _local5) * 100;
moduleMask._width = _local3.width;
moduleMask._height = _local3.height;
moduleMask._x = _local3.x;
moduleMask._y = _local3.y;
adBackground._width = _local3.width;
adBackground._height = _local3.height;
adBackground._x = _local3.x;
adBackground._y = _local3.y;
if (dartOverlay) {
com.gs.TweenLite.killTweensOf(dartOverlay);
dartOverlay._xscale = (dartOverlay._yscale = _local6);
dartOverlay._x = (_local3.x + (_local3.width / 2)) - ((com.google.youtube.players.modules.ad.DartOverlay.DEFAULT_WIDTH * newScale) / 2);
dartOverlay._y = (dartOverlay._visible ? (_local3.bottom - (com.google.youtube.players.modules.ad.DartOverlay.DEFAULT_HEIGHT * newScale)) : (_local3.bottom));
}
if (adButton) {
adButton._xscale = (adButton._yscale = _local6);
adButton._y = (_local3.height - adButton._height) - (AD_BUTTON_PADDING * newScale);
adButton._x = (_local3.width - adButton._width) - (AD_BUTTON_PADDING * newScale);
}
if (adMovie) {
com.gs.TweenLite.killTweensOf(adMovie);
adMovie._xscale = (adMovie._yscale = _local6);
adMovie._x = Math.round((_local3.width / 2) - ((com.google.youtube.players.modules.ad.AdMovie.DEFAULT_WIDTH * newScale) / 2));
adMovie._y = Math.round((_local3.height / 2) - ((com.google.youtube.players.modules.ad.AdMovie.DEFAULT_HEIGHT * newScale) / 2));
return(undefined);
}
if (dartInteractive) {
com.gs.TweenLite.killTweensOf(dartInteractive);
dartInteractive._xscale = (dartInteractive._yscale = _local6);
dartInteractive._x = Math.round((_local3.width / 2) - ((com.google.youtube.players.modules.ad.DartInteractive.DEFAULT_WIDTH * newScale) / 2));
dartInteractive._y = Math.round((_local3.height / 2) - ((com.google.youtube.players.modules.ad.DartInteractive.DEFAULT_HEIGHT * newScale) / 2));
return(undefined);
}
if (afvOverlay) {
afvOverlay.setInStreamAdLocation(_local3.x, _local3.y);
afvOverlay.setInStreamAdSize(_local3.width, _local3.height);
}
if (videoContainer) {
videoContainer.setViewportSize(0, 0, _local3.width, _local3.height);
}
}
function onAdButtonRelease() {
hideAdButton();
fadeOverlayUp();
}
function hideAdButton() {
adButton._visible = false;
}
function showAdButton() {
adButton._alpha = 0;
adButton._visible = true;
com.gs.TweenLite.to(adButton, 0.35, {_alpha:100});
}
function onProgress(evt) {
var _local3 = evt.data.currentTime;
if (cbsPlaylist) {
cbsPlaylist.requestAdForTime(_local3);
if (((preAdPlayState == com.google.youtube.players.VideoPlayer.SEEKING) || (preAdPlayState == com.google.youtube.players.VideoPlayer.BUFFERING)) && (moduleAdapter.getPlayState() == com.google.youtube.players.VideoPlayer.PLAYING)) {
pauseMainVideo();
preAdPlayState = com.google.youtube.players.VideoPlayer.PLAYING;
}
}
if (_global.isNaN(overlayPopupTime)) {
return(undefined);
}
if (moduleAdapter.getPlayState() != com.google.youtube.players.VideoPlayer.PLAYING) {
return(undefined);
}
if (_local3 >= overlayPopupTime) {
onAdTrackEvent();
overlayPopupTime = undefined;
}
}
function onPlaylistScroll(evt) {
if (afvOverlay) {
afvOverlay.onAdScroll(evt.data);
return(undefined);
}
}
function getReservedRect() {
var _local2 = moduleAdapter.getDisplayRect();
if (afvOverlay) {
var _local3 = afvOverlay.getReservedHeightRemaximized();
return(new flash.geom.Rectangle(_local2.x, _local2.bottom - _local3, _local2.width, _local3));
}
if (dartOverlay && (isInvideoOverlayShowing)) {
return(new flash.geom.Rectangle(_local2.x, _local2.bottom - com.google.youtube.players.modules.ad.DartOverlay.DEFAULT_HEIGHT, _local2.width, com.google.youtube.players.modules.ad.DartOverlay.DEFAULT_HEIGHT));
}
return(new flash.geom.Rectangle(0, 0, 0, 0));
}
function onPlaylistClipSelected(evt) {
if (afvOverlay) {
afvOverlay.onRelatedVideoClick();
}
}
function onSeek(evt) {
if (!playCompleted) {
return(undefined);
}
playCompleted = false;
if (afvOverlay) {
afvOverlay.exitReMaximizeAd();
}
if (dartAd) {
fadeOverlayOut();
}
}
function onEnd(evt) {
playCompleted = true;
if (!playPostRollAd()) {
if (afvOverlay) {
afvOverlay.reMaximizeAd();
return(undefined);
}
if (dartAd) {
clearDartOverlayTimeout();
hideAdButton();
dartOverlay.hide();
dartOverlay.hideCloseButton();
fadeOverlayUp();
}
}
if (cbsPlaylist) {
var _local3 = cbsPlaylist.requestAdForTime(com.google.youtube.players.modules.ad.CBSAd.POSTROLL);
if (_local3) {
disableVideoControls();
adBackground._visible = true;
}
}
}
function fadeOverlayUp() {
isInvideoOverlayShowing = true;
dartOverlay.show();
com.gs.TweenLite.to(dartOverlay, 0.35, {_y:moduleAdapter.getViewportRect().height - (com.google.youtube.players.modules.ad.DartOverlay.DEFAULT_HEIGHT * newScale)});
}
function fadeOverlayOut() {
clearDartOverlayTimeout();
com.gs.TweenLite.to(dartOverlay, 0.35, {_y:moduleAdapter.getViewportRect().height, onComplete:com.google.chianti.event.EventDelegate.create(this, onFinishFadeOverlayOut)});
}
function onFinishFadeOverlayOut() {
isInvideoOverlayShowing = false;
showAdButton();
dartOverlay.hide();
}
function fadeAdUp() {
var _local2 = {};
_local2.volume = moduleAdapter.getVolume();
_local2.isMuted = moduleAdapter.getIsMuted();
adBackground._visible = true;
adBackground._alpha = 0;
currentAd.defaultY = currentAd._y;
currentAd._y = currentAd.defaultY + ANIMATION_PADDING;
currentAd._alpha = 0;
currentAd.show(_local2);
com.gs.TweenLite.to(currentAd, 0.5, {_y:currentAd.defaultY, _alpha:100});
com.gs.TweenLite.to(adBackground, 0.5, {_alpha:70});
}
function fadeAdOut() {
com.gs.TweenLite.to(currentAd, 0.35, {_y:currentAd._y + ANIMATION_PADDING, _alpha:0, onComplete:com.google.chianti.event.EventDelegate.create(this, onFinishFadeAdOut)});
com.gs.TweenLite.to(adBackground, 0.5, {_alpha:0});
}
function onFinishFadeAdOut() {
currentAd._y = currentAd._y - ANIMATION_PADDING;
dartOverlay._y = moduleAdapter.getViewportRect().bottom;
adBackground._visible = false;
if (preAdPlayState == com.google.youtube.players.VideoPlayer.PLAYING) {
playMainVideo();
}
currentAd.hide();
enableVideoControls();
if (playCompleted) {
dartOverlay.hideCloseButton();
fadeOverlayUp();
return(undefined);
}
showAdButton();
}
function setDartOverlayTimeout(newTimeout) {
_global.clearInterval(dartOverlayTimeoutId);
var _local3 = 100;
dartOverlayTimeoutId = _global.setInterval(this, "dartOverlayTimeout", _local3, newTimeout, _local3);
dartOverlayTimeoutCounter = 0;
}
function clearDartOverlayTimeout() {
_global.clearInterval(dartOverlayTimeoutId);
}
function dartOverlayTimeout(timeout, interval) {
dartOverlayTimeoutCounter = dartOverlayTimeoutCounter + interval;
if (dartOverlayTimeoutCounter >= timeout) {
fadeOverlayOut();
_global.clearInterval(dartOverlayTimeoutId);
}
}
function setCurrentAd(newAd) {
currentAd = newAd;
}
function preAdSetup() {
dartOverlay.hide();
preAdPlayState = moduleAdapter.getPlayState();
if (preAdPlayState == com.google.youtube.players.VideoPlayer.PLAYING) {
pauseMainVideo();
}
disableVideoControls();
}
function playPostRollAd() {
if (adMovie && (postRollEnabled)) {
clearDartOverlayTimeout();
hideAdButton();
preAdSetup();
broadcast({type:com.google.youtube.event.ModuleEvent.HIDE_END_SCREEN});
adMovie.setInvideoAdType(com.google.youtube.logging.YouTubeStatsLogger.AD_TYPE_POSTROLL);
dartLogger.setInvideoAdType(com.google.youtube.logging.YouTubeStatsLogger.AD_TYPE_POSTROLL);
playAdMovie();
postRollEnabled = false;
postRollPlaying = true;
return(true);
}
if (postRollPlaying) {
broadcast({type:com.google.youtube.event.ModuleEvent.HIDE_END_SCREEN});
return(true);
}
return(false);
}
function playMidRollAd(ctpAd) {
preAdSetup();
if (ctpAd.videoId) {
adMovie.setInvideoAdType(com.google.youtube.logging.YouTubeStatsLogger.AD_TYPE_MIDROLL);
dartLogger.setInvideoAdType(com.google.youtube.logging.YouTubeStatsLogger.AD_TYPE_MIDROLL);
playAdMovie();
postRollEnabled = false;
} else if (ctpAd.media) {
playInteractiveAd();
}
}
function playAdMovie() {
setCurrentAd(adMovie);
fadeAdUp();
}
function playInteractiveAd() {
setCurrentAd(dartInteractive);
if (!dartInteractive.getAdLoaded()) {
dartInteractive.loadDartAd();
}
fadeAdUp();
}
function fetchRichMediaInfo(parseXml) {
var _local3 = new com.google.youtube.data.XMLData(true);
if (parseXml) {
_local3.registerEvent(com.google.youtube.event.DataEvent.LOAD, com.google.chianti.event.EventDelegate.create(this, parseRichMediaInfo));
_local3.registerEvent(com.google.youtube.event.DataEvent.ERROR, com.google.chianti.event.EventDelegate.create(this, parseRichMediaError));
}
_local3.loadXML(dartAdTagHandler.getRichMediaTag());
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.REQUEST_450X60);
}
function parseRichMediaInfo(adInfo) {
if (!adInfo) {
return(undefined);
}
var _local3 = adInfo.data.trackInsertPlay._value;
var _local4 = adInfo.data.trackImp._value;
var _local5 = adInfo.data.adOffset._value;
var _local6 = secondsToMilliseconds(adInfo.data.adLengthOfPlay._value);
var _local7 = adInfo.data.displayURL._value;
dartOverlay.setAdTimeout(_local6);
dartLogger.setOverlayViewUrl(_local4);
var _local8 = new Object();
if (adInfo.data.insertPlacement.videoID._value && (adInfo.data.insertPlacement.videoID._value != "none")) {
_local8.videoId = adInfo.data.insertPlacement.videoID._value;
buildAdMovie(_local8.videoId, _local7);
dartOverlay.setCtpAd(_local8);
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.OVERLAY_MOVIE);
} else if (adInfo.data.insertPlacement.interactive._value == "true") {
_local8.media = dartAdTagHandler.getInteractiveTag();
buildDartInteractive(_local8.media);
dartOverlay.setCtpAd(_local8);
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.OVERLAY_INTERACTIVE);
} else {
dartOverlay.setCtpAd(undefined);
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.OVERLAY_UNDEFINED);
}
if (_local5) {
setOverlayPopupTime(_local5);
addSeekBarMarker(_local5);
} else {
setOverlayPopupTime(DEFAULT_DART_OVERLAY_POPUP_TIME);
addSeekBarMarker(DEFAULT_DART_OVERLAY_POPUP_TIME);
}
if (adInfo.data.postRoll._value == "true") {
postRollEnabled = true;
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.RESPONSE_450X60_POSTROLL);
} else {
postRollEnabled = false;
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.RESPONSE_450X60_MIDROLL);
}
}
function parseRichMediaError() {
}
function fallbackAd() {
var _local2 = configData.currentVideoData.getUntypedVideoData();
closeInPageAdIframe();
if (!_local2.afv) {
return(undefined);
}
buildAfvOverlay();
}
function closeInPageAdIframe() {
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.call("closeInPageAdIframe");
} else {
getURL("javascript:closeInPageAdIframe();");
}
}
function setOverlayPopupTime(newTime) {
overlayPopupTime = newTime;
}
function onDartAdError(customAdObject) {
fetchRichMediaInfo(false);
}
function onDartCustomAd(customAdObject) {
fetchRichMediaInfo(false);
var _local3 = customAdObject.data.dartAdHolder.getDARTAd().getXMLNode();
var _local4 = new com.google.youtube.data.XMLData(true, _local3.toString());
var _local5 = _local4.getParsedData();
var _local6 = _local5.trackImp._value;
var _local7 = Number(_local5.adOffset._value);
var _local8 = _local5.rm._value;
if (!_local6) {
return(undefined);
}
if (_local7 != _global.NaN) {
var _local9 = secondsToMilliseconds(_local7);
_global.clearInterval(callFallbackImpression);
callFallbackImpression = _global.setInterval(this, "fallbackImpression", _local9, _local6);
} else {
callFallbackImpression = _global.setInterval(this, "fallbackImpression", 0, _local6);
}
if (_local8 == "true") {
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.RESPONSE_480x70_CUSTOM_AFV);
fallbackAd();
} else {
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.RESPONSE_480x70_CUSTOM_MPU);
}
}
function fallbackImpression(impressionURL) {
dartLogger.logEvent(impressionURL);
clearFallbackImpression();
}
function clearFallbackImpression() {
_global.clearInterval(callFallbackImpression);
}
function setLongformCompanion(companionTag) {
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.call("setLongformCompanion", companionTag);
} else if (System.capabilities.playerType == "ActiveX") {
fscommand ("setLongformCompanion", companionTag);
} else {
getURL(("javascript:setLongformCompanion(" + companionTag) + ");");
}
}
function initAd(newDartAd) {
if ((!newDartAd) || (dartAd)) {
return(undefined);
}
dartAd = newDartAd;
dartAdTagHandler.setAdId(dartAd.conduit.getDartAdId());
dartLogger.setDartAd(dartAd);
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.RESPONSE_480x70_REGULAR);
if (!dartAdTagHandler.isRichMediaTag()) {
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.RESPONSE_480x70_CUSTOM_AFV);
fallbackAd();
return(undefined);
}
buildAdButton();
fetchRichMediaInfo(true);
}
function onAdTrackEvent() {
if (!afvOverlay) {
dartLogger.onDartOverlayViewedEvent();
fadeOverlayUp();
} else {
afvOverlay.showInStreamAd();
moduleAdapter.hideLogo();
}
}
function onDartAdLoaded(evt) {
initAd(evt.data);
}
function onDartAdOpened(evt) {
if (!playCompleted) {
setDartOverlayTimeout(evt.data.timeout);
}
}
function onDartAdClosed(evt) {
fadeOverlayOut();
}
function onDartAdClicked(evt) {
clearDartOverlayTimeout();
if (evt.data.ctpAd) {
playMidRollAd(evt.data.ctpAd);
} else {
pauseMainVideo();
currentAd.end();
dartLogger.onExitEvent();
}
}
function onDartInteractiveOpened(evt) {
dartLogger.onAdOpenEvent();
}
function onDartInteractiveClosed(evt) {
fadeAdOut();
if (playCompleted) {
broadcast({type:com.google.youtube.event.ModuleEvent.SHOW_END_SCREEN});
}
}
function destroy() {
broadcast({type:com.google.youtube.event.ModuleEvent.REMOVE_MARKERS});
moduleMask.removeMovieClip();
adBackground.removeMovieClip();
if (dartOverlay) {
dartOverlay.removeMovieClip();
}
if (adButton) {
adButton.removeMovieClip();
}
if (adMovie) {
adMovie.removeMovieClip();
return(undefined);
}
if (dartInteractive) {
dartInteractive.removeMovieClip();
return(undefined);
}
if (afvOverlay) {
afvOverlay.removeMovieClip();
}
}
function secondsToMilliseconds(seconds) {
return(seconds * 1000);
}
function getLoggingOptions() {
var _local2 = getLastStateTransitions();
if (_local2.length) {
return({adstates:_local2});
}
return({});
}
function getLastStateTransitions() {
var _local2 = adStateMc.getTransitions();
var _local3 = adStateMc.getStateCount();
var _local4 = "";
if (numStateSent < _local3) {
_local4 = _local2[numStateSent];
numStateSent++;
}
while (numStateSent < _local3) {
_local4 = (_local4 + ",") + _local2[numStateSent];
numStateSent++;
}
return(_local4);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.ad.AdModule";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.ad.AdModule);
static var DEFAULT_DART_OVERLAY_POPUP_TIME = 15;
static var DEFAULT_AFV_OVERLAY_POPUP_TIME = 10;
static var DEFAULT_MARKER_WIDTH = 2;
static var AD_BUTTON_PADDING = 5;
static var ANIMATION_PADDING = 25;
static var DELAY_CBS_STARTUP_TIME = 1000;
static var VIDEO_CONTAINER_LEVEL = 10002;
static var REPORTING_CONTEXT_LEVEL = 10003;
}
Symbol 20543 MovieClip [__Packages.com.google.youtube.players.modules.ad.AfvOverlay] Frame 0
class com.google.youtube.players.modules.ad.AfvOverlay extends com.google.youtube.AbstractElement
{
var adStateMc, adRequestObject, inStreamAdWidth, inStreamAdHeight, adLibrary, createEmptyMovieClip, getNextHighestDepth, broadcast, inStreamAdPlayer, inStreamAdX, inStreamAdY, isInStreamAdPlayerClosed;
function AfvOverlay (asm) {
super();
adStateMc = asm;
}
function init(videoData) {
adRequestObject = buildAdRequestObject(videoData);
if (!adRequestObject.videoPublisherId) {
return(undefined);
}
System.security.allowDomain("http://pagead2.googlesyndication.com");
loadAdLibrary(this);
}
function buildAdRequestObject(videoData) {
var _local3 = {};
var _local4 = videoData.getUntypedVideoData();
_local3.pubWidth = inStreamAdWidth;
_local3.pubHeight = inStreamAdHeight;
_local3.videoProductType = VIDEO_PRODUCT_TYPE;
_local3.adType = "overlay";
if ((_local4.ad_eurl != undefined) && (_local4.ad_eurl != "")) {
_local3.referrerUrl = _local4.ad_eurl;
} else {
_local3.referrerUrl = _local4.eurl;
}
_local3.contentId = "yt_" + videoData.id;
_local3.channels = _local4.ad_channel_code.split(",");
if (_local4.ad_client) {
_local3.videoPublisherId = _local4.ad_client;
} else {
_local3.videoPublisherId = _local4.ad_video_pub_id;
_local3.hostTierId = Number(_local4.ad_host_tier);
_local3.contentOwnerId = _local4.ad_host;
}
_local3.cust_l = _local4.cust_l;
_local3.cust_p = _local4.cust_p;
_local3.pageReferrerUrl = getReferrerUrl();
return(_local3);
}
function loadAdLibrary() {
adLibrary = createEmptyMovieClip("adLibrary", getNextHighestDepth());
var _local2 = new Object();
_local2.onLoadInit = com.google.chianti.event.EventDelegate.create(this, onAdLibraryLoadInit);
_local2.onLoadError = com.google.chianti.event.EventDelegate.create(this, onAdLibraryLoadError);
var _local3 = new MovieClipLoader();
_local3.addListener(_local2);
_local3.loadClip(AD_LIBRARY_URL, adLibrary);
}
function onAdLibraryLoadError() {
broadcast({type:com.google.youtube.event.AdControllerEvent.LOAD_ERROR, target:this});
}
function onAdLibraryLoadInit() {
requestInStreamAds();
}
function showAdPlayer(player) {
player.play();
}
function hideAdPlayer(player) {
player.pause();
player.fadeOut();
}
function reMaximizeAdPlayer(player) {
player.reMaximize();
}
function exitReMaximizeAdPlayer(player) {
player.exitReMaximizeAd();
}
function requestInStreamAds() {
adLibrary.requestAds(adRequestObject, com.google.chianti.event.EventDelegate.create(this, onInStreamAdsRequestResult));
}
function onInStreamAdsRequestResult(response) {
if (response.success) {
inStreamAdPlayer = response.ads[0].getAdPlayerMovieClip();
inStreamAdPlayer.setSize(inStreamAdWidth, inStreamAdHeight);
inStreamAdPlayer._x = inStreamAdX;
inStreamAdPlayer._y = inStreamAdY;
inStreamAdPlayer.onAdClick = com.google.chianti.event.EventDelegate.create(this, onAdClicked);
inStreamAdPlayer.onAdClosed = com.google.chianti.event.EventDelegate.create(this, onAdClosed);
inStreamAdPlayer.onAdOpened = com.google.chianti.event.EventDelegate.create(this, onAdOpened);
inStreamAdPlayer.onAdShown = com.google.chianti.event.EventDelegate.create(this, onAdShown);
inStreamAdPlayer.onAdHidden = com.google.chianti.event.EventDelegate.create(this, onAdHidden);
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.RESPONSE_AFV_SUCCESS);
inStreamAdPlayer.load();
} else {
adStateMc.enterState(com.google.youtube.players.modules.ad.AdStateMachine.RESPONSE_AFV_ERROR);
}
}
function getReferrerUrl() {
var _local2 = flash.external.ExternalInterface.call("document.referrer.toString");
return((((_local2 == undefined) || (_local2 == "null")) ? undefined : (String(_local2))));
}
function onAdShown(isClosed) {
broadcast({type:com.google.youtube.event.AdControllerEvent.IN_STREAM_AD_SHOWN, target:this, data:{isClosed:isClosed}});
}
function onAdHidden() {
broadcast({type:com.google.youtube.event.AdControllerEvent.IN_STREAM_AD_HIDDEN, target:this});
}
function onAdClosed() {
isInStreamAdPlayerClosed = true;
broadcast({type:com.google.youtube.event.AdControllerEvent.IN_STREAM_AD_CLOSED, target:this});
}
function onAdOpened() {
isInStreamAdPlayerClosed = false;
broadcast({type:com.google.youtube.event.AdControllerEvent.IN_STREAM_AD_OPENED, target:this});
}
function onAdClicked() {
broadcast({type:com.google.youtube.event.AdControllerEvent.AD_CLICKED, target:this});
}
function showInStreamAd() {
showAdPlayer(inStreamAdPlayer);
}
function hideInStreamAd() {
hideAdPlayer(inStreamAdPlayer);
}
function reMaximizeAd() {
reMaximizeAdPlayer(inStreamAdPlayer);
}
function exitReMaximizeAd() {
exitReMaximizeAdPlayer(inStreamAdPlayer);
}
function onAdScroll(delta) {
inStreamAdPlayer.onAdScroll(delta);
}
function onRelatedVideoClick() {
inStreamAdPlayer.onRelatedVideoClick();
}
function getReservedHeightRemaximized() {
var _local2 = inStreamAdPlayer.getReservedHeightRemaximized();
if (_local2 != undefined) {
return(_local2);
}
return(0);
}
function setInStreamAdLocation(newX, newY) {
inStreamAdX = newX;
inStreamAdY = newY;
inStreamAdPlayer._x = inStreamAdX;
inStreamAdPlayer._y = inStreamAdY;
}
function setInStreamAdSize(newWidth, newHeight) {
inStreamAdWidth = newWidth;
inStreamAdHeight = newHeight;
inStreamAdPlayer.setSize(inStreamAdWidth, inStreamAdHeight);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.ad.AfvOverlay";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.ad.AfvOverlay);
static var VIDEO_PRODUCT_TYPE = 5;
static var AD_SERVER_URL = "http://pagead2.googlesyndication.com";
static var AD_LIBRARY_URL = "http://pagead2.googlesyndication.com/pagead/scache/googlevideoads.swf";
}
Symbol 20544 MovieClip [__Packages.com.google.youtube.util.MouseActivity] Frame 0
class com.google.youtube.util.MouseActivity extends com.google.youtube.AbstractBroadcaster
{
var lastXMouse, lastYMouse, mouseState, broadcast;
function MouseActivity (opt_monitorMouseButtonActivity) {
super();
motionInterval = _global.setInterval(this, "onCheckMotion", 20);
if (opt_monitorMouseButtonActivity) {
var _local4 = {onMouseDown:com.google.chianti.event.EventDelegate.create(this, onLeftMouseDown), onMouseUp:com.google.chianti.event.EventDelegate.create(this, onLeftMouseUp)};
Mouse.addListener(_local4);
}
}
function onCheckMotion() {
if ((_root._xmouse != lastXMouse) || (_root._ymouse != lastYMouse)) {
lastXMouse = _root._xmouse;
lastYMouse = _root._ymouse;
onMouseMove();
}
}
function setTimeout(milliseconds) {
timeout = milliseconds;
start();
}
function touch() {
onMouseMove();
}
function onMouseMove() {
mouseState = MOUSE_ACTIVE;
broadcast({type:MOUSE_ACTIVE, target:this});
start();
}
function onLeftMouseDown() {
blockInactiveBroadcast = true;
}
function onLeftMouseUp() {
blockInactiveBroadcast = false;
touch();
}
function clear() {
_global.clearInterval(timeoutInterval);
timeoutInterval = 0;
}
function start() {
clear();
timeoutInterval = _global.setInterval(this, "onInterval", timeout);
}
function onInterval() {
if ((!blockInactiveBroadcast) && (mouseState != MOUSE_INACTIVE)) {
clear();
mouseState = MOUSE_INACTIVE;
broadcast({type:MOUSE_INACTIVE, target:this});
}
}
static var MOUSE_ACTIVE = "active";
static var MOUSE_INACTIVE = "inactive";
var timeout = 2000;
var timeoutInterval = 0;
var motionInterval = 0;
var blockInactiveBroadcast = false;
}
Symbol 20545 MovieClip [__Packages.com.google.youtube.players.modules.ModuleStatus] Frame 0
class com.google.youtube.players.modules.ModuleStatus
{
function ModuleStatus () {
}
static var UNAVAILABLE = -1;
static var NOT_LOADED = 0;
static var LOADING = 1;
static var LOADED = 2;
static var ERROR = 3;
}
Symbol 20546 MovieClip [__Packages.com.google.youtube.ui.SliderControl] Frame 0
class com.google.youtube.ui.SliderControl extends com.google.youtube.ui.CompoundButton
{
var minValue, maxValue, orientation, hitArea, handle, currentValue, broadcast, onEnterFrame, unhover, rollOver, rollOut, _ymouse, _xmouse, movePercent, createEmptyMovieClip, includeMouseActivityOf, bg, getNextHighestDepth;
function SliderControl () {
super();
}
function setValues(min, max) {
minValue = min;
maxValue = max;
}
function setSize(newSize, newOrientation, disableKeyboard) {
orientation = newOrientation;
switch (orientation) {
case SLIDER_ORIENTATION_VERTICAL :
height = newSize;
break;
default :
width = newSize;
}
build(disableKeyboard);
hitArea.tabEnabled = false;
handle.tabEnabled = false;
}
function getValue() {
updateValue(true);
return(currentValue);
}
function setValue(newValue, cancelEventBroadcast) {
if ((newValue >= minValue) && (newValue <= maxValue)) {
cancelBroadcast = ((cancelEventBroadcast != undefined) ? (cancelEventBroadcast) : false);
updateHandle(newValue);
updateValue();
}
return(currentValue);
}
function updateValue() {
switch (orientation) {
case SLIDER_ORIENTATION_VERTICAL :
currentValue = Math.round(Math.abs(((handle._y / (height - HANDLE_WIDTH)) * maxValue) - maxValue));
break;
default :
currentValue = Math.round((handle._x / (width - HANDLE_WIDTH)) * maxValue);
}
if (!cancelBroadcast) {
broadcast({type:com.google.youtube.event.UIEvent.CHANGE, data:currentValue, target:this});
}
}
function updateHandle(newValue) {
onEnterFrame = com.google.chianti.event.EventDelegate.create(this, onSlide);
switch (orientation) {
case SLIDER_ORIENTATION_VERTICAL :
var _local3 = Math.round((Math.abs(maxValue - newValue) / maxValue) * (height - HANDLE_WIDTH));
com.gs.TweenLite.to(handle, 0.2, {_y:_local3, onComplete:com.google.chianti.event.EventDelegate.create(this, onHandleRelease)});
break;
default :
com.gs.TweenLite.to(handle, 0.2, {_x:Math.round((newValue / maxValue) * (width - HANDLE_WIDTH)), onComplete:com.google.chianti.event.EventDelegate.create(this, onHandleRelease)});
}
}
function onHandlePress() {
switch (orientation) {
case SLIDER_ORIENTATION_VERTICAL :
handle.startDrag(false, 0, 0, handle._x, height - HANDLE_WIDTH);
break;
default :
handle.startDrag(false, 0, handle._y, width - HANDLE_WIDTH, handle._y);
}
onEnterFrame = com.google.chianti.event.EventDelegate.create(this, onSlide);
broadcast({type:com.google.youtube.event.GenericButtonEvent.PRESS, target:this});
}
function onHandleRelease() {
handle.stopDrag();
updateValue(true);
cancelBroadcast = false;
delete onEnterFrame;
broadcast({type:com.google.youtube.event.GenericButtonEvent.RELEASE, target:this});
}
function onHandleReleaseOutside() {
onHandleRelease();
unhover();
}
function onSlide() {
updateValue();
}
function enable() {
setHandleEvents();
}
function disable() {
handle.onRollOver = (handle.onRollOut = null);
handle.onRelease = (handle.onReleaseOutside = (handle.onPress = null));
}
function setHandleEvents() {
handle.onRollOver = com.google.chianti.event.EventDelegate.create(this, rollOver);
handle.onRollOut = com.google.chianti.event.EventDelegate.create(this, rollOut);
handle.onPress = com.google.chianti.event.EventDelegate.create(this, onHandlePress);
handle.onRelease = com.google.chianti.event.EventDelegate.create(this, onHandleRelease);
handle.onReleaseOutside = com.google.chianti.event.EventDelegate.create(this, onHandleReleaseOutside);
}
function onBgRelease() {
switch (orientation) {
case SLIDER_ORIENTATION_VERTICAL :
var _local2 = Math.round(_ymouse - (handle._height / 2));
if (_local2 > (height - handle._height)) {
_local2 = height - handle._height;
} else if (_local2 < 0) {
_local2 = 0;
}
onEnterFrame = com.google.chianti.event.EventDelegate.create(this, onSlide);
com.gs.TweenLite.to(handle, 0.2, {_y:_local2, onComplete:com.google.chianti.event.EventDelegate.create(this, onHandleRelease)});
break;
default :
var _local3 = Math.round(_xmouse - (handle._width / 2));
if (_local3 > (width - handle._width)) {
_local3 = width - handle._width;
} else if (_local3 < 0) {
_local3 = 0;
}
onEnterFrame = com.google.chianti.event.EventDelegate.create(this, onSlide);
com.gs.TweenLite.to(handle, 0.2, {_x:_local3, onComplete:com.google.chianti.event.EventDelegate.create(this, onHandleRelease)});
}
}
function onKeyUp() {
switch (Key.getCode()) {
case Key.UP :
setValue(Math.min(currentValue + movePercent, maxValue));
break;
case Key.DOWN :
setValue(Math.max(currentValue - movePercent, minValue));
}
}
function enableKeyboardControls() {
movePercent = (maxValue - minValue) / 5;
Key.addListener(this);
}
function build(disableKeyboard) {
super.build();
hitArea = createEmptyMovieClip("hitArea", 1);
includeMouseActivityOf(hitArea);
bg = createEmptyMovieClip("bg", 2);
switch (orientation) {
case SLIDER_ORIENTATION_VERTICAL :
var _local10 = (90 / 180) * Math.PI;
var _local11 = 0;
var _local4 = Math.ceil((HANDLE_HEIGHT / 2) - (width / 2)) + 1;
var _local5 = 0;
var _local13 = HANDLE_HEIGHT;
var _local12 = HANDLE_WIDTH;
var _local15 = INNER_HANDLE_HEIGHT;
var _local14 = INNER_HANDLE_WIDTH;
var _local8 = _local13;
var _local9 = height;
var _local6 = (_local4 - (_local8 / 2)) + (width / 2);
var _local7 = _local5;
break;
default :
var _local10 = (90 / 180) * Math.PI;
var _local11 = (90 / 180) * Math.PI;
var _local4 = 0;
var _local5 = Math.ceil((HANDLE_HEIGHT / 2) - (height / 2)) + 1;
var _local13 = HANDLE_WIDTH;
var _local12 = HANDLE_HEIGHT;
var _local15 = INNER_HANDLE_WIDTH;
var _local14 = INNER_HANDLE_HEIGHT;
var _local8 = width;
var _local9 = _local12;
var _local6 = _local4;
var _local7 = 1;
}
var _local16 = {colors:[8421504, 11579568], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:_local4, y:_local5, w:width, h:height, r:_local11}};
com.google.youtube.util.Drawing.drawRect(bg, _local4, _local5, width, height, _local16);
com.google.youtube.util.Drawing.drawRect(hitArea, _local6, _local7, _local8, _local9, 16711680);
hitArea.onRelease = com.google.chianti.event.EventDelegate.create(this, onBgRelease);
hitArea._alpha = 0;
handle = createEmptyMovieClip("handle", getNextHighestDepth());
var _local17 = {colors:[16777215, 9737364], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0.5, y:0.5, w:_local13, h:_local12, r:_local10}};
var _local18 = {thickness:0, alpha:50, rgb:0};
var _local19 = {colors:[10921638, 3750201], fillType:"linear", alphas:[100, 100], ratios:[0, 205], matrix:{matrixType:"box", x:3.5, y:3.5, w:_local15, h:_local14, r:_local10}};
com.google.youtube.util.Drawing.drawRect(handle, 0.5, 0.5, _local13, _local12, _local17, _local18, [3, 3, 3, 3]);
com.google.youtube.util.Drawing.drawRect(handle, 3.5, 3.5, _local15, _local14, _local19, null, [2, 2, 2, 2]);
setHandleEvents();
if (!disableKeyboard) {
enableKeyboardControls();
}
}
static var LINK_NAME = "__Packages.com.google.youtube.ui.SliderControl";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.ui.SliderControl);
static var SLIDER_ORIENTATION_VERTICAL = "vertical";
static var SLIDER_ORIENTATION_HORIZONTAL = "horizontal";
static var HANDLE_WIDTH = 9;
static var HANDLE_HEIGHT = 17;
static var INNER_HANDLE_WIDTH = 3;
static var INNER_HANDLE_HEIGHT = 11;
var width = 5;
var height = 5;
var cancelBroadcast = false;
}
Symbol 20547 MovieClip [__Packages.com.google.youtube.players.modules.ad.CBSAd] Frame 0
class com.google.youtube.players.modules.ad.CBSAd
{
var isDone, pos, start, trackParam, end;
function CBSAd (adNode) {
isDone = false;
var _local3 = adNode.attributes;
pos = _local3.pos;
if (pos == "1") {
start = PREROLL;
} else if (pos == POS_POST) {
start = POSTROLL;
} else {
start = Math.max(0, _global.parseInt(_local3.start));
}
trackParam = _local3.track_param;
end = POSTROLL;
}
function toString() {
return(((((((((("CBSAd: {pos :" + pos) + ", start : ") + start) + ", end : ") + end) + ", trackParam : ") + trackParam) + ", isDone : ") + isDone) + "}");
}
static var PREROLL = 0;
static var POSTROLL = Number.MAX_VALUE;
static var POS_POST = "post";
}
Symbol 20548 MovieClip [__Packages.com.doubleclick.dartadholder.DARTAdHolder] Frame 0
class com.doubleclick.dartadholder.DARTAdHolder extends com.google.youtube.AbstractElement
{
var playbackObject, createEmptyMovieClip, getNextHighestDepth, broadcast, _parent, adTagURL, attachAudio, getURL;
function DARTAdHolder () {
super();
}
function getDARTShell() {
return(dartApiSwf);
}
function getDARTAsset() {
return(dartApiSwf.getAd().getMainAsset());
}
function getDARTAd() {
return(dartApiSwf.getAd());
}
function onLoad(Void) {
log("AdHolder component version: " + componentVersion);
System.security.allowDomain(protocol + host);
if (playbackInstance.length > 0) {
playbackObject = eval ("" + playbackInstance);
}
var _local3 = ("DartShell7_" + dartShellVersion) + ".swf";
var _local4 = ("DartShell8_" + dartShellVersion) + ".swf";
if (!dartApiSwf) {
log("Creating empty movie clip for DART API");
dartApiSwf = createEmptyMovieClip("dartApiSwf_mc", getNextHighestDepth());
com.google.chianti.event.EventBroadcaster.initialize(dartApiSwf);
}
if (dartShellParameters.length > 0) {
dartShellParameters = "&" + dartShellParameters;
}
var _local5 = ((videoPlayer == "NetStream") ? (_local3) : (_local4));
log("SWF Requested " + _local5);
dartApiSwf.loadMovie("http://ad.doubleclick.net/879366/DartShell7_7.swf?adServerHost=http://ad.doubleclick.net&&mtfNoFlush=true");
}
function allowDcDomain(strDomain) {
System.security.allowDomain(strDomain);
}
function onError(errorObj) {
if ((errorObj.shellError.getErrorCode() == "1002") || (errorObj.shellError.getErrorCode() == "1001")) {
log("Error: Ad returned from DART is not In-Stream or Flash-in-Flash type");
broadcast({type:"onNoAdReturned"});
} else {
log("Error: " + errorObj.shellError.getErrorMessage());
log("Error Type: " + errorObj.shellError.getErrorType());
log("Error Code: " + errorObj.shellError.getErrorCode());
}
}
function onDartShellLoaded(Void) {
shellHasLoaded = true;
broadcast({type:"onDartShellLoaded"});
log("DARTShell Loaded");
dartApiSwf.addEventListener("onInStreamAdLoaded", this);
dartApiSwf.addEventListener("onF2FAdLoaded", this);
dartApiSwf.addEventListener("onError", this);
dartApiSwf.addEventListener("onCustomAdLoaded", this);
dartApiSwf.addEventListener("onInStreamAdLoaded", com.google.chianti.event.EventDelegate.create(_parent, _parent.onInStreamAdLoaded));
dartApiSwf.addEventListener("onF2FAdLoaded", com.google.chianti.event.EventDelegate.create(_parent, _parent.onF2FAdLoaded));
dartApiSwf.addEventListener("onError", com.google.chianti.event.EventDelegate.create(_parent, _parent.onError));
dartApiSwf.addEventListener("onCustomAdLoaded", com.google.chianti.event.EventDelegate.create(_parent, _parent.onCustomAdLoaded));
if (autoLoad || (adIsWaiting)) {
log("Auto load = true or ad already requested, let's get an ad!");
loadNewAd();
}
}
function loadNewAd() {
if (!shellHasLoaded) {
log("Ad requested before Shell loaded, waiting...");
adIsWaiting = true;
} else {
if (dartAsset != undefined) {
log("Unload current asset");
dartAd = null;
if (!testingMode) {
dartAsset.unLoad();
} else {
dartAsset.hide();
}
}
if ((!dartOrdManuallySet) || ((dartOrd == undefined) || ((dartOrd == _global.NaN) || (dartOrd < 0)))) {
dartOrd = Math.floor(Math.random() * 100000);
}
if (adTagURL.length > 0) {
var _local2 = (adTagURL + ";ord=") + dartOrd;
currentAdTag = adTagURL;
log("Load ad by URL: " + _local2);
dartApiSwf.loadAdByURL(_local2);
} else {
var _local3 = new Array();
if (adKeyVal != "") {
var _local4 = adKeyVal.split(";");
var _local5 = 0;
for ( ; _local5 < _local4.length ; _local5++) {
var _local6 = _local4[_local5];
var _local7 = _local6.split("=");
var _local8 = _local7[0];
var _local9 = _local7[1];
_local3[_local8] = _local9;
}
}
dartApiSwf.loadAd(adSite, adZone, adSize, _local3, protocol, host);
currentAdTag = ((((((((protocol + host) + "/pfadx/") + adSite) + "/") + adZone) + ";dcmt=text/html;sz=") + adSize) + ";") + _local3;
log("Load ad by Parameters: " + currentAdTag);
}
}
}
function setDartOrd(n) {
dartOrd = n;
dartOrdManuallySet = true;
}
function getDartOrd() {
return(dartOrd);
}
function resetDartOrd() {
dartOrd = -1;
dartOrdManuallySet = false;
}
function onInStreamAdLoaded(Void) {
dartAd = dartApiSwf.getAd();
log("Streaming ad returned");
dartAd.addEventListener("onConnect", this);
if (videoPlayer == "NetStream") {
log("NetStream approach: ad.connect() called");
dartAd.connect();
} else if (autoPlay) {
log("Auto Play");
log(("FLVPLayback approach: ad.play(" + playbackObject) + ")");
dartAd.play(playbackObject);
}
}
function onConnect(Void) {
log("NetConnection received");
dartSound = new Sound(this);
if ((_global.globalSound != undefined) || (_global.globalSound != null)) {
dartSound.setVolume(_global.globalSound.getVolume());
}
dartNS = dartAd.getNetStream(playbackObject, dartSound);
attachAudio(dartNS);
if (dartNS != undefined) {
log("DARTNS " + dartNS);
playbackObject.attachVideo(dartNS);
NSSetBuffer(videoBuffer);
if (autoPlay) {
log("Auto Play");
dartNS.play(dartAd.getFlvURL());
log("Playing streaming ad at URL : " + dartAd.getFlvURL());
}
dartAd.onVideoMetaData = com.google.chianti.event.EventDelegate.create(this, onMetaData);
}
}
function onMetaData(infoObject) {
log("MetaData found");
var _local3 = new Object();
_local3.type = "onMetaData";
_local3.infoObject = infoObject.infoObject;
broadcast(_local3);
}
function playStream(Void) {
if (videoPlayer == "FLVPlayback") {
log("Playing FLVPlayback stream");
dartAd.play(playbackObject);
} else {
log("Playing Netstream stream");
dartNS.play(dartAd.getFlvURL());
}
}
function getNSBufferLength() {
return(dartNS.bufferLength);
}
function getNSBytesLoaded() {
return(dartNS.bytesLoaded);
}
function getNSBytesTotal() {
return(dartNS.bytesTotal);
}
function getNSCurrentFPS() {
return(dartNS.currentFps);
}
function getNSTime() {
return(dartNS.time);
}
function getNSSound() {
return(dartSound);
}
function NSSeek(offSet) {
log("Moving to NetStream position " + offSet);
dartNS.seek(offSet);
}
function NSPause() {
log("Pausing NetStream");
dartNS.pause();
}
function NSClose() {
log("Closing NetStream");
dartNS.close();
}
function NSSetBuffer(buffer) {
log("Setting NetStream buffer to " + buffer);
dartNS.setBufferTime(buffer);
}
function onF2FAdLoaded(Void) {
log("Flash-in-Flash ad returned");
dartAd = dartApiSwf.getAd();
if (autoPlay) {
log("Auto Play");
dartAd.display();
} else {
dartAsset = dartAd.getMainAsset();
dartAsset.load();
}
}
function hideAsset(Void) {
dartAsset = dartAd.getMainAsset();
if (dartAsset == undefined) {
log("Hide is only for Flash-in-Flash ads");
} else {
log("Hiding Flash-in-Flash ad");
dartAsset.hide();
}
}
function showAsset(Void) {
dartAsset = dartAd.getMainAsset();
if (dartAsset == undefined) {
log("Show is only for Flash-in-Flash ads");
} else {
log("Show Flash-in-Flash ad");
dartAsset.setX(adx);
dartAsset.setY(ady);
dartAsset.show();
}
}
function moveAsset() {
dartAsset = dartAd.getMainAsset();
if (dartAsset == undefined) {
log("Move is only for Flash-in-Flash ads");
} else {
log((("Moving Flash-in-Flash ad to X :" + adx) + " Y : ") + ady);
dartAsset.setX(adx);
dartAsset.setY(ady);
}
}
function log(logMessage) {
}
function assignVideoObject(videoObject) {
playbackObject = videoObject;
}
function jsRoadblock(roadblockURL) {
if ((!dartOrdManuallySet) || ((dartOrd == undefined) || ((dartOrd == _global.NaN) || (dartOrd < 0)))) {
dartOrd = Math.floor(Math.random() * 100000);
}
roadblockURL = roadblockURL + ((";ord=" + dartOrd) + ";");
log("Launching companion ad in browser with tag : " + roadblockURL);
getURL(("javascript:syncRoadBlock(\"" + roadblockURL) + "\");");
}
function getRoadblockURL(sz, command, roadBlockAdTag) {
if (roadBlockAdTag == null) {
if (currentAdTag == null) {
log("No ad tag requested, roadblock cannot be generated");
return(null);
}
roadBlockAdTag = currentAdTag;
}
if (sz.length > 0) {
var _local5 = roadBlockAdTag.lastIndexOf("sz");
var _local6 = roadBlockAdTag.indexOf(";", _local5);
if ((_local5 > 0) && (_local6 > 0)) {
roadBlockAdTag = ((roadBlockAdTag.slice(0, _local5) + "sz=") + sz) + roadBlockAdTag.slice(_local6);
}
}
if (command.length > 0) {
var _local7 = roadBlockAdTag.lastIndexOf("pfadx");
if (_local7 > 0) {
roadBlockAdTag = (roadBlockAdTag.slice(0, _local7) + command) + roadBlockAdTag.slice(_local7 + 5);
}
}
var _local8 = dartApiSwf.getRoadblockURL(roadBlockAdTag);
log("getRoadblockURL returning ad tag: " + _local8);
return(_local8);
}
static var LINK_NAME = "__Packages.com.doubleclick.dartadholder.DARTAdHolder";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.doubleclick.dartadholder.DARTAdHolder);
var dartApiSwf = null;
var dartAsset = null;
var dartSound = null;
var shellHasLoaded = false;
var adIsWaiting = false;
var dartNS = null;
var dartAd = null;
var dartOrd = -1;
var dartOrdManuallySet = false;
var componentVersion = "1.4_google";
var protocol = "http://";
var host = "ad.doubleclick.net";
var videoPlayer = "NetStream";
var adSite = "";
var adZone = "";
var adSize = "";
var adKeyVal = "";
var testingMode = false;
var playbackInstance = null;
var videoBuffer = 5;
var autoLoad = false;
var autoPlay = false;
var dartShellVersion = 7;
var dartShellParameters = "";
var adx = 0;
var ady = 0;
var currentAdTag = null;
}
Symbol 20549 MovieClip [__Packages.com.google.youtube.event.VideoPlayerEvent] Frame 0
class com.google.youtube.event.VideoPlayerEvent
{
function VideoPlayerEvent () {
}
static var PLAY = "onPlay";
static var STOP = "onStop";
static var PAUSE = "onPause";
static var END = "onEnd";
static var BUFFERING = "onBuffering";
static var SEEKING = "onSeeking";
static var SEEK = "onSeek";
static var LOAD_NEW_VIDEO = "onLoadNewVideo";
static var BYTES_LOADED = "onBytesLoaded";
static var PROGRESS = "onProgress";
static var META_LOAD = "onMetaLoaded";
static var PLAY_MODE_CHANGE = "onPlayModeChange";
static var VIDEO_CUED = "onVideoCued";
static var STATE_CHANGE = "onStateChange";
static var UNLOAD_VIDEO = "onVideoUnload";
}
Symbol 20550 MovieClip [__Packages.com.google.youtube.util.Drawing] Frame 0
class com.google.youtube.util.Drawing
{
function Drawing () {
}
static function drawRect(target, x, y, width, height, fill, lineStyle, radii, leaveFillOpen) {
drawRectWithPointer(target, x, y, width, height, fill, lineStyle, radii, leaveFillOpen);
}
static function drawRectWithPointer(target, x, y, width, height, fill, lineStyle, radii, leaveFillOpen, pointerWidth, pointerHeight, pointerOrientation) {
if (fill != null) {
setFill(target, fill);
}
setLineStyle(target, lineStyle);
var _local14 = [];
if (typeof(radii) == "number") {
var _local15 = 0;
for ( ; _local15 < 4 ; _local15++) {
_local14[_local15] = radii;
}
} else {
_local14 = Array(radii);
}
if (!radii) {
target.moveTo(x, y);
if (pointerOrientation == TOP) {
target.lineTo(x + ((width - pointerWidth) / 2), y);
target.lineTo(x + (width / 2), y - pointerHeight);
target.lineTo(x + ((width + pointerWidth) / 2), y);
}
target.lineTo(x + width, y);
if (pointerOrientation == RIGHT) {
target.lineTo(x + width, y + ((height - pointerWidth) / 2));
target.lineTo((x + width) + pointerHeight, y + (height / 2));
target.lineTo(x + width, y + ((height + pointerWidth) / 2));
}
target.lineTo(x + width, y + height);
if (pointerOrientation == BOTTOM) {
target.lineTo(x + ((width + pointerWidth) / 2), y + height);
target.lineTo(x + (width / 2), (y + height) + pointerHeight);
target.lineTo(x + ((width - pointerWidth) / 2), y + height);
}
target.lineTo(x, y + height);
if (pointerOrientation == LEFT) {
target.lineTo(x, y + ((height + pointerWidth) / 2));
target.lineTo(x - pointerHeight, y + (height / 2));
target.lineTo(x, y + ((height - pointerWidth) / 2));
}
target.lineTo(x, y);
} else {
target.moveTo(x + _local14[0], y);
if (pointerOrientation == TOP) {
target.lineTo(x + ((width - pointerWidth) / 2), y);
target.lineTo(x + (width / 2), y - pointerHeight);
target.lineTo(x + ((width + pointerWidth) / 2), y);
}
target.lineTo((x + width) - _local14[1], y);
target.curveTo(x + width, y, x + width, y + _local14[1]);
if (pointerOrientation == RIGHT) {
target.lineTo(x + width, y + ((height - pointerWidth) / 2));
target.lineTo((x + width) + pointerHeight, y + (height / 2));
target.lineTo(x + width, y + ((height + pointerWidth) / 2));
}
target.lineTo(x + width, (y + height) - _local14[2]);
target.curveTo(x + width, y + height, (x + width) - _local14[2], y + height);
if (pointerOrientation == BOTTOM) {
target.lineTo(x + ((width + pointerWidth) / 2), y + height);
target.lineTo(x + (width / 2), (y + height) + pointerHeight);
target.lineTo(x + ((width - pointerWidth) / 2), y + height);
}
target.lineTo(x + _local14[3], y + height);
target.curveTo(x, y + height, x, (y + height) - _local14[3]);
if (pointerOrientation == LEFT) {
target.lineTo(x, y + ((height + pointerWidth) / 2));
target.lineTo(x - pointerHeight, y + (height / 2));
target.lineTo(x, y + ((height - pointerWidth) / 2));
}
target.lineTo(x, y + _local14[0]);
target.curveTo(x, y, x + _local14[0], y);
}
if ((fill != null) && (!leaveFillOpen)) {
target.endFill();
}
}
static function drawPoly(target, points, fill, lineStyle) {
if (fill != null) {
setFill(target, fill);
}
setLineStyle(target, lineStyle);
target.moveTo(points[0].x, points[0].y);
var _local6 = 1;
for ( ; _local6 < points.length ; _local6++) {
target.lineTo(points[_local6].x, points[_local6].y);
}
if (fill != null) {
target.endFill();
}
}
static function drawCircle(target, x, y, diameter, fill, lineStyle, leaveFillOpen) {
if (fill != null) {
setFill(target, fill);
}
setLineStyle(target, lineStyle);
var _local9 = Math.PI / 180;
var _local10 = diameter / 2;
var _local11 = 45 * _local9;
var _local12 = _local10 / Math.cos(_local11 / 2);
var _local13 = 0;
var _local14 = (-_local11) / 2;
target.moveTo(x + _local10, y);
var _local15 = 0;
for ( ; _local15 < 8 ; _local15++) {
_local13 = _local13 + _local11;
_local14 = _local14 + _local11;
var _local16 = _local10 * Math.cos(_local13);
var _local17 = _local10 * Math.sin(_local13);
var _local18 = _local12 * Math.cos(_local14);
var _local19 = _local12 * Math.sin(_local14);
target.curveTo(x + _local18, y + _local19, x + _local16, y + _local17);
}
if ((fill != null) && (!leaveFillOpen)) {
target.endFill();
}
}
static function drawDivider(target, x, y, size, orientation, topColor, bottomColor, linealpha) {
linealpha = (linealpha ? (linealpha) : 100);
target.moveTo(x, y);
setLineStyle(target, {thickness:0, alpha:linealpha, rgb:topColor});
if (orientation == VERTICAL) {
target.lineTo(x, y + size);
setLineStyle(target, {thickness:0, alpha:linealpha, rgb:bottomColor});
target.moveTo(x + 1, y);
target.lineTo(x + 1, y + size);
} else if (orientation == HORIZONTAL) {
target.lineTo(x + size, y);
setLineStyle(target, {thickness:0, alpha:linealpha, rgb:bottomColor});
target.moveTo(x, y + 1);
target.lineTo(x + size, y + 1);
}
}
static function drawArrow(target, x, y, orientation, fill, lineStyle) {
var _local8 = [];
switch (orientation) {
case "left" :
_local8 = [{x:x + 10, y:y}, {x:x, y:y + 6}, {x:x, y:y + 8}, {x:x + 10, y:y + 14}, {x:x + 10, y:y + 11}, {x:x + 4, y:y + 7}, {x:x + 10, y:y + 3}, {x:x + 10, y:y}];
break;
case "right" :
_local8 = [{x:x, y:y}, {x:x + 10, y:y + 6}, {x:x + 10, y:y + 8}, {x:x, y:y + 14}, {x:x, y:y + 11}, {x:x + 6, y:y + 7}, {x:x, y:y + 3}, {x:x, y:y}];
}
drawPoly(target, _local8, fill);
}
static function drawPlus(target, x, y, plusSize, fill) {
var _local7 = [];
_local7 = [{x:x + (plusSize * 1), y:y + (plusSize * 0)}, {x:x + (plusSize * 2), y:y + (plusSize * 0)}, {x:x + (plusSize * 2), y:y + (plusSize * 1)}, {x:x + (plusSize * 3), y:y + (plusSize * 1)}, {x:x + (plusSize * 3), y:y + (plusSize * 2)}, {x:x + (plusSize * 2), y:y + (plusSize * 2)}, {x:x + (plusSize * 2), y:y + (plusSize * 3)}, {x:x + (plusSize * 1), y:y + (plusSize * 3)}, {x:x + (plusSize * 1), y:y + (plusSize * 2)}, {x:x + (plusSize * 0), y:y + (plusSize * 2)}, {x:x + (plusSize * 0), y:y + (plusSize * 1)}, {x:x + (plusSize * 1), y:y + (plusSize * 1)}, {x:x + (plusSize * 1), y:y + (plusSize * 0)}];
drawPoly(target, _local7, fill);
}
static function drawT(target, x, y, tSize, fill) {
var _local7 = [];
_local7 = [{x:x + (tSize * 0), y:y + (tSize * 0)}, {x:x + (tSize * 5), y:y + (tSize * 0)}, {x:x + (tSize * 5), y:y + (tSize * 1)}, {x:x + (tSize * 3), y:y + (tSize * 1)}, {x:x + (tSize * 3), y:y + (tSize * 5)}, {x:x + (tSize * 2), y:y + (tSize * 5)}, {x:x + (tSize * 2), y:y + (tSize * 1)}, {x:x + (tSize * 0), y:y + (tSize * 1)}, {x:x + (tSize * 0), y:y + (tSize * 0)}];
drawPoly(target, _local7, fill);
}
static function drawX(target, x, y, size, thickness, fill, lineStyle) {
var _local9 = thickness * Math.sin(45);
var _local10 = [];
_local10 = [{x:x + _local9, y:y}, {x:x + (size / 2), y:y + ((size - (_local9 * 2)) / 2)}, {x:x + (size - _local9), y:y}, {x:x + size, y:y + _local9}, {x:x + (size - ((size - (_local9 * 2)) / 2)), y:y + (size / 2)}, {x:x + size, y:y + (size - _local9)}, {x:x + (size - _local9), y:y + size}, {x:x + (size / 2), y:y + (size - ((size - (_local9 * 2)) / 2))}, {x:x + _local9, y:y + size}, {x:x, y:y + (size - _local9)}, {x:x + ((size - (_local9 * 2)) / 2), y:y + (size / 2)}, {x:x, y:y + _local9}];
drawPoly(target, _local10, fill, lineStyle);
}
static function drawStar(target, x, y, fill, lineStyle, points, innerRadius, outerRadius) {
var _local10 = points * 2;
if (fill != null) {
setFill(target, fill);
}
setLineStyle(target, lineStyle);
var _local11 = 360 / _local10;
var _local12 = 0;
while (_local12 <= _local10) {
var _local13 = ((_local11 * _local12) / 180) * Math.PI;
var _local14 = ((_local11 * (_local12 + 1)) / 180) * Math.PI;
var _local15 = innerRadius * Math.sin(_local13);
var _local16 = innerRadius * Math.cos(_local13);
var _local17 = outerRadius * Math.sin(_local14);
var _local18 = outerRadius * Math.cos(_local14);
if (_local12 == 0) {
target.moveTo(_local15, _local16);
target.moveTo(_local17, _local18);
} else {
target.lineTo(_local15, _local16);
target.lineTo(_local17, _local18);
}
_local12 = _local12 + 2;
}
if (fill != null) {
target.endFill();
}
if ((x != null) && (y != null)) {
target._x = outerRadius + x;
target._y = outerRadius + y;
}
}
static function setFill(target, fill) {
if (typeof(fill) == "number") {
target.beginFill(Number(fill));
} else if (fill != null) {
target.beginGradientFill(fill.fillType, fill.colors, fill.alphas, fill.ratios, fill.matrix);
}
}
static function setLineStyle(target, lineStyle) {
if (lineStyle != undefined) {
target.lineStyle(lineStyle.thickness, lineStyle.rgb, lineStyle.alpha, lineStyle.pixelHinting, lineStyle.noScale, lineStyle.capsStyle, lineStyle.jointStyle, lineStyle.miterLimit);
}
}
static var VERTICAL = "vertical";
static var HORIZONTAL = "horizontal";
static var TOP = "top";
static var BOTTOM = "bottom";
static var LEFT = "left";
static var RIGHT = "right";
static var TO_RADIANS = Math.PI / 180;
}
Symbol 20551 MovieClip [__Packages.com.google.youtube.players.HTTPVideoPlayer] Frame 0
class com.google.youtube.players.HTTPVideoPlayer extends com.google.youtube.AbstractElement
{
var netConnection, stream, videoDisplay, soundControlContext, soundControl, progressInterval, broadcast, duration, videoWidth, videoHeight, attachMovie, getNextHighestDepth, createEmptyMovieClip;
function HTTPVideoPlayer () {
super();
build();
}
function resetStream() {
netConnection = undefined;
netConnection = new NetConnection();
netConnection.connect(null);
stream = new NetStream(netConnection);
stream.setBufferTime(DEFAULT_VIDEO_BUFFER_TIME);
stream.onStatus = com.google.chianti.event.EventDelegate.create(this, onStatus);
stream.onMetaData = com.google.chianti.event.EventDelegate.create(this, onMetaData);
videoDisplay.video.attachVideo(stream);
soundControlContext.attachAudio(stream);
}
function play(path) {
resetStream();
stream.play(path);
videoDisplay._visible = true;
}
function pause(doPause) {
stream.pause(doPause);
}
function seek(newTime) {
stream.seek(newTime);
}
function setVolume(volume) {
if (volume != undefined) {
soundControl.setVolume(volume);
}
}
function getVolume() {
return(soundControl.getVolume());
}
function clear() {
soundControl.setVolume(0);
stream.close();
videoDisplay.video.clear();
videoDisplay._visible = false;
clearProgressInterval();
}
function startProgressInterval() {
clearProgressInterval();
progressInterval = _global.setInterval(this, "onProgress", PROGRESS_INTERVAL);
}
function clearProgressInterval() {
_global.clearInterval(progressInterval);
progressInterval = undefined;
}
function onProgress() {
broadcast({type:com.google.youtube.event.VideoPlayerEvent.PROGRESS, data:{time:stream.time}, target:this});
}
function onStatus(evt) {
switch (evt.code) {
case "NetStream.Play.Start" :
broadcast({type:com.google.youtube.event.VideoPlayerEvent.PLAY, target:this});
startProgressInterval();
break;
case "NetStream.Buffer.Full" :
break;
case "NetStream.Buffer.Empty" :
var _local3 = 1 / (stream.time / stream.bufferTime);
var _local4 = (duration - stream.time) * _local3;
var _local5 = Math.min(MAX_VIDEO_BUFFER_TIME, Math.ceil(_local4));
stream.setBufferTime(_local5);
break;
case "NetStream.Play.Stop" :
case "NetStream.Play.StreamNotFound" :
case "NetStream.Play.FileStructureInvalid" :
broadcast({type:com.google.youtube.event.VideoPlayerEvent.END, target:this});
clearProgressInterval();
}
}
function onMetaData(evt) {
videoWidth = evt.width;
videoHeight = evt.height;
broadcast({type:com.google.youtube.event.VideoPlayerEvent.META_LOAD, data:evt, target:this});
}
function getTime() {
return(stream.time);
}
function getVideoSizeRect() {
if ((!videoWidth) || (!videoHeight)) {
videoWidth = videoDisplay.video.width;
videoHeight = videoDisplay.video.height;
if ((!videoWidth) || (!videoHeight)) {
videoWidth = DEFAULT_VIDEO_WIDTH;
videoHeight = DEFAULT_VIDEO_HEIGHT;
}
}
var _local2 = new com.google.geom.Rect(0, 0, videoWidth, videoHeight);
return(_local2);
}
function setViewportSize(newX, newY, newWidth, newHeight) {
videoDisplay._x = newX;
videoDisplay._y = newY;
videoDisplay._width = newWidth;
videoDisplay._height = newHeight;
var _local6 = getVideoSizeRect();
if ((newWidth == videoWidth) && (newHeight == videoHeight)) {
videoDisplay.video.smoothing = false;
} else {
videoDisplay.video.smoothing = true;
}
}
function build() {
videoDisplay = attachMovie("VideoDisplay", "videoDisplay", getNextHighestDepth());
soundControlContext = createEmptyMovieClip("soundControlContext", getNextHighestDepth());
soundControl = new Sound(soundControlContext);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.HTTPVideoPlayer";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.HTTPVideoPlayer);
static var DEFAULT_VIDEO_BUFFER_TIME = 2;
static var DEFAULT_VIDEO_WIDTH = 480;
static var DEFAULT_VIDEO_HEIGHT = 360;
static var MAX_VIDEO_BUFFER_TIME = 5;
static var PROGRESS_INTERVAL = 150;
}
Symbol 20552 MovieClip [__Packages.com.google.youtube.util.IMessages] Frame 0
class com.google.youtube.util.IMessages implements com.google.youtube.IBroadcaster
{
function IMessages () {
}
}
Symbol 20553 MovieClip [__Packages.com.google.youtube.util.PlayerCapabilities] Frame 0
class com.google.youtube.util.PlayerCapabilities
{
function PlayerCapabilities () {
}
static function getPlayerVersion() {
var _local2 = System.capabilities.version.split(" ")[1].split(",");
return(new com.google.youtube.util.PlayerVersion(_local2[0], _local2[1], _local2[2], _local2[3]));
}
static function hasFullScreen(opt_wmodeTransparent) {
if (opt_wmodeTransparent) {
var _local3 = new com.google.youtube.util.PlayerVersion(9, 0, 45);
} else {
var _local3 = new com.google.youtube.util.PlayerVersion(9, 0, 28);
}
return(getPlayerVersion().isAtLeastVersion(_local3));
}
}
Symbol 20554 MovieClip [__Packages.com.google.youtube.players.modules.ModuleConfigData] Frame 0
class com.google.youtube.players.modules.ModuleConfigData
{
var playerConfigData, currentVideoData;
function ModuleConfigData (playerConfigData, iVideoPlayer, videoData) {
this.playerConfigData = playerConfigData;
currentVideoData = videoData;
}
}
Symbol 20555 MovieClip [__Packages.com.google.utils.UrlValidator] Frame 0
class com.google.utils.UrlValidator
{
var protocols, domains, paths;
function UrlValidator (protocolWhiteList, domainWhiteList, pathWhiteList) {
protocols = (protocolWhiteList ? (protocolWhiteList) : ([]));
domains = (domainWhiteList ? (domainWhiteList) : ([]));
paths = (pathWhiteList ? (pathWhiteList) : ([]));
}
function validateUrl(urlStr) {
var _local3 = new com.google.utils.Url(urlStr);
if ((protocols.length > 0) && (!checkProtocol(_local3))) {
return(false);
}
if ((domains.length > 0) && (!checkDomain(_local3))) {
return(false);
}
if ((paths.length > 0) && (!checkPath(_local3))) {
return(false);
}
return(true);
}
function checkProtocol(url) {
var _local3 = url.getProtocol();
var _local4 = 0;
for ( ; _local4 < protocols.length ; _local4++) {
if (_local3 == protocols[_local4]) {
return(true);
}
}
return(false);
}
function checkDomain(url) {
var _local3 = url.getDomain();
var _local4 = 0;
for ( ; _local4 < domains.length ; _local4++) {
if (_local3 == domains[_local4]) {
return(true);
}
}
return(false);
}
function checkPath(url) {
var _local3 = url.getFile();
var _local4 = 0;
for ( ; _local4 < paths.length ; _local4++) {
if (_local3.indexOf(paths[_local4]) == 0) {
return(!com.google.utils.SecurityUtils.hasUrlDirectoryTraversal(_local3));
}
}
return(false);
}
}
Symbol 20556 MovieClip [__Packages.com.google.youtube.logging.YouTubeStatsLogger] Frame 0
class com.google.youtube.logging.YouTubeStatsLogger
{
static var instanceMap;
var configData, restCheckVideo, currentVideoData, googleTracker, flashVars, trackPoint, restSendTrack;
function YouTubeStatsLogger () {
}
static function getPlayerInstance(mc) {
if (!instanceMap) {
instanceMap = {};
}
var _local3 = String(mc);
if (!instanceMap[_local3]) {
instanceMap[_local3] = new com.google.youtube.logging.YouTubeStatsLogger();
}
return(instanceMap[_local3]);
}
static function destroyPlayerInstance(mc) {
var _local3 = String(mc);
instanceMap[_local3] = null;
}
function init(configDataObj) {
configData = configDataObj;
}
function setTrackingEnabled(isTrackingEnabled) {
trackingEnabled = isTrackingEnabled;
}
function trackIfEnabled() {
if (restCheckVideo) {
restCheckVideo.unregisterAll();
delete restCheckVideo;
}
restCheckVideo = new com.google.youtube.data.RestRequest(configData.BASE_YT_URL + configData.REST_API_URL);
restCheckVideo.addParameter("method", REST_TRACK_EMBED_VIDEO);
restCheckVideo.addParameter("video_id", currentVideoData.id);
restCheckVideo.registerEvent(com.google.youtube.event.DataEvent.LOAD, com.google.chianti.event.EventDelegate.create(this, onStatsRequestLoad));
restCheckVideo.send();
}
function onStatsRequestLoad(evt) {
if (evt.data.track_embed._value == "1") {
trackingEnabled = true;
} else {
trackingEnabled = false;
}
}
function initGoogleTracker(evt) {
if (googleTracker != null) {
googleTracker.endPlayback();
delete googleTracker;
}
currentVideoData = evt.data;
var _local3 = {};
_local3.plid = configData.videoStatsPlayerId;
_local3.el = configData.eventLabel;
_local3.ps = configData.playerLayoutStyle;
_local3.sourceid = configData.sourceId;
if (configData.sdetail != undefined) {
_local3.sdetail = _global.escape(configData.sdetail);
}
if (configData.query != undefined) {
_local3.q = _global.escape(configData.query);
}
_local3.vid = configData.sessionToken;
_local3.e = configData.experiment;
if (configData.eurl != undefined) {
_local3.eurl = _global.escape(configData.eurl);
}
_local3.adtype = configData.adType;
googleTracker = new com.google.utils.VideoStats("http://video-stats.video.google.com/s", "yt", _local3);
}
function onVideoCued(evt) {
if (!googleTrackerCueSent) {
initGoogleTracker(evt);
googleTracker.registerImpression(currentVideoData.id, configData.getVideoFormat(), flashVars.sw);
googleTrackerCueSent = true;
}
}
function onLoadNewVideo(onLoadEvent, timeFunction, durationFunction, bytesDownloadedFunction, getBufferEmptyEventsFunction, getLoggingOptionsFunction) {
if (restCheckVideo) {
restCheckVideo.unregisterAll();
delete restCheckVideo;
}
trackPoint = 0;
trackingEnabled = onLoadEvent.isTracked;
initGoogleTracker(onLoadEvent);
googleTracker.getMediaTime = timeFunction;
googleTracker.getMediaDuration = durationFunction;
googleTracker.getBytesDownloaded = bytesDownloadedFunction;
googleTracker.getBufferEmptyEvents = getBufferEmptyEventsFunction;
googleTracker.getPlayerState = getLoggingOptionsFunction;
googleTracker.startPlayback(currentVideoData.id, configData.getVideoFormat(), configData.samplingWeight);
}
function onProgress(currentTime, duration, percentPlayed) {
if (percentPlayed) {
if (trackingEnabled && (trackPoint < 1)) {
sendTrack(currentTime, percentPlayed);
trackPoint = 1;
} else if (trackingEnabled && ((trackPoint < 2) && (currentTime >= 20))) {
sendTrack(currentTime, percentPlayed);
trackPoint = 2;
} else if (trackingEnabled && ((trackPoint < 3) && (currentTime >= 30))) {
sendTrack(currentTime, percentPlayed);
trackPoint = 3;
} else if (trackingEnabled && ((trackPoint < 4) && (percentPlayed >= 90))) {
sendTrack(currentTime, percentPlayed);
trackPoint = 4;
}
}
}
function onEndPlayback() {
googleTracker.sendReport(false);
}
function sendTrack(time, percent) {
if (restSendTrack) {
restSendTrack.unregisterAll();
delete restSendTrack;
}
restSendTrack = new com.google.youtube.data.RestRequest(configData.BASE_YT_URL + configData.TRACKER_URL);
restSendTrack.addParameter("w", configData.playerType);
var _local4 = ((configData.playerType == IMPRESSION_TYPE_WATCH) ? (configData.trackingToken) : (currentVideoData.id));
restSendTrack.addParameter("i", _local4);
restSendTrack.addParameter("tp", Math.floor(time));
restSendTrack.addParameter("p", Math.floor(percent));
if (configData.playerType == IMPRESSION_TYPE_ACDC) {
restSendTrack.addParameter("eurl", _global.escape(configData.eurl));
}
if (currentVideoData.t) {
restSendTrack.addParameter("t", currentVideoData.t);
}
restSendTrack.send();
googleTracker.sendWatchPoint();
}
static var REST_TRACK_EMBED_VIDEO = "youtube.videos.track_embed_video";
static var EVENT_LABEL_EMBEDDED = "embedded";
static var EVENT_LABEL_DETAIL_PAGE = "detailpage";
static var EVENT_LABEL_ADUNIT = "adunit";
static var IMPRESSION_TYPE_WATCH = 1;
static var IMPRESSION_TYPE_AD_EMBED = 2;
static var IMPRESSION_TYPE_CONTEST_VOTE = 3;
static var IMPRESSION_TYPE_EXTERNAL_EMBED = 4;
static var IMPRESSION_TYPE_INTERNAL_EMBED = 5;
static var IMPRESSION_TYPE_ACDC = 6;
static var PLAYER_STYLE_EMBEDDED = "default";
static var PLAYER_STYLE_CUSTOM_SMALL = "custom-small";
static var PLAYER_STYLE_CUSTOM_BIG = "custom-big";
static var PLAYER_STYLE_VU_MINI = "vu-mini";
static var PLAYER_STYLE_VU_SMALL = "vu-small";
static var PLAYER_STYLE_VU_BIG = "vu-big";
static var PLAYER_STYLE_VU_VIDEOBAR_H = "vu-videobar-h";
static var PLAYER_STYLE_VU_VIDEOBAR_V = "vu-videobar-v";
static var PLAYER_STYLE_VU_WATCH_TEST = "vu-watch-test";
static var PLAYER_STYLE_CHROMELESS = "chromeless";
static var PLAYER_STYLE_YVA = "yva";
static var PLAYER_STYLE_CHROMELESS_INVIDEO = "chromeless-invideo";
static var AD_TYPE_MIDROLL = "midroll";
static var AD_TYPE_POSTROLL = "postroll";
var trackingEnabled = false;
var googleTrackerCueSent = false;
var playerType = 4;
}
Symbol 20557 MovieClip [__Packages.com.google.youtube.players.modules.ad.CBSTracking] Frame 0
class com.google.youtube.players.modules.ad.CBSTracking
{
var videoType, time, trackParam, isDone;
function CBSTracking (trackNode) {
var _local3 = trackNode.attributes;
videoType = _local3.videoType;
time = Math.max(1, _global.parseInt(_local3.time));
trackParam = _local3.track_param;
isDone = false;
}
function toString() {
return(((((((("CBSTracking: {videoType :" + videoType) + ", time : ") + time) + ", isDone : ") + isDone) + ", trackParam : ") + trackParam) + "}");
}
}
Symbol 20558 MovieClip [__Packages.com.google.youtube.players.modules.ad.ui.AdText] Frame 0
class com.google.youtube.players.modules.ad.ui.AdText extends com.google.youtube.players.ui.ShadowText
{
var setText, adText;
function AdText () {
super();
}
function init(targetClip, newLanguage) {
setLanguage(newLanguage);
super.init(targetClip);
setText(adText);
}
function setLanguage(newLanguage) {
if (!newLanguage) {
adText = "Advertisement";
return(undefined);
}
if (!AD_TEXT_TABLE[newLanguage]) {
adText = "Advertisement";
return(undefined);
}
adText = AD_TEXT_TABLE[newLanguage];
}
static var AD_TEXT_TABLE = {de:"Werbung", en:"Advertisement", es:"Anuncio", fr:"Publicit\u00E9", it:"Pubblicit\u00E0", ja:"\u5E83\u544A", ko:"\uAD11\uACE0", nl:"Advertentie", pl:"Reklama", pt_BR:"Publicidade", ru:"\u0420\u0435\u043A\u043B\u0430\u043C\u0430", zh_HK:" \u5EE3\u544A", zh_TW:"\u5EE3\u544A"};
}
Symbol 20559 MovieClip [__Packages.com.google.youtube.players.modules.ad.AdStateMachine] Frame 0
class com.google.youtube.players.modules.ad.AdStateMachine
{
var stateArray, stateCount;
function AdStateMachine (initialState) {
stateArray = new Array();
stateArray[0] = initialState;
stateCount = 1;
}
function enterState(newState) {
if (newState > MAX_STATE_INVALID) {
return(undefined);
}
if (stateArray[stateCount - 1] != newState) {
stateArray[stateCount] = newState;
stateCount++;
}
}
function getCurrentState() {
return(stateArray[stateCount - 1]);
}
function getStateCount() {
return(stateCount);
}
function getTransitions() {
return(stateArray.slice());
}
static var INIT = 0;
static var POLLING_JS_READY_TO_GO = 1;
static var REQUEST_480x70 = 2;
static var RESPONSE_480x70_REGULAR = 3;
static var RESPONSE_480x70_REGULAR_AFV = 4;
static var RESPONSE_480x70_CUSTOM_AFV = 5;
static var RESPONSE_480x70_CUSTOM_MPU = 6;
static var REQUEST_450X60 = 7;
static var RESPONSE_450X60_MIDROLL = 8;
static var RESPONSE_450X60_POSTROLL = 9;
static var REQUEST_AFV = 10;
static var RESPONSE_AFV_SUCCESS = 11;
static var RESPONSE_AFV_ERROR = 12;
static var OVERLAY_MOVIE = 13;
static var OVERLAY_INTERACTIVE = 14;
static var OVERLAY_UNDEFINED = 15;
static var MAX_STATE_INVALID = 16;
}
Symbol 20560 MovieClip [__Packages.com.google.geom.Rect] Frame 0
class com.google.geom.Rect extends flash.geom.Rectangle
{
var x, y, width, height;
function Rect (x, y, width, height) {
super();
this.x = x;
this.y = y;
this.width = width;
this.height = height;
}
}
Symbol 20561 MovieClip [__Packages.com.google.youtube.util.FrameWaiter] Frame 0
class com.google.youtube.util.FrameWaiter
{
static var waitHandlerCounter;
var frameWaiter;
function FrameWaiter (mc, frames, handler) {
if (waitHandlerCounter == undefined) {
waitHandlerCounter = 0;
} else {
waitHandlerCounter++;
}
var framesWaited = 0;
frameWaiter = mc.createEmptyMovieClip("waitHandler" + waitHandlerCounter, mc.getNextHighestDepth());
frameWaiter.onEnterFrame = function () {
framesWaited++;
if (framesWaited >= frames) {
handler();
delete this.onEnterFrame;
this.removeMovieClip();
}
};
}
}
Symbol 20562 MovieClip [__Packages.com.google.utils.ImageLoader] Frame 0
class com.google.utils.ImageLoader
{
var movieClipLoader, playerMajorVersion;
function ImageLoader () {
movieClipLoader = new MovieClipLoader();
addListener(this);
playerMajorVersion = _global.parseInt(System.capabilities.version.split(" ", 2)[1].split(",")[0]);
}
function addListener(target) {
movieClipLoader.addListener(target);
}
function removeListener(target) {
movieClipLoader.removeListener(target);
}
function onLoadInit(mc) {
removeListener(this);
if (playerMajorVersion < 9) {
return(undefined);
}
var _local3 = new flash.display.BitmapData(mc._width, mc._height, true, 0);
_local3.draw(mc);
var _local4 = mc.createEmptyMovieClip("img", mc.getNextHighestDepth());
_local4.attachBitmap(_local3, _local4.getNextHighestDepth(), "auto", true);
}
function loadImage(targetUrl, targetMovieClip) {
if ((playerMajorVersion > 8) && (targetUrl.indexOf("http") == 0)) {
var _local4 = targetUrl.split("/")[2];
System.security.loadPolicyFile(("http://" + _local4) + "/crossdomain.xml");
movieClipLoader.checkPolicyFile = true;
}
movieClipLoader.loadClip(targetUrl, targetMovieClip);
}
}
Symbol 20563 MovieClip [__Packages.com.google.youtube.util.LineStyle] Frame 0
class com.google.youtube.util.LineStyle
{
var alpha, thickness, rgb;
function LineStyle (newAlpha, newThickness, newRgb) {
alpha = newAlpha;
thickness = newThickness;
rgb = newRgb;
}
}
Symbol 20564 MovieClip [__Packages.com.google.youtube.event.DataEvent] Frame 0
class com.google.youtube.event.DataEvent
{
function DataEvent () {
}
static var ERROR = "onError";
static var LOAD = "onLoad";
static var SET = "onSet";
}
Symbol 20565 MovieClip [__Packages.com.google.youtube.event.VolumeControlEvent] Frame 0
class com.google.youtube.event.VolumeControlEvent
{
function VolumeControlEvent () {
}
static var CHANGE = "onChange";
static var MUTE = "onMute";
static var UNMUTE = "onUnMute";
}
Symbol 20566 MovieClip [__Packages.com.google.youtube.util.PlayerVersion] Frame 0
class com.google.youtube.util.PlayerVersion
{
var major, minor, revision, build;
function PlayerVersion (majorVer, minorVer, revisionVer, buildVer) {
major = _global.parseInt(majorVer, 10) || 0;
minor = _global.parseInt(minorVer, 10) || 0;
revision = _global.parseInt(revisionVer, 10) || 0;
build = _global.parseInt(buildVer, 10) || 0;
}
function isAtLeastVersion(version) {
if (major > version.major) {
return(true);
}
if (major < version.major) {
return(false);
}
if (minor > version.minor) {
return(true);
}
if (minor < version.minor) {
return(false);
}
if (revision > version.revision) {
return(true);
}
if (revision < version.revision) {
return(false);
}
if (build >= version.build) {
return(true);
}
return(false);
}
}