Frame 1
com.google.youtube.players.yva.Main.main(this);
Symbol 13 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.IBroadcaster] Frame 0
class com.google.youtube.IBroadcaster
{
function IBroadcaster () {
}
}
Symbol 20483 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 20484 MovieClip [__Packages.com.google.youtube.ui.IVideoControl] Frame 0
class com.google.youtube.ui.IVideoControl implements com.google.youtube.IBroadcaster
{
function IVideoControl () {
}
}
Symbol 20485 MovieClip [__Packages.com.google.youtube.players.ui.SeekBar] Frame 0
class com.google.youtube.players.ui.SeekBar extends com.google.youtube.AbstractElement implements com.google.youtube.ui.IVideoControl
{
var color1, color2, bgwidth, bgheight, lastStartPos, lastLoadedBarWidth, lastBarWidth, lastProgressStartPos, lastProgressBarWidth, lastPlayedBarWidth, handle, _x, _y, duration, loadedBar, playedBar, _xmouse, bg, innerHandleInactive, broadcast, markers, cuePointsBar, disabledOverlay, _height, attachMovie, getNextHighestDepth, createEmptyMovieClip, innerHandleActive;
function SeekBar () {
super();
}
function init(c1, c2, showKeyFrames) {
color1 = c1;
color2 = c2;
bgwidth = -1;
bgheight = -1;
lastStartPos = -1;
lastLoadedBarWidth = -1;
lastBarWidth = -1;
lastProgressStartPos = -1;
lastProgressBarWidth = -1;
lastPlayedBarWidth = -1;
showKeyframes = showKeyFrames;
build();
}
function isResizable() {
return(true);
}
function hasDivider() {
return(false);
}
function getWidth() {
return(getBarWidth() + (PADDING_SIDE * 2));
}
function getMinRequiredControlsWidth() {
return(150);
}
function convertHandleX(newX) {
return(newX + PADDING_SIDE);
}
function getHandleX() {
return(handle.newX - PADDING_SIDE);
}
function setPosition(newX, newY) {
_x = newX;
_y = newY;
}
function getSecondsFromHandlePosition() {
return((getHandleX() / getBarWidth()) * duration);
}
function drawLoadedBar(startPos, loadedBarWidth, barWidth) {
if ((loadedBarWidth != lastLoadedBarWidth) || ((startPos != lastStartPos) || (barWidth != lastBarWidth))) {
lastStartPos = startPos;
lastLoadedBarWidth = loadedBarWidth;
lastBarWidth = barWidth;
var _local5 = {colors:[12945801, 13342871], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0, y:0, w:barWidth, h:DEFAULT_BAR_HEIGHT, r:(90 / 180) * Math.PI}};
loadedBar.clear();
com.google.youtube.util.Drawing.drawRect(loadedBar, startPos, 0, loadedBarWidth, DEFAULT_BAR_HEIGHT, _local5);
}
}
function setPercentLoaded(percent, startPercent) {
if (percent && (duration > 0)) {
currentPercentLoaded = percent;
var _local4 = getBarWidth();
startPosition = Math.ceil((startPercent / 100) * _local4) || 0;
var _local5 = Math.ceil((percent / 100) * _local4);
var _local6 = Math.min(_local5 - startPosition, _local4);
drawLoadedBar(startPosition, _local6, _local4);
}
}
function drawProgress(progressStartPos, progressBarWidth, playedBarWidth) {
if ((Math.abs(progressStartPos - lastProgressStartPos) > 1) || ((progressBarWidth != lastProgressBarWidth) || (playedBarWidth != lastPlayedBarWidth))) {
lastProgressStartPos = progressStartPos;
lastProgressBarWidth = progressBarWidth;
lastPlayedBarWidth = playedBarWidth;
playedBar.clear();
var _local5 = {colors:[16724787, 13113111], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0, y:0, w:playedBarWidth, h:DEFAULT_BAR_HEIGHT, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(playedBar, progressStartPos, 0, progressBarWidth, DEFAULT_BAR_HEIGHT, _local5);
}
}
function updateProgress(startPercent) {
var _local3 = getBarWidth();
if ((!_global.isNaN(startPercent)) && (startPercent != null)) {
var _local4 = startPercent;
startPosition = Math.ceil((_local4 / 100) * _local3);
}
var _local5 = Math.max(startPosition + 1, getHandleX());
var _local6 = _local5 - startPosition;
if ((_local6 + startPosition) > _local3) {
_local6 = _local3 - startPosition;
}
drawProgress(startPosition, _local6, _local3);
}
function updateHandlePosition(percent, startPercent, doSmoothTransition) {
currentPercent = percent;
currentStartPercent = startPercent;
var _local5 = 0;
_local5 = Math.round((percent / 100) * getBarWidth());
_local5 = Math.min(_local5, getBarWidth());
if ((!dragging) && (percent != undefined)) {
handle.newX = convertHandleX(_local5);
if (doSmoothTransition) {
handle._x = convertHandleX(_local5);
}
updateProgress(startPercent);
}
}
function startHandleDrag() {
dragging = true;
handle._x = _xmouse;
handle.startDrag(false, bg._x, handle._y, getBarWidth() + bg._x, handle._y);
com.gs.TweenLite.to(innerHandleInactive, 0.15, {_alpha:0});
handle.onMouseMove = com.google.chianti.event.EventDelegate.create(this, onHandleMouseMove);
broadcast({type:com.google.youtube.event.GenericButtonEvent.PRESS, target:this});
if (showKeyframes) {
showCuePoints();
}
}
function stopHandleDrag() {
if (dragging) {
dragging = false;
handle.newX = handle._x;
handle.stopDrag();
handle.onMouseMove = null;
com.gs.TweenLite.to(innerHandleInactive, 0.12, {_alpha:100});
var _local2 = getSecondsFromHandlePosition();
if (getHandleX() <= 1) {
_local2 = 0;
reset(true);
}
broadcast({type:com.google.youtube.event.GenericButtonEvent.RELEASE, data:_local2, target:this});
hideCuePoints();
}
}
function onHandleMouseMove() {
var _local2 = getSecondsFromHandlePosition();
handle.newX = handle._x;
if (getHandleX() < 1) {
_local2 = 0;
}
broadcast({type:com.google.youtube.event.UIEvent.SEEK, data:_local2, target:this});
}
function onHandleEnterFrame() {
if (!dragging) {
handle._x = handle._x + ((handle.newX - handle._x) * HANDLE_SPEED);
updateProgress();
}
}
function onBarPress() {
startHandleDrag();
}
function onBarRelease() {
var _local2 = _xmouse;
var _local3 = ((_local2 - PADDING_SIDE) / getBarWidth()) * duration;
if (_local2 <= convertHandleX(1)) {
_local3 = 0;
}
broadcast({type:com.google.youtube.event.GenericButtonEvent.RELEASE, data:_local3, target:this});
}
function getBarWidth() {
return(bg._width - 2);
}
function setBarWidth(newWidth) {
drawBg(newWidth, DEFAULT_BAR_HEIGHT);
markers.resize(newWidth);
updateHandlePosition(currentPercent, currentStartPercent, true);
setPercentLoaded(currentPercentLoaded, currentStartPercent);
}
function setWidth(newWidth) {
setBarWidth(newWidth - (PADDING_SIDE * 2));
}
function setDuration(newDuration) {
if (newDuration > 0) {
duration = newDuration;
}
}
function getDuration() {
return(duration);
}
function onMetaLoaded(evt) {
duration = evt.duration;
if (evt.keyframes.times && (showKeyframes)) {
setCuePoints(evt.keyframes.times);
}
markers.redraw();
}
function setCuePoints(times) {
cuePointsBar.clear();
var _local3 = times.length;
var _local4 = 0;
for ( ; _local4 < _local3 ; _local4++) {
drawCuepointAtTime(times[_local4]);
}
}
function drawCuepointAtTime(seconds) {
var _local3 = Math.round((seconds / duration) * getBarWidth());
com.google.youtube.util.Drawing.drawRect(cuePointsBar, _local3, 2, 1, 5, 3355443);
}
function reset(softReset) {
if (!softReset) {
cuePointsBar.clear();
markers.clear();
loadedBar.clear();
currentPercent = 0;
currentStartPercent = 0;
duration = 0;
}
handle._x = (handle.newX = convertHandleX(0));
updateProgress();
}
function showCuePoints() {
com.gs.TweenLite.to(cuePointsBar, 0.2, {_alpha:CUE_POINTS_ALPHA});
}
function hideCuePoints() {
com.gs.TweenLite.to(cuePointsBar, 0.2, {_alpha:0});
}
function drawBg(width, height) {
if ((width != bgwidth) || (height != bgheight)) {
bgwidth = width;
bgheight = height;
bg.clear();
var _local4 = {colors:[11447982, 13553358], fillType:"linear", alphas:[100, 100], ratios:[0, 150], matrix:{matrixType:"box", x:0, y:0, w:width, h:height, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(bg, -1, -1, width + 2, height + 1, color1);
com.google.youtube.util.Drawing.drawRect(bg, 0, 0, width, height, _local4);
com.google.youtube.util.Drawing.drawRect(bg, 0, height, width, 1, 15658734);
_local4.alphas = [com.google.youtube.ui.BaseButton.DISABLED_ALPHA, com.google.youtube.ui.BaseButton.DISABLED_ALPHA];
disabledOverlay.clear();
com.google.youtube.util.Drawing.drawRect(disabledOverlay, 0, 0, (width + PADDING_SIDE) + 2, _height, _local4);
}
}
function drawTimeSpan(newStartTime, newEndTime) {
var _local4 = new com.google.youtube.players.ui.SeekBarMarker(newStartTime, newEndTime, null);
markers.addVariableWidthMarker(_local4);
showMarkers();
}
function clearMarkers() {
markers.clear();
}
function drawFixedWidthMarker(newStartTime, newMarkerWidth) {
var _local4 = new com.google.youtube.players.ui.SeekBarMarker(newStartTime, null, newMarkerWidth);
markers.addFixedWidthMarker(_local4);
showMarkers();
}
function hideMarkers() {
markers._visible = false;
}
function showMarkers() {
markers._visible = true;
}
function build() {
markers = com.google.youtube.players.ui.SeekBarMarkerManager(attachMovie(com.google.youtube.players.ui.SeekBarMarkerManager.LINK_NAME, "markers", getNextHighestDepth()));
markers.init(this);
markers._x = PADDING_SIDE;
hideMarkers();
bg = createEmptyMovieClip("bg", getNextHighestDepth());
bg._alpha = 80;
disabledOverlay = createEmptyMovieClip("disabledOverlay", getNextHighestDepth());
drawBg(DEFAULT_BAR_WIDTH, DEFAULT_BAR_HEIGHT);
bg.onRelease = com.google.chianti.event.EventDelegate.create(this, onBarRelease);
bg.onPress = com.google.chianti.event.EventDelegate.create(this, onBarPress);
bg.useHandCursor = false;
loadedBar = createEmptyMovieClip("loadedBar", getNextHighestDepth());
playedBar = createEmptyMovieClip("playedBar", getNextHighestDepth());
if (showKeyframes) {
cuePointsBar = createEmptyMovieClip("cuePointsBar", getNextHighestDepth());
cuePointsBar._x = 1;
cuePointsBar._alpha = 0;
}
loadedBar._x = (playedBar._x = (cuePointsBar._x = (bg._x = PADDING_SIDE)));
loadedBar._y = (playedBar._y = (cuePointsBar._y = (bg._y = PADDING_TOP)));
handle = createEmptyMovieClip("handle", getNextHighestDepth());
var _local2 = handle.createEmptyMovieClip("outerHandle", 1);
innerHandleActive = handle.createEmptyMovieClip("innerHandleActive", 2);
innerHandleInactive = handle.createEmptyMovieClip("innerHandleInactive", 3);
var _local3 = handle.createEmptyMovieClip("mask", 4);
var _local4 = {colors:[16777215, 6710886], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:(-HANDLE_DIAMETER) / 4, y:(-HANDLE_DIAMETER) / 4, w:HANDLE_DIAMETER / 2, h:HANDLE_DIAMETER / 2, r:(90 / 180) * Math.PI}};
var _local5 = {colors:[6710886, 13553358], fillType:"linear", alphas:[100, 100], ratios:[100, 255], matrix:{matrixType:"box", x:-5.5, y:-5.5, w:9.5, h:9.5, r:(90 / 180) * Math.PI}};
var _local6 = {colors:[8421504, 4342338], fillType:"linear", alphas:[100, 100], ratios:[20, 190], matrix:{matrixType:"box", x:-3, y:-3, w:3, h:3, r:(60 / 180) * Math.PI}};
var _local7 = {colors:[16330800, 11677230], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:-3, y:-3, w:3, h:3, r:(60 / 180) * Math.PI}};
var _local8 = {alpha:90, rgb:5066061, thickness:0};
var _local9 = {alpha:0};
com.google.youtube.util.Drawing.drawCircle(_local2, 0, 0, HANDLE_DIAMETER, _local4, _local8);
com.google.youtube.util.Drawing.drawCircle(_local2, 0, 0, 12, _local5, _local9);
com.google.youtube.util.Drawing.drawCircle(innerHandleActive, 0, 0, 6.5, _local7);
com.google.youtube.util.Drawing.drawCircle(innerHandleInactive, 0, 0, 6.5, _local6);
com.google.youtube.util.Drawing.drawCircle(_local3, 0, 0, 18, _local4);
_local3._alpha = 0;
handle._y = 11;
handle._x = (handle.newX = convertHandleX(0));
handle.onPress = com.google.chianti.event.EventDelegate.create(this, startHandleDrag);
handle.onRelease = (handle.onReleaseOutside = (handle.onMouseUp = com.google.chianti.event.EventDelegate.create(this, stopHandleDrag)));
handle.onEnterFrame = com.google.chianti.event.EventDelegate.create(this, onHandleEnterFrame);
disabledOverlay.swapDepths(getNextHighestDepth());
disabledOverlay._visible = false;
disabledOverlay.onRelease = function () {
};
disabledOverlay.onRollOver = function () {
};
reset();
}
function disable() {
disabledOverlay._visible = true;
}
function enable() {
disabledOverlay._visible = false;
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.SeekBar";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.SeekBar);
static var DEFAULT_BAR_HEIGHT = 7;
static var DEFAULT_BAR_WIDTH = 200;
static var CUE_POINTS_ALPHA = 70;
static var HANDLE_SPEED = 0.5;
static var HANDLE_DIAMETER = 15;
static var PADDING_SIDE = 12;
static var PADDING_TOP = 8;
var dragging = false;
var startPosition = 0;
var showKeyframes = false;
var currentPercent = 0;
var currentStartPercent = 0;
var currentPercentLoaded = 0;
}
Symbol 20486 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 20487 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 20488 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, 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, 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 (source.iurl && (com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(source.iurl))) {
imageUrl = source.iurl;
delete source.iurl;
}
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 (_local4 && ((_local4 == "1") || (com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(_local4)))) {
ivModule = _local4;
}
_local4 = source.ad_module;
delete source.ad_module;
if (_local4 && ((_local4 == "1") || (com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(_local4)))) {
adModule = _local4;
}
_local4 = source.subtitle_module;
delete source.subtitle_module;
if (_local4 && ((_local4 == "1") || (com.google.webutil.url.YouTubeUtils.isValidYouTubeUrl(_local4)))) {
ccModule = _local4;
}
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 20489 MovieClip [__Packages.com.google.youtube.players.yva.YvaInfo] Frame 0
class com.google.youtube.players.yva.YvaInfo extends com.google.youtube.AbstractElement
{
var _visible, isRateable, starsTextFormat, ratingTextFormat, titleTextFormat, authorLabelFormat, authorTextFormat, commentLabelFormat, commentTextFormat, starDescriptions, configData, isLoggedIn, messages, yvaVideoId, isVideoDetailsLoaded, overallHolder, yvaVideoAuthorLabel, yvaVideoCommentLabel, yvaVideoRatingLabel, initialStarDescription, yvaVideoRating, broadcast, currentStars, yvaVideoTitle, yvaVideoAuthor, yvaVideoComment, restRequest, getURL, ratingText_txt, isStarRatingHeightDoubled, starsText_txt, createEmptyMovieClip, getNextHighestDepth, titleText_txt, titleTextButton, authorLabel_txt, authorText_txt, authorTextButton, commentLabel_txt, commentText_txt, commentTextButton, starRating;
function YvaInfo () {
super();
_visible = false;
isRateable = true;
starsTextFormat = new TextFormat();
starsTextFormat.bold = true;
starsTextFormat.underline = false;
starsTextFormat.color = 0;
starsTextFormat.size = 11;
starsTextFormat.align = "center";
starsTextFormat.font = "_sans";
ratingTextFormat = new TextFormat();
ratingTextFormat.bold = false;
ratingTextFormat.underline = false;
ratingTextFormat.color = 0;
ratingTextFormat.size = 11;
ratingTextFormat.align = "center";
ratingTextFormat.font = "_sans";
titleTextFormat = new TextFormat();
titleTextFormat.bold = true;
titleTextFormat.underline = true;
titleTextFormat.color = 13260;
titleTextFormat.size = 11;
titleTextFormat.font = "_sans";
authorLabelFormat = new TextFormat();
authorLabelFormat.bold = true;
authorLabelFormat.underline = false;
authorLabelFormat.color = 0;
authorLabelFormat.size = 10;
authorLabelFormat.font = "_sans";
authorTextFormat = new TextFormat();
authorTextFormat.bold = false;
authorTextFormat.italic = true;
authorTextFormat.underline = true;
authorTextFormat.color = 13260;
authorTextFormat.size = 10;
authorTextFormat.font = "_sans";
commentLabelFormat = new TextFormat();
commentLabelFormat.bold = true;
commentLabelFormat.underline = false;
commentLabelFormat.color = 0;
commentLabelFormat.size = 10;
commentLabelFormat.font = "_sans";
commentTextFormat = new TextFormat();
commentTextFormat.bold = false;
commentTextFormat.underline = true;
commentTextFormat.color = 13260;
commentTextFormat.size = 10;
commentTextFormat.font = "_sans";
starDescriptions = [com.google.youtube.util.YvaMessages.POOR, com.google.youtube.util.YvaMessages.NOTHING_SPECIAL, com.google.youtube.util.YvaMessages.WORTH_WATCHING, com.google.youtube.util.YvaMessages.PRETTY_COOL, com.google.youtube.util.YvaMessages.AWESOME];
}
function init(configDataObj, loggedIn, newVideoId) {
configData = configDataObj;
isLoggedIn = loggedIn;
messages = configData.messages;
messages.registerEvent(com.google.youtube.event.MessagesEvent.UPDATE, com.google.chianti.event.EventDelegate.create(this, onMessagesUpdated));
yvaVideoId = newVideoId;
populateVideoData(yvaVideoId);
}
function onMessagesUpdated() {
if (!isVideoDetailsLoaded) {
return(undefined);
}
overallHolder.removeMovieClip();
setLabelStrings();
build();
}
function setLabelStrings() {
yvaVideoAuthorLabel = messages.getMsg(com.google.youtube.util.YvaMessages.FROM);
yvaVideoCommentLabel = messages.getMsg(com.google.youtube.util.YvaMessages.COMMENTS);
yvaVideoRatingLabel = messages.getMsg(com.google.youtube.util.YvaMessages.RATING);
if (!isRateable) {
initialStarDescription = com.google.utils.StringUtils.replace(messages.getMsg(com.google.youtube.util.YvaMessages.RATING), "RATING_COUNT_1", yvaVideoRating);
return(undefined);
}
if (isLoggedIn) {
initialStarDescription = messages.getMsg(com.google.youtube.util.YvaMessages.RATE_THIS_VIDEO);
} else {
initialStarDescription = messages.getMsg(com.google.youtube.util.YvaMessages.LOGIN_TO_RATE);
}
}
function onVideoDetailsLoaded(evt) {
isVideoDetailsLoaded = true;
broadcast({type:com.google.youtube.event.DataEvent.LOAD, target:this});
currentStars = _global.parseFloat(evt.data.video.rating_avg);
yvaVideoTitle = evt.data.video.title;
yvaVideoAuthor = evt.data.video.author;
yvaVideoComment = evt.data.video.comment_count;
yvaVideoRating = evt.data.video.rating_count;
if (evt.data.video.allow_ratings == "no") {
isRateable = false;
}
setLabelStrings();
build();
}
function onVideoDetailsError(evt) {
}
function populateVideoData(newVideoId) {
restRequest = new com.google.youtube.data.RestRequest(configData.BASE_YT_URL + "yva_get_video_info?");
restRequest.addParameter("video_id", newVideoId);
restRequest.registerEvent(com.google.youtube.event.DataEvent.LOAD, com.google.chianti.event.EventDelegate.create(this, onVideoDetailsLoaded));
restRequest.registerEvent(com.google.youtube.event.DataEvent.ERROR, com.google.chianti.event.EventDelegate.create(this, onVideoDetailsError));
restRequest.send();
}
function onTitleTextClick(evt) {
if (yvaVideoId) {
broadcast({type:com.google.youtube.event.VideoInfoEvent.TITLE_CLICKED});
var _local3 = (configData.BASE_YT_URL + "watch?v=") + yvaVideoId;
getURL(_local3, "_parent");
}
}
function onAuthorTextClick() {
if (yvaVideoAuthor) {
broadcast({type:com.google.youtube.event.VideoInfoEvent.AUTHOR_CLICKED});
var _local2 = (configData.BASE_YT_URL + "user/") + yvaVideoAuthor;
getURL(_local2, "_parent");
}
}
function onCommentTextClick() {
if (yvaVideoId) {
broadcast({type:com.google.youtube.event.VideoInfoEvent.COMMENTS_CLICKED});
var _local2 = (configData.BASE_YT_URL + "comment_servlet?all_comments&v=") + yvaVideoId;
getURL(_local2, "_parent");
}
}
function onRatingRollout() {
setStarText(initialStarDescription);
}
function onRatingRollover(evt) {
var _local3 = Number(evt.rating) - 1;
setStarText(messages.getMsg(starDescriptions[_local3]));
}
function onRatingRelease(evt) {
var _local3 = String(evt.rating);
var _local4 = ((((configData.BASE_YT_URL + "rating?action_add_rating_pva&t=") + "&video_id=") + yvaVideoId) + "&rating=") + _local3;
var _local5 = new LoadVars();
var _local6 = new LoadVars();
_local6.sendAndLoad(_local4, _local5, "POST");
setStarText(messages.getMsg(com.google.youtube.util.YvaMessages.THANKS_FOR_RATING));
broadcast({type:com.google.youtube.event.VideoInfoEvent.RATING_SET});
ratingText_txt.text = com.google.utils.StringUtils.replace(yvaVideoRatingLabel, "RATING_COUNT_1", String(_global.parseInt(yvaVideoRating) + 1));
}
function setStarText(msg) {
var _local3 = starsTextFormat.getTextExtent(msg).width;
if (isStarRatingHeightDoubled) {
if (_local3 < STARS_TEXT_WIDTH) {
msg = newline + msg;
}
}
starsText_txt.text = msg;
}
function build() {
overallHolder = createEmptyMovieClip("overallHolder", getNextHighestDepth());
titleText_txt = overallHolder.createTextField("titleText_txt", overallHolder.getNextHighestDepth(), X_OFFSET, Y_OFFSET, TITLE_TEXT_WIDTH, TITLE_TEXT_HEIGHT);
titleText_txt.setNewTextFormat(titleTextFormat);
titleText_txt.selectable = false;
titleText_txt.multiline = true;
titleText_txt.wordWrap = true;
var _local2 = Math.ceil(titleTextFormat.getTextExtent(yvaVideoTitle + " ").width / TITLE_TEXT_WIDTH);
if (_local2 > 3) {
_local2 = 3;
}
titleText_txt._height = TITLE_TEXT_HEIGHT * _local2;
titleText_txt.text = com.google.youtube.util.StringUtil.ellipsis(yvaVideoTitle, titleText_txt);
titleTextButton = overallHolder.createEmptyMovieClip("titleTextButton", overallHolder.getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(titleTextButton, 0, 0, titleText_txt._width, titleText_txt._height, 16711680);
titleTextButton._x = titleText_txt._x;
titleTextButton._y = titleText_txt._y;
titleTextButton._alpha = 0;
titleTextButton.onRelease = com.google.chianti.event.EventDelegate.create(this, onTitleTextClick);
var _local3 = (titleTextFormat.getTextExtent(titleText_txt.text).height * _local2) + (titleTextFormat.getTextExtent(titleText_txt.text).height / 2);
var _local4 = authorLabelFormat.getTextExtent(yvaVideoAuthorLabel + " ").width;
authorLabel_txt = overallHolder.createTextField("authorLabel_txt", overallHolder.getNextHighestDepth(), X_OFFSET, Y_OFFSET + _local3, _local4, AUTHOR_LABEL_HEIGHT);
authorLabel_txt.setNewTextFormat(authorLabelFormat);
authorLabel_txt.selectable = false;
authorLabel_txt.text = yvaVideoAuthorLabel;
var _local5 = authorTextFormat.getTextExtent(yvaVideoAuthor + " ").width;
authorText_txt = overallHolder.createTextField("authorText_txt", overallHolder.getNextHighestDepth(), X_OFFSET + _local4, Y_OFFSET + _local3, _local5, AUTHOR_TEXT_HEIGHT);
authorText_txt.setNewTextFormat(authorTextFormat);
authorText_txt.selectable = false;
authorText_txt.text = yvaVideoAuthor;
authorTextButton = overallHolder.createEmptyMovieClip("authorTextButton", overallHolder.getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(authorTextButton, 0, 0, authorText_txt._width, authorText_txt._height, 65280);
authorTextButton._x = authorText_txt._x;
authorTextButton._y = authorText_txt._y;
authorTextButton._alpha = 0;
authorTextButton.onRelease = com.google.chianti.event.EventDelegate.create(this, onAuthorTextClick);
var _local6 = authorTextFormat.getTextExtent(yvaVideoAuthor + " ").height;
var _local7 = commentLabelFormat.getTextExtent(yvaVideoCommentLabel + " ").width;
commentLabel_txt = overallHolder.createTextField("commentLabel_txt", overallHolder.getNextHighestDepth(), X_OFFSET, (Y_OFFSET + _local3) + _local6, _local7, COMMENT_LABEL_HEIGHT);
commentLabel_txt.setNewTextFormat(commentLabelFormat);
commentLabel_txt.selectable = false;
commentLabel_txt.text = yvaVideoCommentLabel;
var _local8 = commentTextFormat.getTextExtent(yvaVideoComment + " ").width;
commentText_txt = overallHolder.createTextField("commentText_txt", overallHolder.getNextHighestDepth(), X_OFFSET + _local7, (Y_OFFSET + _local3) + _local6, _local8, COMMENT_TEXT_HEIGHT);
commentText_txt.setNewTextFormat(commentTextFormat);
commentText_txt.selectable = false;
commentText_txt.text = yvaVideoComment;
commentTextButton = overallHolder.createEmptyMovieClip("commentTextButton", overallHolder.getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(commentTextButton, 0, 0, commentText_txt._width, commentText_txt._height, 255);
commentTextButton._x = commentText_txt._x;
commentTextButton._y = commentText_txt._y;
commentTextButton._alpha = 0;
commentTextButton.onRelease = com.google.chianti.event.EventDelegate.create(this, onCommentTextClick);
var _local9 = [com.google.youtube.util.YvaMessages.LOGIN_TO_RATE, com.google.youtube.util.YvaMessages.RATE_THIS_VIDEO, com.google.youtube.util.YvaMessages.THANKS_FOR_RATING];
_local9.concat(starDescriptions);
var _local10 = com.google.youtube.util.StringUtil.getLongestString(_local9);
var _local11 = starsTextFormat.getTextExtent(_local10).width;
var _local12 = starsTextFormat.getTextExtent(_local10).height;
var _local13 = _local12 * 0.5;
if (_local11 > STARS_TEXT_WIDTH) {
STARS_TEXT_HEIGHT = STARS_TEXT_HEIGHT * 2;
_local12 = _local12 * 2;
isStarRatingHeightDoubled = true;
}
var _local14 = STAGE_WIDTH - STARS_TEXT_WIDTH;
starsText_txt = overallHolder.createTextField("starsText_txt", overallHolder.getNextHighestDepth(), _local14, Y_OFFSET, STARS_TEXT_WIDTH, STARS_TEXT_HEIGHT);
starsText_txt.multiline = true;
starsText_txt.wordWrap = true;
starsText_txt.selectable = false;
starsText_txt.setNewTextFormat(starsTextFormat);
starRating = com.google.youtube.players.ui.StarRatings(overallHolder.attachMovie(com.google.youtube.players.ui.StarRatings.LINK_NAME, "starRating", overallHolder.getNextHighestDepth()));
starRating.registerEvent(com.google.youtube.event.StarRatingEvent.RATING_ROLLOVER, com.google.chianti.event.EventDelegate.create(this, onRatingRollover));
starRating.registerEvent(com.google.youtube.event.StarRatingEvent.RATING_ROLLOUT, com.google.chianti.event.EventDelegate.create(this, onRatingRollout));
starRating.registerEvent(com.google.youtube.event.StarRatingEvent.RATING_RELEASE, com.google.chianti.event.EventDelegate.create(this, onRatingRelease));
starRating.setRateable(isRateable);
starRating.setLoggedIn(isLoggedIn);
var _local15 = (STAGE_WIDTH - (starsText_txt._width / 2)) - (starRating._width / 2);
starRating.setPosition(_local15, _local12 + _local13);
var _local16 = (STAGE_WIDTH - (starsText_txt._width / 2)) - (RATING_TEXT_WIDTH / 2);
ratingText_txt = overallHolder.createTextField("ratingText_txt", overallHolder.getNextHighestDepth(), _local16, starRating._y + starRating._height, RATING_TEXT_WIDTH, RATING_TEXT_HEIGHT);
ratingText_txt.setNewTextFormat(ratingTextFormat);
ratingText_txt.selectable = false;
ratingText_txt.text = com.google.utils.StringUtils.replace(yvaVideoRatingLabel, "RATING_COUNT_1", yvaVideoRating);
starRating.setRating(currentStars);
setStarText(initialStarDescription);
_visible = true;
}
static var LINK_NAME = "__Packages.com.google.youtube.players.yva.YvaInfo";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.yva.YvaInfo);
static var STAGE_WIDTH = 300;
static var Y_OFFSET = 1;
static var X_OFFSET = 2;
static var X_FILLER = 1;
static var TITLE_TEXT_WIDTH = 170;
static var RIGHT_COLUMN_X = 180;
static var TITLE_TEXT_HEIGHT = 19;
static var AUTHOR_LABEL_WIDTH = 34;
static var AUTHOR_LABEL_HEIGHT = 17;
static var AUTHOR_TEXT_WIDTH = 110;
static var AUTHOR_TEXT_HEIGHT = 17;
static var COMMENT_LABEL_WIDTH = 62;
static var COMMENT_LABEL_HEIGHT = 17;
static var COMMENT_TEXT_WIDTH = 50;
static var COMMENT_TEXT_HEIGHT = 17;
static var STARS_TEXT_WIDTH = 125;
static var STARS_TEXT_HEIGHT = 20;
static var RATING_TEXT_WIDTH = 125;
static var RATING_TEXT_HEIGHT = 20;
}
Symbol 20490 MovieClip [__Packages.com.google.youtube.ui.IButton] Frame 0
class com.google.youtube.ui.IButton
{
function IButton () {
}
}
Symbol 20491 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 20492 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 20493 MovieClip [__Packages.com.google.youtube.players.ui.MenuArrowButton] Frame 0
class com.google.youtube.players.ui.MenuArrowButton extends com.google.youtube.ui.CompoundButton
{
var descriptor, buttonWidth, buttonHeight, hovered, myColor, highlightClip, mySubmenu, menuControl, icon, createEmptyMovieClip, getNextHighestDepth;
function MenuArrowButton () {
super();
}
function init(moduleDescriptor) {
if (descriptor) {
descriptor.unregisterEvent(com.google.youtube.event.DataEvent.SET, com.google.chianti.event.EventDelegate.create(this, onDescriptorChange));
}
descriptor = moduleDescriptor;
descriptor.registerEvent(com.google.youtube.event.DataEvent.SET, com.google.chianti.event.EventDelegate.create(this, onDescriptorChange));
buttonWidth = ARROW_WIDTH;
buttonHeight = ARROW_HEIGHT;
build();
hovered = false;
myColor = COLOR_DEFAULT;
drawArrow(myColor);
drawState();
}
function getSize() {
return({width:ARROW_WIDTH, height:ARROW_HEIGHT});
}
function highlight() {
myColor = COLOR_HIGHLIGHT;
if (!hovered) {
drawArrow(myColor);
}
}
function unhighlight() {
myColor = COLOR_DEFAULT;
drawArrow(myColor);
}
function hover() {
super.hover();
if (descriptor.enabled && (descriptor.instance && (descriptor.getSubmenu))) {
hovered = true;
drawArrow(COLOR_HOVER);
if (highlightClip) {
highlightClip._visible = true;
}
}
}
function unhover() {
super.unhover();
hovered = false;
drawArrow(myColor);
if (highlightClip) {
highlightClip._visible = false;
}
}
function deactivate() {
hideSubmenu();
}
function onDescriptorChange(evt) {
drawState();
}
function release() {
drawArrow(COLOR_CLICKED);
if (mySubmenu && (mySubmenu.active())) {
mySubmenu.hide();
return(undefined);
}
if (menuControl) {
if (descriptor.enabled && (descriptor.instance && (descriptor.hasSubmenu))) {
mySubmenu = descriptor.getSubmenu(this);
if (mySubmenu) {
mySubmenu.setParentButton(this);
showSubmenu();
}
}
}
}
function drawArrow(color) {
icon.clear();
var _local3 = [{x:8, y:6}, {x:3, y:10}, {x:8, y:14}];
if (descriptor.hasSubmenu) {
com.google.youtube.util.Drawing.drawPoly(icon, _local3, color);
} else {
com.google.youtube.util.Drawing.drawPoly(icon, _local3, COLOR_UNAVAILABLE);
}
}
function drawState() {
if (descriptor.hasSubmenu) {
if (descriptor.instance || (descriptor.getStatus())) {
myColor = COLOR_DEFAULT;
} else {
myColor = COLOR_UNAVAILABLE;
}
} else {
myColor = COLOR_UNAVAILABLE;
}
drawArrow(myColor);
}
function showSubmenu() {
mySubmenu.onSelect(this, hideSubmenu);
repositionSubmenu();
mySubmenu.show();
}
function repositionSubmenu() {
if (mySubmenu) {
var _local2 = (-mySubmenu.getWidth()) - 1;
var _local3 = getSize().height - mySubmenu.getHeight();
mySubmenu.moveTo(_local2, _local3);
}
}
function hideSubmenu() {
if (mySubmenu && (mySubmenu.active())) {
mySubmenu.hide();
}
}
function build() {
super.build();
icon = createEmptyMovieClip("icon", getNextHighestDepth());
drawArrow(myColor);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.MenuArrowButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.MenuArrowButton);
static var ARROW_WIDTH = 10;
static var ARROW_HEIGHT = 22;
static var COLOR_HIGHLIGHT = 3355443;
static var COLOR_HOVER = 16777215;
static var COLOR_CLICKED = 0;
static var COLOR_DEFAULT = 3355443;
static var COLOR_UNAVAILABLE = 10066329;
}
Symbol 20494 MovieClip [__Packages.com.google.youtube.players.IVideoPlayer] Frame 0
class com.google.youtube.players.IVideoPlayer implements com.google.youtube.IBroadcaster
{
function IVideoPlayer () {
}
}
Symbol 20495 MovieClip [__Packages.com.google.youtube.players.modules.IPlayerModuleMediator] Frame 0
class com.google.youtube.players.modules.IPlayerModuleMediator
{
function IPlayerModuleMediator () {
}
}
Symbol 20496 MovieClip [__Packages.com.google.youtube.players.modules.ModuleMediator] Frame 0
class com.google.youtube.players.modules.ModuleMediator extends com.google.youtube.AbstractElement implements com.google.youtube.players.modules.IPlayerModuleMediator
{
var playerController, playerConfigData, currentVideoData, moduleDescriptorMap, moduleSharedObject, moduleSharedObjectData;
function ModuleMediator (ipc, config, videoData) {
super();
playerController = ipc;
playerConfigData = config;
currentVideoData = videoData;
moduleDescriptorMap = {};
}
function updateVideoData(newVideoData) {
currentVideoData = newVideoData;
}
function registerModule(descriptor) {
if (descriptor && (!moduleDescriptorMap[descriptor.label])) {
moduleDescriptorMap[descriptor.label] = descriptor;
if (descriptor instanceof com.google.youtube.players.modules.VisibleModuleDescriptor) {
descriptor.registerEvent(com.google.youtube.event.GenericButtonEvent.RELEASE, com.google.chianti.event.EventDelegate.create(playerController, playerController.onDescriptorEvent));
}
}
}
function unregisterModule(descriptor) {
if (descriptor && (moduleDescriptorMap[descriptor.label])) {
if (descriptor instanceof com.google.youtube.players.modules.VisibleModuleDescriptor) {
descriptor.unregisterAll();
}
delete moduleDescriptorMap[descriptor.label];
}
}
function unregisterAllModules() {
for (var module in moduleDescriptorMap) {
unregisterModule(moduleDescriptorMap[module]);
}
}
function createFromLabel(label, videoPlayer, baseClip) {
var _local5 = moduleDescriptorMap[label];
if (_local5) {
switch (_local5.loadPolicy) {
case com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_ALWAYS :
var _local6 = create(_local5.label, videoPlayer, _local5.path, baseClip);
break;
case com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_BY_PREFERENCE :
moduleSharedObject = SharedObject.getLocal(MODULE_DATA_SO_KEY, "/");
moduleSharedObjectData = moduleSharedObject.data;
if (!((moduleSharedObjectData[_local5.label].loadPolicy == com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_ALWAYS) || (_local5.activated))) {
break;
}
_local6 = create(_local5.label, videoPlayer, _local5.path, baseClip);
}
if (_local6) {
_local5.instance = _local6;
}
}
}
function destroyFromLabel(label, videoPlayer, baseClip) {
var _local5 = moduleDescriptorMap[label];
if (_local5) {
switch (_local5.loadPolicy) {
case com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_INTRINSIC :
break;
default :
destroy(_local5.label, videoPlayer, baseClip);
}
_local5.instance = undefined;
}
}
function create(moduleName, videoPlayer, path, baseClip) {
var _local6 = com.google.youtube.players.modules.IPlayerModuleAdapter(baseClip[moduleName]);
if (_local6) {
} else {
var _local7 = baseClip.getNextHighestDepth();
_local6 = com.google.youtube.players.modules.IPlayerModuleAdapter(baseClip.attachMovie(com.google.youtube.players.modules.ModuleAdapter.LINK_NAME, moduleName, _local7));
if (_local6) {
_local6.init(this, playerController, videoPlayer, path);
}
}
return(_local6);
}
function destroy(moduleName, videoPlayer, baseClip) {
var _local5 = com.google.youtube.players.modules.IPlayerModuleAdapter(baseClip[moduleName]);
if (_local5) {
_local5.destroy();
MovieClip(_local5).removeMovieClip();
}
}
function getModuleConfigData(videoPlayer) {
return(new com.google.youtube.players.modules.ModuleConfigData(playerConfigData, videoPlayer, currentVideoData));
}
function getVisibleModuleDescriptors() {
var _local2 = [];
for (var i in moduleDescriptorMap) {
var _local3 = moduleDescriptorMap[i];
if (_local3 instanceof com.google.youtube.players.modules.VisibleModuleDescriptor) {
_local2.push(_local3);
}
}
return(_local2.sortOn("menuIndex", Array.NUMERIC));
}
function getReservedRectangleList(topMostModulesOnly) {
var _local3 = [];
for (var i in moduleDescriptorMap) {
var _local4 = moduleDescriptorMap[i];
var _local5 = _local4.instance;
if (_local4.isTopmost || (topMostModulesOnly == false)) {
var _local6 = _local5.getReservedRect();
if ((_local6.width > 0) && (_local6.height > 0)) {
_local3.push(_local6);
}
}
}
return(_local3);
}
function onModuleEvent(evt, videoPlayer) {
switch (evt.type) {
case com.google.youtube.event.ModuleEvent.PLAY :
videoPlayer.play();
break;
case com.google.youtube.event.ModuleEvent.PAUSE :
videoPlayer.pause();
break;
case com.google.youtube.event.ModuleEvent.SEEK :
videoPlayer.seekTo(evt.data, evt.allowSeekAhead);
break;
case com.google.youtube.event.ModuleEvent.ENABLE :
playerController.enableControls();
break;
case com.google.youtube.event.ModuleEvent.DISABLE :
playerController.disableControls();
break;
case com.google.youtube.event.ModuleEvent.ADD_MARKER :
if (evt.time && (evt.markerWidth)) {
playerController.addMarker(evt.time, evt.markerWidth);
}
break;
case com.google.youtube.event.ModuleEvent.REMOVE_MARKERS :
playerController.clearMarkers();
break;
case com.google.youtube.event.ModuleEvent.HIDE_END_SCREEN :
playerController.onHideEndScreen();
break;
case com.google.youtube.event.ModuleEvent.SHOW_END_SCREEN :
playerController.onShowEndScreen();
}
}
static var MODULE_DATA_SO_KEY = "moduleData";
}
Symbol 20497 MovieClip [__Packages.com.google.youtube.event.VideoInfoEvent] Frame 0
class com.google.youtube.event.VideoInfoEvent
{
function VideoInfoEvent () {
}
static var TITLE_CLICKED = "onTitleClicked";
static var AUTHOR_CLICKED = "onAuthorClicked";
static var COMMENTS_CLICKED = "onCommentsClicked";
static var RATING_SET = "onRatingSet";
}
Symbol 20498 MovieClip [__Packages.com.google.youtube.players.IPlayerController] Frame 0
class com.google.youtube.players.IPlayerController implements com.google.youtube.IBroadcaster
{
function IPlayerController () {
}
}
Symbol 20499 MovieClip [__Packages.com.google.youtube.players.ui.PlayPauseButton] Frame 0
class com.google.youtube.players.ui.PlayPauseButton extends com.google.youtube.ui.BaseButton implements com.google.youtube.ui.IVideoControl
{
var color1, color2, disabledOverlay, buttonWidth, _x, _y, currentState, playIndicator, playIndicatorShadow, pauseIndicator, pauseIndicatorShadow, broadcast, buttonHeight, bg, createEmptyMovieClip, getNextHighestDepth, _width, _height;
function PlayPauseButton () {
super();
}
function init(c1, c2) {
color1 = c1;
color2 = c2;
build();
}
function enable() {
super.enable();
disabledOverlay._visible = false;
}
function disable() {
super.disable();
disabledOverlay._visible = true;
}
function isResizable() {
return(false);
}
function hasDivider() {
return(true);
}
function getWidth() {
return(buttonWidth);
}
function getMinRequiredControlsWidth() {
return(0);
}
function setPosition(newX, newY) {
_x = newX;
_y = newY;
}
function setWidth(newWidth) {
}
function updateIndicators() {
if (currentState == PLAYING) {
playIndicator._visible = false;
playIndicatorShadow._visible = false;
pauseIndicator._visible = true;
pauseIndicatorShadow._visible = true;
} else {
playIndicator._visible = true;
playIndicatorShadow._visible = true;
pauseIndicator._visible = false;
pauseIndicatorShadow._visible = false;
}
}
function hover() {
super.hover();
drawPauseIndicator(true);
drawPlayIndicator(true);
updateIndicators();
}
function unhover() {
super.unhover();
drawPauseIndicator();
drawPlayIndicator();
updateIndicators();
}
function release() {
super.release();
if (currentState == PLAYING) {
broadcast({type:com.google.youtube.event.GenericButtonEvent.PAUSE, target:this});
} else if (currentState == PAUSED) {
broadcast({type:com.google.youtube.event.GenericButtonEvent.PLAY, target:this});
}
hover();
}
function setState(newState) {
currentState = newState;
updateIndicators();
}
function drawBgDownState() {
var _local2 = {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}};
com.google.youtube.util.Drawing.drawRect(bg, 0, 0, buttonWidth, buttonHeight, _local2);
}
function drawPlayIndicator(drawDownState) {
playIndicator.clear();
var _local3 = (drawDownState ? 16724787 : 9539985);
var _local4 = (drawDownState ? 12193808 : 3355443);
var _local5 = (drawDownState ? 12193808 : 3355443);
var _local6 = [{x:1.5, y:0.5}, {x:13.5, y:7}, {x:1.5, y:14.5}];
var _local7 = {colors:[_local3, _local4], fillType:"linear", alphas:[100, 100], ratios:[0, 130], matrix:{matrixType:"box", x:0, y:0, w:14, h:16, r:(90 / 180) * Math.PI}};
var _local8 = {thickness:0, alpha:100, rgb:_local5};
com.google.youtube.util.Drawing.drawPoly(playIndicator, _local6, _local7, _local8);
}
function drawPauseIndicator(drawDownState) {
pauseIndicator.clear();
var _local3 = (drawDownState ? 16724787 : 9539985);
var _local4 = (drawDownState ? 12193808 : 3355443);
var _local5 = (drawDownState ? 12193808 : 3355443);
var _local6 = {colors:[_local3, _local4], fillType:"linear", alphas:[100, 100], ratios:[0, 150], matrix:{matrixType:"box", x:0, y:0, w:3, h:12, r:(90 / 180) * Math.PI}};
var _local7 = {thickness:0, alpha:100, rgb:_local5};
com.google.youtube.util.Drawing.drawRect(pauseIndicator, 1, 0.5, 3, 12, _local6, _local7);
com.google.youtube.util.Drawing.drawRect(pauseIndicator, 8, 0.5, 3, 12, _local6, _local7);
}
function build() {
super.build();
drawBgDownState();
playIndicator = createEmptyMovieClip("playIndicator", getNextHighestDepth());
drawPlayIndicator();
playIndicator._x = 8;
playIndicator._y = 4;
pauseIndicator = createEmptyMovieClip("pauseIndicator", getNextHighestDepth());
drawPauseIndicator();
pauseIndicator._x = 8;
pauseIndicator._y = 5;
playIndicatorShadow = playIndicator.duplicateMovieClip("playIndicatorShadow", getNextHighestDepth());
playIndicatorShadow._x = playIndicatorShadow._x + 1;
playIndicatorShadow._y = playIndicatorShadow._y + 1;
playIndicatorShadow._alpha = com.google.youtube.ui.BaseButton.ICON_SHADOW_ALPHA;
playIndicatorShadow.swapDepths(playIndicator);
var _local3 = new Color(playIndicatorShadow);
_local3.setRGB(com.google.youtube.ui.BaseButton.ICON_SHADOW_COLOR);
pauseIndicatorShadow = pauseIndicator.duplicateMovieClip("pauseIndicatorShadow", getNextHighestDepth());
pauseIndicatorShadow._x = pauseIndicatorShadow._x + 1;
pauseIndicatorShadow._y = pauseIndicatorShadow._y + 1;
pauseIndicatorShadow._alpha = com.google.youtube.ui.BaseButton.ICON_SHADOW_ALPHA;
pauseIndicatorShadow.swapDepths(pauseIndicator);
var _local4 = new Color(pauseIndicatorShadow);
_local4.setRGB(com.google.youtube.ui.BaseButton.ICON_SHADOW_COLOR);
disabledOverlay = createEmptyMovieClip("disabledOverlay", getNextHighestDepth());
var _local5 = {colors:[color2, color1], fillType:"linear", alphas:[com.google.youtube.ui.BaseButton.DISABLED_ALPHA, com.google.youtube.ui.BaseButton.DISABLED_ALPHA], ratios:[35, 255], matrix:{matrixType:"box", x:0, y:0, w:30, h:30, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(disabledOverlay, 1, 1, _width - 2, _height - 2, _local5);
disabledOverlay.onRelease = function () {
};
disabledOverlay.useHandCursor = false;
disabledOverlay._visible = false;
setState(PAUSED);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.PlayPauseButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.PlayPauseButton);
static var PLAYING = "playing";
static var PAUSED = "paused";
}
Symbol 20500 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 20501 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 20502 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 20503 MovieClip [__Packages.com.google.youtube.players.ui.SplitMenuButtonHolder] Frame 0
class com.google.youtube.players.ui.SplitMenuButtonHolder extends com.google.youtube.ui.CompoundButton
{
var drawArrow, descriptor, menuControl, myHeight, myWidth, highlightLayer, createEmptyMovieClip, getNextHighestDepth, arrowHighlight, iconButton, attachMovie, arrow;
function SplitMenuButtonHolder () {
super();
}
function init(moduleDescriptor, movieMenuControl, shouldDrawArrow) {
drawArrow = shouldDrawArrow;
descriptor = moduleDescriptor;
menuControl = movieMenuControl;
build();
}
function getSize() {
return({width:myWidth, height:myHeight});
}
function hover() {
super.hover();
highlightLayer._visible = true;
}
function unhover() {
super.unhover();
highlightLayer._visible = false;
}
function build() {
var _local2 = (drawArrow ? (com.google.youtube.players.ui.MenuArrowButton.ARROW_WIDTH) : 0);
var _local3 = (drawArrow ? (SPLIT_PADDING) : (NO_ARROW_PADDING));
myWidth = 0;
myHeight = 0;
highlightLayer = createEmptyMovieClip("highlightClip", getNextHighestDepth());
arrowHighlight = createEmptyMovieClip("arrowHighlight", getNextHighestDepth());
arrowHighlight._visible = false;
iconButton = com.google.youtube.players.ui.IconMenuButton(attachMovie(descriptor.iconClass, descriptor.label, getNextHighestDepth()));
iconButton.registerParentButton(this);
iconButton.init(descriptor, _local2 + _local3);
iconButton._y = Y_TOP_OFFSET;
iconButton._x = X_LEFT_OFFSET;
myWidth = ((iconButton.getSize().width + X_LEFT_OFFSET) + X_RIGHT_OFFSET) + PADDING_RIGHT;
myHeight = (iconButton.getSize().height + Y_TOP_OFFSET) + Y_BOTTOM_OFFSET;
if (descriptor.hasSubmenu) {
arrow = com.google.youtube.players.ui.MenuArrowButton(attachMovie(com.google.youtube.players.ui.MenuArrowButton.LINK_NAME, "arrowButton", getNextHighestDepth()));
arrow.registerParentButton(this);
arrow.init(descriptor);
arrow.menuControl = menuControl;
arrow.highlightClip = arrowHighlight;
arrow._x = X_LEFT_OFFSET;
arrow._y = Y_TOP_OFFSET;
com.google.youtube.util.Drawing.drawRect(highlightLayer, X_LEFT_OFFSET, Y_TOP_OFFSET, myWidth - (X_LEFT_OFFSET + X_RIGHT_OFFSET), myHeight - (Y_TOP_OFFSET + Y_BOTTOM_OFFSET), 6710886);
com.google.youtube.util.Drawing.drawRect(highlightLayer, X_LEFT_OFFSET, Y_TOP_OFFSET, myWidth - (X_LEFT_OFFSET + X_RIGHT_OFFSET), (myHeight - (Y_TOP_OFFSET - Y_BOTTOM_OFFSET)) - 1, 10066329);
com.google.youtube.util.Drawing.drawRect(highlightLayer, X_LEFT_OFFSET, Y_TOP_OFFSET, _local2 + _local3, (myHeight - (Y_TOP_OFFSET - Y_BOTTOM_OFFSET)) - 1, 12303291);
com.google.youtube.util.Drawing.drawRect(arrowHighlight, X_LEFT_OFFSET, Y_TOP_OFFSET, myWidth - (X_LEFT_OFFSET + X_RIGHT_OFFSET), myHeight - (Y_TOP_OFFSET + Y_BOTTOM_OFFSET), 6710886);
com.google.youtube.util.Drawing.drawRect(arrowHighlight, X_LEFT_OFFSET, Y_TOP_OFFSET + 1, myWidth - (X_LEFT_OFFSET + X_RIGHT_OFFSET), (myHeight - (Y_TOP_OFFSET - Y_BOTTOM_OFFSET)) - 2, 10066329);
com.google.youtube.util.Drawing.drawDivider(arrowHighlight, (X_LEFT_OFFSET + _local2) + _local3, Y_TOP_OFFSET + 1, (myHeight - (Y_TOP_OFFSET + Y_BOTTOM_OFFSET)) - 2, com.google.youtube.util.Drawing.VERTICAL, 6710886, 13421772, 100);
} else {
com.google.youtube.util.Drawing.drawRect(highlightLayer, X_LEFT_OFFSET, Y_TOP_OFFSET, myWidth - (X_LEFT_OFFSET + X_RIGHT_OFFSET), myHeight - (Y_TOP_OFFSET + Y_BOTTOM_OFFSET), 6710886);
com.google.youtube.util.Drawing.drawRect(highlightLayer, X_LEFT_OFFSET, Y_TOP_OFFSET, myWidth - (X_LEFT_OFFSET + X_RIGHT_OFFSET), (myHeight - (Y_TOP_OFFSET - Y_BOTTOM_OFFSET)) - 1, 10066329);
}
highlightLayer._visible = false;
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.SplitMenuButtonHolder";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.SplitMenuButtonHolder);
static var X_LEFT_OFFSET = 2;
static var X_RIGHT_OFFSET = 2;
static var Y_TOP_OFFSET = 2;
static var Y_BOTTOM_OFFSET = 0;
static var PADDING_RIGHT = 0;
static var SPLIT_PADDING = 3;
static var NO_ARROW_PADDING = 2;
}
Symbol 20504 MovieClip [__Packages.com.google.youtube.players.modules.ISubmenu] Frame 0
class com.google.youtube.players.modules.ISubmenu
{
function ISubmenu () {
}
}
Symbol 20505 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) {
str = str.toString();
if (opt_textFormat) {
_textField.setNewTextFormat(opt_textFormat);
}
_textField.text = str;
if ((_textField.textWidth > _textField._width) || (_textField.textHeight > _textField._height)) {
var _local5 = str.length;
var _local6 = 1;
for ( ; _local6 <= _local5 ; _local6++) {
_textField.text = str.substr(0, _local6);
if ((_textField.textWidth > _textField._width) || (_textField.textHeight > _textField._height)) {
_textField.text = "";
var _local7 = str.substr(0, _local6 - 4) + "...";
return(_local7);
}
}
} else {
_textField.text = "";
return(str);
}
}
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 20506 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, topmostModuleDisplay, moduleDisplay, videoDisplayButton, preloader, errorDisplay, stillLoaderListener, attachMovie, createEmptyMovieClip;
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;
moduleDisplay._x = (topmostModuleDisplay._x = _local7.x);
moduleDisplay._y = (topmostModuleDisplay._y = _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 TOPMOST_MODULE_DISPLAY_DEPTH = 80;
static var PRELOADER_DEPTH = 90;
static var LARGE_PLAY_BUTTON_DEPTH = 100;
static var STILL_ASPECT_RATIO = 4 / 3;
var videoLoaded = false;
var recoverableErrorActive = false;
}
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.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) / 1000);
}
function getSize() {
return(endBytes - startBytes);
}
}
Symbol 20511 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 20512 MovieClip [__Packages.com.google.youtube.players.ui.FullscreenButton] Frame 0
class com.google.youtube.players.ui.FullscreenButton extends com.google.youtube.ui.BaseButton implements com.google.youtube.ui.IVideoControl
{
var buttonWidth, iconAnimating, color1, color2, _x, _y, currentState, activeIcon, activeIconBg, inactiveIconBg, inactiveIcon, broadcast, buttonHeight, bg, createEmptyMovieClip, getNextHighestDepth;
function FullscreenButton () {
super();
buttonWidth = 32;
iconAnimating = false;
}
function init(c1, c2) {
color1 = c1;
color2 = c2;
build();
}
function isResizable() {
return(false);
}
function hasDivider() {
return(true);
}
function getWidth() {
return(buttonWidth);
}
function getMinRequiredControlsWidth() {
return(240);
}
function setPosition(newX, newY) {
_x = newX;
_y = newY;
}
function setWidth(newWidth) {
}
function setState(newState) {
currentState = newState;
updateIcons();
}
function updateIcons() {
if (currentState == ACTIVE) {
activeIcon._visible = true;
activeIconBg._visible = true;
inactiveIconBg._visible = false;
inactiveIcon._visible = false;
} else if (currentState == INACTIVE) {
activeIcon._visible = false;
activeIconBg._visible = false;
inactiveIconBg._visible = true;
inactiveIcon._visible = true;
}
}
function hover() {
super.hover();
drawInactiveIcon(true);
drawActiveIcon(true);
startIconAnimation();
}
function unhover() {
super.unhover();
drawInactiveIcon();
drawActiveIcon();
stopIconAnimation();
}
function release() {
super.release();
broadcast({target:this, type:com.google.youtube.event.GenericButtonEvent.RELEASE});
hover();
}
function drawActiveIcon(drawHoverState) {
var _local3 = (drawHoverState ? 16724787 : 9737364);
var _local4 = (drawHoverState ? 12193808 : 4276545);
var _local5 = (drawHoverState ? 12193808 : 3355443);
var _local6 = {colors:[_local3, _local4], fillType:"linear", alphas:[100, 100], ratios:[100, 255], matrix:{matrixType:"box", x:0, y:0, w:ICON_BG_WIDTH, h:ICON_BG_HEIGHT, r:(90 / 180) * Math.PI}};
var _local7 = {thickness:0, alpha:70, rgb:_local5};
com.google.youtube.util.Drawing.drawRect(activeIconBg, 0, 0, ICON_BG_WIDTH, ICON_BG_HEIGHT, _local6, _local7, 2);
}
function drawInactiveIcon(drawHoverState) {
var _local3 = (drawHoverState ? 12456466 : 3750201);
var _local4 = (drawHoverState ? 16068142 : 9145227);
var _local5 = (drawHoverState ? 12193808 : 3355443);
var _local6 = {colors:[_local3, _local4], fillType:"linear", alphas:[100, 100], ratios:[100, 255], matrix:{matrixType:"box", x:0, y:0, w:ICON_BG_WIDTH, h:ICON_BG_HEIGHT, r:(90 / 180) * Math.PI}};
var _local7 = {thickness:0, alpha:70, rgb:_local5};
var _local8 = (drawHoverState ? 16425120 : 12698049);
var _local9 = (drawHoverState ? 16146014 : 10855845);
var _local10 = {colors:[_local8, _local9], fillType:"linear", alphas:[100, 100], ratios:[100, 255], matrix:{matrixType:"box", x:0, y:0, w:ICON_ANIMATION_OFF_WIDTH, h:ICON_ANIMATION_OFF_HEIGHT, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(inactiveIconBg, 0, 0, ICON_BG_WIDTH, ICON_BG_HEIGHT, _local6, _local7, 2);
com.google.youtube.util.Drawing.drawRect(inactiveIcon, 0, 0, ICON_ANIMATION_OFF_WIDTH, ICON_ANIMATION_OFF_HEIGHT, _local10, _local7, 2);
}
function stopIconAnimation() {
iconAnimating = false;
}
function startIconAnimation() {
iconAnimating = true;
animateIcon();
}
function animateIcon() {
if (iconAnimating) {
com.gs.TweenLite.to(inactiveIcon, 0.4, {_width:ICON_ANIMATION_ON_WIDTH, _height:ICON_ANIMATION_ON_HEIGHT});
com.gs.TweenLite.to(inactiveIcon, 0.15, {_width:ICON_ANIMATION_OFF_WIDTH, _height:ICON_ANIMATION_OFF_HEIGHT, delay:0.7, onComplete:com.google.chianti.event.EventDelegate.create(this, animateIcon), overwrite:false});
} else {
com.gs.TweenLite.to(inactiveIcon, 0.2, {_width:ICON_ANIMATION_OFF_WIDTH, _height:ICON_ANIMATION_OFF_HEIGHT});
}
}
function drawBgDownState() {
var _local2 = {colors:[color2, color1], fillType:"linear", alphas:[100, 70], ratios:[123, 255], matrix:{matrixType:"box", x:0, y:0, w:buttonWidth, h:buttonHeight, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(bg, 0, 0, buttonWidth, buttonHeight, _local2);
}
function build() {
super.build();
drawBgDownState();
inactiveIconBg = createEmptyMovieClip("inactiveIconBg", getNextHighestDepth());
inactiveIcon = createEmptyMovieClip("inactiveIcon", getNextHighestDepth());
activeIconBg = createEmptyMovieClip("activeIconBg", getNextHighestDepth());
activeIcon = createEmptyMovieClip("activeIcon", getNextHighestDepth());
activeIcon._alpha = 90;
inactiveIcon._x = (inactiveIconBg._x = (activeIconBg._x = 6.5));
inactiveIcon._y = (inactiveIconBg._y = (activeIconBg._y = 4.5));
com.google.youtube.util.Drawing.drawX(activeIcon, 12, 6, 10, 2, 15724527);
drawActiveIcon();
drawInactiveIcon();
updateIcons();
setState(INACTIVE);
unhover();
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.FullscreenButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.FullscreenButton);
static var ACTIVE = "active";
static var INACTIVE = "inactive";
static var ICON_BG_WIDTH = 20;
static var ICON_BG_HEIGHT = 13;
static var ICON_ANIMATION_OFF_WIDTH = 11;
static var ICON_ANIMATION_OFF_HEIGHT = 7;
static var ICON_ANIMATION_ON_WIDTH = 20;
static var ICON_ANIMATION_ON_HEIGHT = 13;
}
Symbol 20513 MovieClip [__Packages.com.google.youtube.event.MessagesEvent] Frame 0
class com.google.youtube.event.MessagesEvent
{
function MessagesEvent () {
}
static var UPDATE = "onUpdate";
}
Symbol 20514 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 20515 MovieClip [__Packages.com.google.youtube.players.ui.IconMenuButton] Frame 0
class com.google.youtube.players.ui.IconMenuButton extends com.google.youtube.ui.CompoundButton
{
var buttonHeight, descriptor, state, paddingWidth, buttonWidth, tooltip, useHandCursor, upIcon, overIcon, icon, createEmptyMovieClip, getNextHighestDepth, upIconSymbol, overIconSymbol;
function IconMenuButton () {
super();
buttonHeight = 22;
}
function init(moduleDescriptor, newPaddingWidth) {
if (descriptor) {
descriptor.unregisterEvent(com.google.youtube.event.DataEvent.SET, com.google.chianti.event.EventDelegate.create(this, onDescriptorChange));
}
descriptor = moduleDescriptor;
descriptor.registerEvent(com.google.youtube.event.DataEvent.SET, com.google.chianti.event.EventDelegate.create(this, onDescriptorChange));
state = com.google.youtube.ui.BaseButton.BUTTON_DISABLED;
paddingWidth = newPaddingWidth;
buttonWidth = com.google.youtube.ui.BaseButton.DEFAULT_BUTTON_WIDTH + paddingWidth;
tooltip = com.google.youtube.players.ui.Tooltip.createBottomOffsetTooltip(this, buttonHeight);
build();
refreshState();
}
function getSize() {
return({width:buttonWidth, height:buttonHeight});
}
function hover() {
super.hover();
refreshTooltipState();
tooltip.showTooltip();
}
function unhover() {
super.unhover();
tooltip.hideTooltip();
}
function onDescriptorChange(evt) {
refreshState();
}
function refreshState() {
if (descriptor.enabled) {
enable();
if (descriptor.instance || (descriptor.getStatus())) {
setState(BUTTON_ENABLED);
} else {
setState(com.google.youtube.ui.BaseButton.BUTTON_DISABLED);
}
useHandCursor = true;
} else {
disable();
setState(BUTTON_UNAVAILABLE);
useHandCursor = false;
}
}
function release() {
descriptor.onRelease();
}
function disable() {
setState(com.google.youtube.ui.BaseButton.BUTTON_DISABLED);
}
function enable() {
setState(BUTTON_ENABLED);
}
function setState(newState) {
state = newState;
refreshTooltipState();
drawState();
}
function refreshTooltipState() {
if (state == com.google.youtube.ui.BaseButton.BUTTON_DISABLED) {
tooltip.setTooltipText(descriptor.getEnableTooltip());
} else if (state == BUTTON_ENABLED) {
tooltip.setTooltipText(descriptor.getDisableTooltip());
} else if (state == BUTTON_UNAVAILABLE) {
tooltip.setTooltipText(descriptor.getUnavailableTooltip());
} else {
tooltip.clearTooltipText();
}
}
function drawState() {
switch (state) {
case BUTTON_ENABLED :
upIcon._alpha = 0;
overIcon._alpha = 100;
break;
case com.google.youtube.ui.BaseButton.BUTTON_ERROR :
upIcon._alpha = ERROR_ALPHA;
overIcon._alpha = 0;
break;
case BUTTON_UNAVAILABLE :
upIcon._alpha = UNAVAILABLE_ALPHA;
overIcon._alpha = 0;
break;
case com.google.youtube.ui.BaseButton.BUTTON_DISABLED :
default :
upIcon._alpha = 100;
overIcon._alpha = 0;
}
}
function build() {
super.build();
icon = createEmptyMovieClip("icon", getNextHighestDepth());
icon._x = paddingWidth + PADDING_LEFT;
icon._y = PADDING_TOP;
if (upIconSymbol) {
upIcon = icon.attachMovie(upIconSymbol, "upIcon", icon.getNextHighestDepth());
}
if (overIconSymbol) {
overIcon = icon.attachMovie(overIconSymbol, "overIcon", icon.getNextHighestDepth());
}
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.IconMenuButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.IconMenuButton);
static var ICON_BG_WIDTH = 20;
static var ICON_BG_HEIGHT = 15;
static var BUTTON_ENABLED = "enabled";
static var BUTTON_UNAVAILABLE = "unavailable";
static var ERROR_ALPHA = 30;
static var UNAVAILABLE_ALPHA = 10;
static var PADDING_TOP = 3;
static var PADDING_LEFT = 3;
}
Symbol 20516 MovieClip [__Packages.com.google.youtube.players.ui.IvIconMenuButton] Frame 0
class com.google.youtube.players.ui.IvIconMenuButton extends com.google.youtube.players.ui.IconMenuButton
{
var upIconSymbol, overIconSymbol;
function IvIconMenuButton () {
super();
upIconSymbol = "interactiveVideoUp";
overIconSymbol = "interactiveVideoOver";
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.IvIconMenuButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.IvIconMenuButton);
}
Symbol 20517 MovieClip [__Packages.com.google.youtube.players.ui.SeekBarMarkerManager] Frame 0
class com.google.youtube.players.ui.SeekBarMarkerManager extends MovieClip
{
var markerArray, seekBar, fillObject, lineStyleObject, createEmptyMovieClip, getNextHighestDepth;
function SeekBarMarkerManager () {
super();
}
function init(newSeekBar) {
clear();
markerArray = [];
seekBar = newSeekBar;
}
function setFill(newFillObject) {
fillObject = newFillObject;
}
function setLineStyle(newLineStyleObject) {
lineStyleObject = newLineStyleObject;
}
function getXPositionFromTime(newTime) {
return((newTime / seekBar.getDuration()) * seekBar.getBarWidth());
}
function addVariableWidthMarker(newMarkerObj) {
var _local3 = newMarkerObj.startTime;
var _local4 = newMarkerObj.endTime;
if ((_local3 > _local4) || ((_local3 < 0) || (_local4 > seekBar.getDuration()))) {
return(undefined);
}
markerArray.push(newMarkerObj);
drawVariableWidthMarker(newMarkerObj);
}
function drawVariableWidthMarker(newMarkerObj) {
newMarkerObj.shouldBeDisplayedNow = true;
if (seekBar.getDuration() <= 0) {
return(undefined);
}
var _local3 = getXPositionFromTime(newMarkerObj.startTime);
var _local4 = getXPositionFromTime(newMarkerObj.endTime);
newMarkerObj.targetClip = addMarker(_local3, _local4);
}
function addFixedWidthMarker(newMarkerObj) {
if (newMarkerObj.startTime < 0) {
return(undefined);
}
markerArray.push(newMarkerObj);
drawFixedWidthMarker(newMarkerObj);
}
function drawFixedWidthMarker(newMarkerObj) {
newMarkerObj.shouldBeDisplayedNow = true;
if (seekBar.getDuration() <= 0) {
return(undefined);
}
var _local3 = getXPositionFromTime(newMarkerObj.startTime);
var _local4 = _local3 + newMarkerObj.markerWidth;
newMarkerObj.targetClip = addMarker(_local3, _local4);
}
function addMarker(startX, endX) {
var _local4 = createEmptyMovieClip("marker" + (markerArray.length - 1), getNextHighestDepth());
drawMarker(startX, endX, _local4);
return(_local4);
}
function drawMarker(startX, endX, target) {
target.clear();
if (!lineStyleObject) {
lineStyleObject = DEFAULT_LINE_STYLE;
}
if (!fillObject) {
fillObject = getFill(endX - startX);
}
com.google.youtube.util.Drawing.drawRect(target, Math.round(startX), Math.round((com.google.youtube.players.ui.VideoControls.CONTROLS_DEFAULT_HEIGHT / 2) + (com.google.youtube.players.ui.SeekBar.DEFAULT_BAR_HEIGHT / 2)) - 1, Math.round(endX - startX), getMarkerHeight(), fillObject, lineStyleObject, 0);
}
function getMarkerHeight() {
return(Math.round(com.google.youtube.players.ui.VideoControls.CONTROLS_DEFAULT_HEIGHT - ((com.google.youtube.players.ui.VideoControls.CONTROLS_DEFAULT_HEIGHT / 2) + (com.google.youtube.players.ui.SeekBar.DEFAULT_BAR_HEIGHT / 2))) - 0.5);
}
function clear() {
var _local2 = markerArray.length;
var _local3 = 0;
for ( ; _local3 < _local2 ; _local3++) {
var _local4 = markerArray[_local3];
_local4.targetClip.removeMovieClip();
_local4.shouldBeDisplayedNow = false;
}
}
function resize(newWidth) {
redraw();
}
function redraw() {
var _local2 = markerArray.length;
var _local3 = 0;
for ( ; _local3 < _local2 ; _local3++) {
var _local4 = markerArray[_local3];
if (_local4.shouldBeDisplayedNow) {
redrawMarker(_local4);
}
}
}
function redrawMarker(markerObj) {
markerObj.targetClip.removeMovieClip();
if (!markerObj.endTime) {
drawFixedWidthMarker(markerObj);
return(undefined);
}
drawVariableWidthMarker(markerObj);
}
function getFill(width) {
return({colors:[16777215, 16763904], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0, y:0, w:width, h:getMarkerHeight(), r:(90 / 180) * Math.PI}});
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.SeekBarMarkerManager";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.SeekBarMarkerManager);
static var DEFAULT_LINE_STYLE = {thickness:0, rgb:8421504, alpha:100};
}
Symbol 20518 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 20519 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 = getTimer();
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_);
}
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 = getTimer();
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 + 200))) {
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 = getTimer() - startTime_;
args.rt = _local9 / 1000;
}
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);
}
var MAX_REQ = 400;
var BW_SAMPLE_SIZE = 1048576;
var BW_MAX_SAMPLES = 3;
var PLAYBACK_TIMEOUT = 5000;
}
Symbol 20520 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 20521 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 20522 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, broadcast, iconMask, iconShadowMask, _x, _y, volumeSlider, drawBgUpState, isEnabled, sliderHolder, sliderVisibleY, sliderOriginalY, bg, buttonHeight, icon, createEmptyMovieClip, getNextHighestDepth, sliderBg, includeMouseActivityOf;
function VolumeControl () {
super();
buttonWidth = 29;
currentState = UNMUTED;
}
function init(c1, c2) {
color1 = c1;
color2 = c2;
build();
}
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 20523 MovieClip [__Packages.com.google.youtube.players.ui.StarRatings] Frame 0
class com.google.youtube.players.ui.StarRatings extends com.google.youtube.AbstractElement
{
var ratingsColor, gradientHolder, defaultRating, starMask, _x, _y, isRateable, isLoggedIn, broadcast, useHandCursor, ratingsHolder, createEmptyMovieClip, getNextHighestDepth;
function StarRatings () {
super();
build();
}
function setRating(newRating) {
var _local3 = Number(newRating);
ratingsColor._x = 0;
var _local4 = ((gradientHolder._x - gradientHolder._width) + ((gradientHolder._width / TOTAL_STARS) * _local3)) - 0.5;
ratingsColor._x = _local4;
if (!defaultRating) {
defaultRating = _local3;
}
gradientHolder.setMask(starMask);
}
function setPosition(newX, newY) {
var _local4 = starMask._x - ratingsColor._x;
_x = newX - _local4;
_y = newY;
}
function getRateable() {
return(isRateable);
}
function setRateable(newIsRatable) {
isRateable = newIsRatable;
}
function setLoggedIn(newIsLoggedIn) {
isLoggedIn = newIsLoggedIn;
}
function getLoggedIn() {
return(isLoggedIn);
}
function onStarRollover(newRating) {
if (isRateable && (isLoggedIn)) {
setRating(newRating);
broadcast({type:com.google.youtube.event.StarRatingEvent.RATING_ROLLOVER, rating:newRating});
}
}
function onStarRollout() {
if (isRateable && (isLoggedIn)) {
setRating(defaultRating);
broadcast({type:com.google.youtube.event.StarRatingEvent.RATING_ROLLOUT, rating:defaultRating});
}
}
function onStarRelease(newRating) {
if (isRateable && (isLoggedIn)) {
setRating(newRating);
defaultRating = newRating;
isRateable = false;
useHandCursor = false;
broadcast({type:com.google.youtube.event.StarRatingEvent.RATING_RELEASE, rating:defaultRating});
}
}
function build() {
ratingsHolder = createEmptyMovieClip("ratingsHolder", getNextHighestDepth());
var _local2 = ratingsHolder.createEmptyMovieClip("starGraphics", ratingsHolder.getNextHighestDepth());
gradientHolder = ratingsHolder.createEmptyMovieClip("gradientHolder", ratingsHolder.getNextHighestDepth());
starMask = ratingsHolder.createEmptyMovieClip("starMask", ratingsHolder.getNextHighestDepth());
var _local3 = 0;
for ( ; _local3 < TOTAL_STARS ; _local3++) {
var _local4 = _local2.createEmptyMovieClip("star" + _local3, _local2.getNextHighestDepth());
var _local5 = _local4.createEmptyMovieClip("starShape" + 1, _local4.getNextHighestDepth());
var _local6 = _local4.createEmptyMovieClip("block" + _local3, _local4.getNextHighestDepth());
_local4.id = _local3 + 1;
var _local7 = starMask.createEmptyMovieClip("maskStar" + _local3, starMask.getNextHighestDepth());
var _local8 = STAR_OUTER_RADIUS * 2;
var _local9 = _local8 * _local3;
com.google.youtube.util.Drawing.drawStar(_local4, _local9, 0, 16777215, undefined, STAR_POINTS, STAR_INNER_RADIUS, STAR_OUTER_RADIUS);
com.google.youtube.util.Drawing.drawStar(_local7, _local9, 0, 0, undefined, STAR_POINTS, STAR_INNER_RADIUS, STAR_OUTER_RADIUS);
var _local10 = {colors:[0], fillType:"linear", alphas:[0], ratios:[0], matrix:{matrixType:"box", x:0, y:0, w:_local8, h:_local8, r:Math.PI / 2}};
com.google.youtube.util.Drawing.drawRect(_local6, -(_local8 / 2), -(_local8 / 2), _local8, _local8, _local10, undefined);
_local4.onRollOver = com.google.chianti.event.EventDelegate.create(this, onStarRollover, _local4.id);
_local4.onRollOut = com.google.chianti.event.EventDelegate.create(this, onStarRollout, _local4.id);
_local4.onRelease = com.google.chianti.event.EventDelegate.create(this, onStarRelease, _local4.id);
_local4.useHandCursor = false;
}
var _local11 = gradientHolder.createEmptyMovieClip("emptyStarGradient", gradientHolder.getNextHighestDepth());
ratingsColor = gradientHolder.createEmptyMovieClip("ratingsColor", gradientHolder.getNextHighestDepth());
var _local12 = {colors:[16724787, 16758454, 16711680, 13312291], fillType:"linear", alphas:[100, 100, 100, 100], ratios:[50, 70, 125, 145], matrix:{matrixType:"box", x:ratingsHolder._x, y:ratingsHolder._y, w:ratingsHolder._width, h:ratingsHolder._height, r:Math.PI / 2}};
com.google.youtube.util.Drawing.drawRect(ratingsColor, starMask._x, starMask._y, _local2._width, _local2._height, _local12, undefined);
starMask.cacheAsBitmap = true;
gradientHolder.setMask(starMask);
var _local13 = 0;
var _local14 = 45;
var _local15 = 0;
var _local16 = 100;
var _local17 = 2;
var _local18 = 2;
var _local19 = 0.5;
var _local20 = 3;
var _local21 = true;
var _local22 = false;
var _local23 = false;
var _local24 = new flash.filters.DropShadowFilter(_local13, _local14, _local15, _local16, _local17, _local18, _local19, _local20, _local21, _local22, _local23);
var _local25 = ratingsHolder.filters;
_local25.push(_local24);
var _local26 = 16777215 /* 0xFFFFFF */;
var _local27 = 100;
var _local28 = 6;
var _local29 = 6;
var _local30 = 0.5;
var _local31 = 3;
var _local32 = false;
var _local33 = false;
var _local34 = new flash.filters.GlowFilter(_local26, _local27, _local28, _local29, _local30, _local31, _local32, _local33);
_local25.push(_local34);
ratingsHolder.filters = _local25;
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.StarRatings";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.StarRatings);
static var STAR_OUTER_RADIUS = 9;
static var STAR_INNER_RADIUS = 3;
static var STAR_POINTS = 5;
static var TOTAL_STARS = 5;
}
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, 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});
_local3.untypedVideoData.iv_storage_server = configData.getUntypedFlashVars().iv_storage_server;
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;
}
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;
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 getCaptionsModulePath() {
return(ccModule);
}
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, sourceUrl, broadcast, currentVideoData, seekTime, getVideoInfoLoadVars, restRequest, expectedStartTime, 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;
sourceUrl = undefined;
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 = "";
if (sourceUrl) {
_local4 = sourceUrl;
videoSource = GOOGLE_VIDEO;
} else {
_local4 = configData.BASE_YT_URL + configData.GET_VIDEO_URL;
_local4 = _local4 + ((videoData.id != undefined) ? (videoData.id) : "");
videoSource = YOUTUBE;
}
if ((videoSource == YOUTUBE) && (startValue > 0)) {
_local4 = _local4 + ((startValue != undefined) ? ("&start=" + startValue) : "");
} else if ((videoSource == GOOGLE_VIDEO) && (startValue > 0)) {
_local4 = _local4 + ((startValue != undefined) ? ("&begin=" + startValue) : "");
return(_local4);
}
_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 - startSeconds);
}
} 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;
expectedStartTime = _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;
if (videoSource == GOOGLE_VIDEO) {
_local2 = _local2 + startSeconds;
}
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;
}
if ((!(infoObject.sourceurl === undefined)) && (!sourceUrl)) {
sourceUrl = infoObject.sourceurl;
}
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 YOUTUBE = 0;
static var GOOGLE_VIDEO = 1;
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.BaseEndScreen] Frame 0
class com.google.youtube.players.ui.BaseEndScreen extends com.google.youtube.AbstractElement
{
var videoPlayer, messages, _visible, _alpha, bg, createEmptyMovieClip, getNextHighestDepth;
function BaseEndScreen () {
super();
}
function setVideoPlayer(newVideoPlayer) {
videoPlayer = newVideoPlayer;
}
function init(messagesObj) {
messages = messagesObj;
}
function setSize(newX, newY, newWidth, newHeight, doSmoothTransition) {
}
function updateButtonPositions(newX, newY, newWidth, newHeight) {
}
function hideText() {
}
function showText() {
}
function isActivated() {
return(isActive);
}
function setSuggestions(suggestedVideos) {
}
function show() {
isActive = true;
_visible = true;
com.gs.TweenLite.to(this, 0.2, {_alpha:100, onComplete:com.google.chianti.event.EventDelegate.create(this, showText)});
}
function hide(doImmediateHide) {
isActive = false;
hideText();
if (!doImmediateHide) {
com.gs.TweenLite.to(this, 0.2, {_alpha:0, onComplete:function () {
this._visible = false;
}});
} else {
_alpha = 0;
_visible = false;
}
}
function drawBg(width, height) {
bg.clear();
com.google.youtube.util.Drawing.drawRect(bg, 0, 0, width, height, 0);
}
function build(bgWidth, bgHeight) {
bg = createEmptyMovieClip("bg", getNextHighestDepth());
drawBg(bgWidth, bgHeight);
bg._alpha = 70;
built = true;
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.BaseEndScreen";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.BaseEndScreen);
static var MENU_TRANSITION_SPEED = 1;
var isActive = false;
var built = false;
}
Symbol 20527 MovieClip [__Packages.com.google.youtube.players.yva.Main] Frame 0
class com.google.youtube.players.yva.Main
{
function Main () {
}
static function main(mc) {
var _local3 = new com.google.youtube.players.yva.Controller();
_local3.init(mc);
}
}
Symbol 20528 MovieClip [__Packages.com.google.youtube.players.AbstractPlayerController] Frame 0
class com.google.youtube.players.AbstractPlayerController extends com.google.youtube.AbstractElement implements com.google.youtube.players.IPlayerController
{
var listeners, saveSoundSettings, rootMc, configData, overallHolder, soundController, statsLogger, videoPlayer, currentVideoData, getURL;
function AbstractPlayerController () {
super();
listeners = [];
saveSoundSettings = true;
}
function addCallback(fn, obj, objfn) {
if (rootMc._parent.addCallback != undefined) {
rootMc._parent.addCallback(fn, obj, objfn);
} else if (configData.enableJsApi == "1") {
flash.external.ExternalInterface.addCallback(fn, obj, objfn);
}
}
function init(mc) {
rootMc = mc;
overallHolder = rootMc.createEmptyMovieClip("overallHolder", 1);
configData = com.google.youtube.players.Config.getPlayerInstance(rootMc);
if ((!configData.videoId) && (!configData.data)) {
configData = com.google.youtube.players.Config.getPlayerInstance(rootMc._parent);
}
rootMc._lockroot = true;
if (configData.autoPlay == "1") {
autoplay = true;
}
soundController = com.google.youtube.players.SoundController.getPlayerInstance(rootMc, saveSoundSettings);
initData(rootMc);
statsLogger = com.google.youtube.logging.YouTubeStatsLogger.getPlayerInstance(rootMc);
statsLogger.init(configData);
if (configData.startTime) {
flashVarStartTime = _global.parseInt(configData.startTime, 10);
}
rootMc.destroy = com.google.chianti.event.EventDelegate.create(this, destroy);
onInited();
}
function initData(mc) {
}
function onInited() {
build();
}
function onVideoDataLoad(evt) {
onVideoDataSet();
startPlayer();
}
function onVideoDataSet() {
}
function onVideoDataError(evt) {
if (evt.data.error) {
}
}
function onVideoPlayerPlay(evt) {
playbackStarted = true;
if (!configData.messages.isLoaded()) {
configData.messages.load();
}
}
function onVideoPlayerBuffering(evt) {
}
function onNewVideoLoaded(evt) {
}
function onVideoCued(evt) {
}
function resetVideoStats(evt) {
if ((evt.data.flvurl == undefined) && (evt.data)) {
statsLogger.onLoadNewVideo(evt, com.google.chianti.event.EventDelegate.create(videoPlayer, videoPlayer.getCurrentTime), com.google.chianti.event.EventDelegate.create(videoPlayer, videoPlayer.getDuration), com.google.chianti.event.EventDelegate.create(videoPlayer, videoPlayer.getNSBytesLoaded), com.google.chianti.event.EventDelegate.create(videoPlayer, videoPlayer.getBufferEmptyEvents), com.google.chianti.event.EventDelegate.create(this, getLoggingOptions));
}
}
function getLoggingOptions() {
var _local2 = {};
if (configData.autoPlay == "1") {
_local2.autoplay = 1;
}
if (configData.scriptedPlayback) {
_local2.splay = 1;
}
return(_local2);
}
function onProgress(evt) {
if (videoPlayer.getPlayState() == com.google.youtube.players.VideoPlayer.PLAYING) {
if (getCurrentVideoData().flvurl == undefined) {
var _local3 = (evt.data.currentTime / evt.data.duration) * 100;
statsLogger.onProgress(evt.data.currentTime, evt.data.duration, _local3);
}
}
}
function getCurrentVideoId() {
return(getCurrentVideoData().id);
}
function getCurrentVideoData() {
return(currentVideoData);
}
function startPlayer() {
if (videoPlayer.getPlayState() == com.google.youtube.players.VideoPlayer.UNSTARTED) {
if (flashVarStartTime > 0) {
currentVideoData.startSeconds = flashVarStartTime;
currentVideoData.loadingFromOffset = true;
}
if (autoplay) {
loadVideoByVideoData(currentVideoData);
} else {
videoPlayer.cueVideoByVideoData(currentVideoData);
}
}
}
function onMute() {
soundController.mute(true);
}
function onUnMute() {
soundController.unMute();
}
function isMuted() {
return(soundController.getMute());
}
function setVolume(newVolume) {
soundController.setVolume(newVolume);
}
function getVolume() {
return(soundController.getVolume());
}
function isEmbeddedPlayer() {
return(false);
}
function enableControls() {
}
function disableControls() {
}
function addMarker(startTime, markerWidth) {
}
function clearMarkers() {
}
function onVideoDisplayRelease() {
if (videoPlayer.getPlayState() == com.google.youtube.players.VideoPlayer.VIDEO_CUED) {
videoPlayer.play();
} else {
var _local2 = videoPlayer.getVideoUrl();
if (_local2) {
getURL(_local2, "_blank");
videoPlayer.pause();
}
}
}
function onVideoPlayerEnd(evt) {
}
function onUnloadVideo() {
configData.scriptedPlayback = undefined;
}
function onDescriptorEvent(evt) {
}
function broadcastExternal(evt) {
var _local3 = 0;
for ( ; _local3 < listeners.length ; _local3++) {
if (listeners[_local3].evt == evt.type) {
if (flash.external.ExternalInterface.available && (configData.enableJsApi == "1")) {
flash.external.ExternalInterface.call(listeners[_local3].fn, evt.data);
} else {
listeners[_local3].fn(evt.data);
}
}
}
}
function onVideoPlayerStateChange(evt) {
broadcastExternal({type:EXTERNAL_EVENT_STATE_CHANGE, data:evt.data});
}
function onVideoLoadError(evt) {
videoPlayer.showRecoverableError(configData.messages.getMsg(com.google.youtube.util.Messages.ERROR_VIDEO_NO_LONGER_AVAILABLE));
broadcastExternal({type:EXTERNAL_EVENT_ERROR, data:ERROR_NOT_FOUND});
}
function onVideoLoadErrorEmbeddingDisabled(evt) {
videoPlayer.showRecoverableError(configData.messages.getMsg(com.google.youtube.util.Messages.ERROR_VIDEO_EMBEDDING_DISALLOWED));
broadcastExternal({type:EXTERNAL_EVENT_ERROR, data:ERROR_EMBEDDING_DISABLED});
}
function scriptedPlay() {
configData.scriptedPlayback = true;
videoPlayer.play();
}
function scriptedSeekTo(seconds, allowSeekAhead) {
configData.scriptedPlayback = true;
videoPlayer.seekTo(seconds, allowSeekAhead);
}
function addCallbacks() {
var _local2 = configData.enableJsApi == "1";
if ((!flash.external.ExternalInterface.available) && (_local2)) {
return(undefined);
}
addCallback("playVideo", this, scriptedPlay);
addCallback("pauseVideo", videoPlayer, videoPlayer.pause);
addCallback("stopVideo", videoPlayer, videoPlayer.close);
addCallback("clearVideo", videoPlayer, videoPlayer.clear);
addCallback("getCurrentTime", videoPlayer, videoPlayer.getCurrentTime);
addCallback("getVideoBytesLoaded", videoPlayer, videoPlayer.getNSBytesLoaded);
addCallback("getVideoBytesTotal", videoPlayer, videoPlayer.getNSBytesTotal);
addCallback("getVideoStartBytes", videoPlayer, videoPlayer.getStartPosition);
addCallback("seekTo", this, scriptedSeekTo);
addCallback("getDuration", videoPlayer, videoPlayer.getDuration);
addCallback("getPlayerState", videoPlayer, videoPlayer.getPlayState);
addCallback("setSize", this, resizePlayer);
addCallback("addEventListener", this, addEventListener);
addCallback("mute", this, onMute);
addCallback("unMute", this, onUnMute);
addCallback("isMuted", this, isMuted);
addCallback("setVolume", this, setVolume);
addCallback("getVolume", this, getVolume);
addCallback("getVideoUrl", videoPlayer, videoPlayer.getVideoUrl);
addCallback("getVideoEmbedCode", videoPlayer, videoPlayer.getVideoEmbedCode);
addAdditionalCallbacks();
var _local3 = new com.google.youtube.util.FrameWaiter(overallHolder, 1, com.google.chianti.event.EventDelegate.create(this, broadcastPlayerLoaded));
}
function addAdditionalCallbacks() {
}
function broadcastPlayerLoaded() {
var _local2 = configData.enableJsApi == "1";
if (_local2) {
var _local3 = ((configData.jsApiCallback != undefined) ? (configData.jsApiCallback) : "onYouTubePlayerReady");
flash.external.ExternalInterface.call(_local3, configData.playerApiId);
} else {
rootMc._parent.playerLoaded = true;
}
onVideoPlayerStateChange({type:com.google.youtube.event.VideoPlayerEvent.STATE_CHANGE, data:videoPlayer.getPlayState()});
}
function addEventListener(event, listenerFunction) {
listeners.push({evt:event, fn:listenerFunction});
}
function resizePlayer(newWidth, newHeight) {
}
function loadVideoByVideoData(videoData) {
currentVideoData = videoData;
videoPlayer.loadVideoByVideoData(currentVideoData);
}
function destroy() {
com.google.youtube.players.Config.destroyPlayerInstance(rootMc);
com.google.youtube.logging.YouTubeStatsLogger.destroyPlayerInstance(rootMc);
com.google.youtube.players.SoundController.destroyPlayerInstance(rootMc);
videoPlayer.close();
videoPlayer.unregisterAll();
delete _global.com.google.youtube.util.SwfProxy;
rootMc._parent.unloadMovie();
}
function build() {
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.LOAD_NEW_VIDEO, com.google.chianti.event.EventDelegate.create(this, resetVideoStats));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.PROGRESS, com.google.chianti.event.EventDelegate.create(this, onProgress));
videoPlayer.registerEvent(com.google.youtube.event.VideoLoaderEvent.VIDEO_DATA_ERROR, com.google.chianti.event.EventDelegate.create(this, onVideoLoadError));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.PLAY, com.google.chianti.event.EventDelegate.create(this, onVideoPlayerPlay));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.BUFFERING, com.google.chianti.event.EventDelegate.create(this, onVideoPlayerBuffering));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.END, com.google.chianti.event.EventDelegate.create(this, onVideoPlayerEnd));
videoPlayer.registerEvent(com.google.youtube.event.VideoLoaderEvent.STREAM_NOT_FOUND, com.google.chianti.event.EventDelegate.create(this, onVideoLoadError));
videoPlayer.registerEvent(com.google.youtube.event.VideoLoaderEvent.STREAM_NOT_EMBEDDABLE, com.google.chianti.event.EventDelegate.create(this, onVideoLoadErrorEmbeddingDisabled));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.STATE_CHANGE, com.google.chianti.event.EventDelegate.create(this, onVideoPlayerStateChange));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.UNLOAD_VIDEO, com.google.chianti.event.EventDelegate.create(this, onUnloadVideo));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.LOAD_NEW_VIDEO, com.google.chianti.event.EventDelegate.create(this, onNewVideoLoaded));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.VIDEO_CUED, com.google.chianti.event.EventDelegate.create(this, onNewVideoLoaded));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.VIDEO_CUED, com.google.chianti.event.EventDelegate.create(this, onVideoCued));
videoPlayer.registerEvent(com.google.youtube.event.GenericButtonEvent.RELEASE, com.google.chianti.event.EventDelegate.create(this, onVideoDisplayRelease));
addCallbacks();
}
function onHideEndScreen(evt) {
}
function onShowEndScreen(evt) {
}
static var MIN_UI_SCALE = 53;
static var LOGO_MARGIN = 9;
static var EXTERNAL_EVENT_STATE_CHANGE = "onStateChange";
static var EXTERNAL_EVENT_ERROR = "onError";
static var ERROR_NOT_FOUND = 100;
static var ERROR_EMBEDDING_DISABLED = 101;
var autoplay = false;
var playbackStarted = false;
var flashVarStartTime = 0;
}
Symbol 20529 MovieClip [__Packages.com.google.youtube.players.SinglePlayerController] Frame 0
class com.google.youtube.players.SinglePlayerController extends com.google.youtube.players.AbstractPlayerController
{
var videoDisplayX, videoDisplayY, loadedModules, currentVideoData, configData, moduleMediator, restRequest, onVideoDataError, mouseActivity, endScreen, videoPlayer, overallHolder, seekState, largePlayButton, timeDisplay, seekBar, playPauseButton, volumeControl, soundController, videoControls, fullscreenButton, videoAspectRatio, moduleDescriptors, menuControl;
function SinglePlayerController () {
super();
videoDisplayX = 0;
videoDisplayY = 0;
loadedModules = {};
}
function init(mc) {
com.google.youtube.players.CrossDomainer.allowDomainsForModuleHost();
super.init(mc);
}
function initData() {
super.initData();
if (!currentVideoData) {
currentVideoData = com.google.youtube.players.VideoData.createFromConfigData(configData);
}
}
function onInited() {
super.onInited();
moduleMediator = new com.google.youtube.players.modules.ModuleMediator(this, configData, currentVideoData);
restRequest.registerEvent(com.google.youtube.event.DataEvent.LOAD, com.google.chianti.event.EventDelegate.create(this, onVideoDataLoad));
restRequest.registerEvent(com.google.youtube.event.DataEvent.ERROR, com.google.chianti.event.EventDelegate.create(this, onVideoDataError));
mouseActivity = new com.google.youtube.util.MouseActivity();
mouseActivity.registerEvent(com.google.youtube.util.MouseActivity.MOUSE_INACTIVE, com.google.chianti.event.EventDelegate.create(this, onMouseInactive));
mouseActivity.registerEvent(com.google.youtube.util.MouseActivity.MOUSE_ACTIVE, com.google.chianti.event.EventDelegate.create(this, onMouseActive));
if (currentVideoData) {
startPlayer();
}
allowAdDomains();
}
function onMouseInactive(evt) {
}
function onMouseActive(evt) {
}
function onVideoPlayerPlay(evt) {
super.onVideoPlayerPlay(evt);
}
function onVideoDataLoad(evt) {
restRequest.unregisterAll();
delete restRequest;
super.onVideoDataLoad(evt);
}
function onVideoLoadError(evt) {
hideLargePlayButton();
super.onVideoLoadError(evt);
}
function onVideoPlayerBuffering(evt) {
super.onVideoPlayerBuffering(evt);
hideLargePlayButton();
}
function onVideoPlayerSeeking(evt) {
endScreen.hide();
}
function onVideoControlsSeek(evt) {
videoPlayer.seekTo(evt.data);
}
function onResize() {
overallHolder._visible = true;
resizePlayer(Stage.width, Stage.height, videoDisplayX, videoDisplayY);
}
function onSeekBarRelease(evt) {
videoPlayer.seekTo(evt.data, true);
if ((seekState == com.google.youtube.players.VideoPlayer.PLAYING) || (seekState == com.google.youtube.players.VideoPlayer.ENDED)) {
videoPlayer.play();
}
}
function onSeekBarPressed() {
seekState = videoPlayer.getPlayState();
videoPlayer.pause();
if (seekState == com.google.youtube.players.VideoPlayer.ENDED) {
seekState = com.google.youtube.players.VideoPlayer.PLAYING;
}
}
function hideLargePlayButton() {
largePlayButton._visible = false;
}
function showLargePlayButton() {
largePlayButton._visible = true;
}
function onLargePlayButtonRollOver() {
com.gs.TweenLite.to(largePlayButton.bg, 0.3, {_alpha:100, overwrite:false});
}
function onLargePlayButtonRollOut() {
com.gs.TweenLite.to(largePlayButton.bg, 0.3, {_alpha:70, overwrite:false});
}
function onLargePlayButtonReleaseOutside() {
onLargePlayButtonRollOut();
}
function getPercent(value, total) {
if ((value <= 0) || (total <= 0)) {
return(0);
}
return((value / total) * 100);
}
function onProgress(evt) {
if ((evt.data.currentTime != undefined) && (evt.data.duration != undefined)) {
timeDisplay.setTime(evt.data.currentTime, evt.data.duration);
var _local4 = getPercent(evt.data.currentTime, evt.data.duration);
var _local5 = getPercent(evt.data.startSeconds, evt.data.duration);
seekBar.updateHandlePosition(_local4, _local5);
if (_local4 >= towardsEndOfMovieMarker) {
towardsEndOfMovieHandler();
}
}
super.onProgress(evt);
}
function towardsEndOfMovieHandler() {
}
function onBytesLoaded(evt) {
var _local3 = getPercent(evt.data.bytesLoaded + evt.data.startPosition, evt.data.bytesTotal);
var _local4 = getPercent(evt.data.startSeconds, evt.data.duration);
seekBar.setPercentLoaded(_local3, _local4);
}
function onMetaLoaded(evt) {
seekBar.onMetaLoaded(evt.data);
}
function onVideoCued(evt) {
var _local3 = com.google.youtube.players.VideoData(evt.data);
if (_local3.lengthInSeconds) {
seekBar.setDuration(_local3.lengthInSeconds);
timeDisplay.setTime(0, _local3.lengthInSeconds);
}
}
function startPlayer() {
super.startPlayer();
if (videoPlayer.getPlayState() == com.google.youtube.players.VideoPlayer.VIDEO_CUED) {
showLargePlayButton();
}
}
function onLoadNewVideo(evt) {
var _local3 = com.google.youtube.players.VideoData(evt.data);
seekBar.setDuration(_local3.lengthInSeconds);
loadModules();
}
function onPlayStateChange(evt) {
var _local3 = ((evt.data == com.google.youtube.players.VideoPlayer.PLAYING) ? (com.google.youtube.players.ui.PlayPauseButton.PLAYING) : (com.google.youtube.players.ui.PlayPauseButton.PAUSED));
playPauseButton.setState(_local3);
}
function onVolumeChange(evt) {
volumeControl.setValue(evt.data, true);
}
function onVolumeControlChange(evt) {
if (soundController.getMute()) {
volumeControl.setState(com.google.youtube.players.ui.VolumeControl.UNMUTED);
soundController.unMute(true);
}
soundController.setVolume(evt.data, true);
}
function onVolumeControlMute() {
volumeControl.setValue(0, true);
volumeControl.setState(com.google.youtube.players.ui.VolumeControl.MUTED);
soundController.mute();
}
function onVolumeControlUnMute() {
soundController.unMute(true);
volumeControl.setState(com.google.youtube.players.ui.VolumeControl.UNMUTED);
volumeControl.setValue(soundController.getVolume());
}
function onMute() {
onVolumeControlMute();
}
function onUnMute() {
onVolumeControlUnMute();
}
function onFullScreenButton(evt) {
if (Stage.displayState == "fullScreen") {
Stage.displayState = "normal";
} else {
var _local3 = 640;
var _local4 = 480 + videoControls.getSize().height;
if (System.capabilities.screenResolutionY > _local4) {
var _local5 = System.capabilities.screenResolutionX / System.capabilities.screenResolutionY;
if ((_local5 > 0.1) && (_local5 < 3)) {
_local3 = _local4 * _local5;
}
Stage.fullScreenSourceRect = new flash.geom.Rectangle(0, 0, _local3, _local4);
}
Stage.displayState = "fullScreen";
}
}
function onFullScreen(isFull) {
if (isFull) {
fullscreenButton.setState(com.google.youtube.players.ui.FullscreenButton.ACTIVE);
} else {
fullscreenButton.setState(com.google.youtube.players.ui.FullscreenButton.INACTIVE);
}
}
function getVideoAspectRatio() {
return(videoAspectRatio);
}
function resizePlayer(newWidth, newHeight, opt_videoDisplayX, opt_videoDisplayY) {
var _local6 = (opt_videoDisplayX ? (opt_videoDisplayX) : 0);
var _local7 = (opt_videoDisplayY ? (opt_videoDisplayY) : 0);
newHeight = newHeight - com.google.youtube.players.ui.VideoControls.CONTROLS_DEFAULT_HEIGHT;
videoControls._x = _local6;
videoControls._y = Math.floor(_local7 + newHeight);
videoControls.setWidth(newWidth);
videoPlayer.setViewportSize(_local6, _local7, newWidth, newHeight);
largePlayButton._x = _local6 + (newWidth / 2);
largePlayButton._y = _local7 + (newHeight / 2);
var _local8 = Math.min(100, Math.max(com.google.youtube.players.AbstractPlayerController.MIN_UI_SCALE, videoPlayer.getViewportScale(true)));
largePlayButton._xscale = (largePlayButton._yscale = _local8);
}
function createLargePlayButton() {
largePlayButton = videoPlayer.attachMovie("LargeStartPlayButton", "largePlayButton", com.google.youtube.players.VideoPlayer.LARGE_PLAY_BUTTON_DEPTH);
registerLargePlayButtonEvents();
largePlayButton.bg._alpha = 70;
hideLargePlayButton();
mouseActivity.setTimeout(buttonHideDelay);
}
function registerLargePlayButtonEvents() {
largePlayButton.onRelease = com.google.chianti.event.EventDelegate.create(videoPlayer, videoPlayer.play);
largePlayButton.onRollOver = com.google.chianti.event.EventDelegate.create(this, onLargePlayButtonRollOver);
largePlayButton.onRollOut = com.google.chianti.event.EventDelegate.create(this, onLargePlayButtonRollOut);
largePlayButton.onReleaseOutside = com.google.chianti.event.EventDelegate.create(this, onLargePlayButtonReleaseOutside);
}
function build() {
if (!videoPlayer) {
videoPlayer = com.google.youtube.players.VideoPlayer(overallHolder.attachMovie(com.google.youtube.players.VideoPlayer.LINK_NAME, "videoPlayer", VIDEO_PLAYER_DEPTH));
}
createLargePlayButton();
buildVideoControls();
showHideMenuButton();
super.build();
overallHolder._visible = false;
var _local3 = new com.google.youtube.util.FrameWaiter(overallHolder, 1, com.google.chianti.event.EventDelegate.create(this, onResize));
}
function loadModules() {
if (configData.loadModules == "1") {
loadModulesFromDescriptorsArray(moduleDescriptors);
}
}
function onUnloadVideo() {
super.onUnloadVideo();
unloadAllModules();
}
function unloadAllModules() {
for (var i in loadedModules) {
unloadModule(loadedModules[i]);
}
moduleDescriptors = [];
moduleMediator.unregisterAllModules();
showHideMenuButton();
}
function onVideoInfoLoad(evt) {
var _local3 = LoadVars(evt.data);
_local3.id = currentVideoData.id;
currentVideoData = com.google.youtube.players.VideoData.createFromLoadVars(_local3);
moduleMediator.updateVideoData(currentVideoData);
moduleDescriptors = getModuleDescriptorsFromVideoData(currentVideoData);
loadModules();
}
function getModuleDescriptorsFromVideoData(vd) {
var _local3 = [];
if (vd.isLoadIvModule()) {
var _local4 = new com.google.youtube.players.modules.IvModuleDescriptor();
_local4.path = vd.getIvModulePath();
_local4.enabled = true;
_local4.setMessages(configData.messages);
_local3.push(_local4);
}
if (vd.isLoadAdModule()) {
var _local5 = new com.google.youtube.players.modules.AdModuleDescriptor();
_local5.path = vd.getAdModulePath();
_local5.enabled = true;
_local3.push(_local5);
}
if (vd.isLoadCaptionsModule()) {
var _local6 = new com.google.youtube.players.modules.SubtitleModuleDescriptor();
_local6.path = vd.getCaptionsModulePath();
_local6.enabled = true;
_local6.setMessages(configData.messages);
_local3.push(_local6);
}
return(_local3);
}
function loadModulesFromDescriptorsArray(moduleDescriptors) {
var _local3 = 0;
for ( ; _local3 < moduleDescriptors.length ; _local3++) {
var _local4 = moduleDescriptors[_local3];
moduleMediator.registerModule(_local4);
toggleModule(_local4);
}
showHideMenuButton();
}
function showHideMenuButton() {
var _local2 = moduleMediator.getVisibleModuleDescriptors();
if ((!_local2) || (_local2.length < 1)) {
var _local3 = videoControls.removeControl(menuControl);
} else {
if (videoControls.getControlIndex(menuControl) == -1) {
videoControls.addControl(menuControl);
}
menuControl.setMenuItems(_local2);
}
}
function buildVideoControls() {
videoControls = com.google.youtube.players.ui.VideoControls(overallHolder.attachMovie(com.google.youtube.players.ui.VideoControls.LINK_NAME, "videoControls", VIDEO_CONTROLS_DEPTH));
videoControls.init(configData);
playPauseButton = com.google.youtube.players.ui.PlayPauseButton(videoControls.attachMovie(com.google.youtube.players.ui.PlayPauseButton.LINK_NAME, "playPauseButton", videoControls.getNextHighestDepth()));
playPauseButton.init(configData.CONTROLS_TOP_GRADIENT_COLOR, configData.color2);
playPauseButton.registerEvent(com.google.youtube.event.GenericButtonEvent.PLAY, com.google.chianti.event.EventDelegate.create(videoPlayer, videoPlayer.play));
playPauseButton.registerEvent(com.google.youtube.event.GenericButtonEvent.PAUSE, com.google.chianti.event.EventDelegate.create(videoPlayer, videoPlayer.pause));
videoControls.addControl(playPauseButton);
seekBar = com.google.youtube.players.ui.SeekBar(videoControls.attachMovie(com.google.youtube.players.ui.SeekBar.LINK_NAME, "seekBar", videoControls.getNextHighestDepth()));
seekBar.init(configData.color1, configData.color2, configData.showCuePoints == "1");
seekBar._y = 9;
seekBar.registerEvent(com.google.youtube.event.GenericButtonEvent.RELEASE, com.google.chianti.event.EventDelegate.create(this, onSeekBarRelease));
seekBar.registerEvent(com.google.youtube.event.UIEvent.SEEK, com.google.chianti.event.EventDelegate.create(this, onVideoControlsSeek));
seekBar.registerEvent(com.google.youtube.event.GenericButtonEvent.PRESS, com.google.chianti.event.EventDelegate.create(this, onSeekBarPressed));
videoControls.addControl(seekBar);
timeDisplay = com.google.youtube.players.ui.TimeDisplay(videoControls.attachMovie(com.google.youtube.players.ui.TimeDisplay.LINK_NAME, "timeDisplay", videoControls.getNextHighestDepth()));
timeDisplay.registerEvent(com.google.youtube.event.UIEvent.RESIZE, com.google.chianti.event.EventDelegate.create(videoControls, videoControls.updateLayout));
videoControls.addControl(timeDisplay);
volumeControl = com.google.youtube.players.ui.VolumeControl(videoControls.attachMovie(com.google.youtube.players.ui.VolumeControl.LINK_NAME, "volumeControl", videoControls.getNextHighestDepth()));
volumeControl.init(configData.CONTROLS_TOP_GRADIENT_COLOR, configData.color2);
volumeControl.setValue(soundController.getVolume(), true);
var _local2 = (soundController.getMute() ? (com.google.youtube.players.ui.VolumeControl.MUTED) : (com.google.youtube.players.ui.VolumeControl.UNMUTED));
volumeControl.setState(_local2);
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));
videoControls.addControl(volumeControl);
soundController.registerEvent(com.google.youtube.event.SoundEvent.VOLUME_CHANGE, com.google.chianti.event.EventDelegate.create(this, onVolumeChange));
menuControl = com.google.youtube.players.ui.MenuControl(videoControls.attachMovie(com.google.youtube.players.ui.MenuControl.LINK_NAME, "menuControl", videoControls.getNextHighestDepth()));
menuControl.init(configData.CONTROLS_TOP_GRADIENT_COLOR, configData.color2);
videoControls.addControl(menuControl);
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.BYTES_LOADED, com.google.chianti.event.EventDelegate.create(this, onBytesLoaded));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.META_LOAD, com.google.chianti.event.EventDelegate.create(this, onMetaLoaded));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.LOAD_NEW_VIDEO, com.google.chianti.event.EventDelegate.create(this, onLoadNewVideo));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.STATE_CHANGE, com.google.chianti.event.EventDelegate.create(this, onPlayStateChange));
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.SEEKING, com.google.chianti.event.EventDelegate.create(this, onVideoPlayerSeeking));
videoPlayer.registerEvent(com.google.youtube.event.VideoLoaderEvent.VIDEO_DATA_LOADED, com.google.chianti.event.EventDelegate.create(this, onVideoInfoLoad));
fullscreenButton = com.google.youtube.players.ui.FullscreenButton(videoControls.attachMovie(com.google.youtube.players.ui.FullscreenButton.LINK_NAME, "fullscreenButton", videoControls.getNextHighestDepth()));
var _local3 = videoControls.getControlIndex(menuControl);
var _local4 = ((_local3 >= 0) ? (_local3) : undefined);
videoControls.addControl(fullscreenButton, _local4);
fullscreenButton.registerEvent(com.google.youtube.event.GenericButtonEvent.RELEASE, com.google.chianti.event.EventDelegate.create(this, onFullScreenButton));
fullscreenButton.init(configData.CONTROLS_TOP_GRADIENT_COLOR, configData.color2);
}
function toggleModule(descriptor) {
if (descriptor.instance) {
unloadModule(descriptor);
} else {
loadModule(descriptor);
}
resizeEndScreen();
}
function getBaseClipForModule(descriptor) {
var _local3 = (descriptor.isTopmost ? (videoPlayer.getTopmostModuleDisplay()) : (videoPlayer.getModuleDisplay()));
return(_local3);
}
function unloadModule(descriptor) {
moduleMediator.destroyFromLabel(descriptor.label, videoPlayer, getBaseClipForModule(descriptor));
delete loadedModules[descriptor.label];
}
function loadModule(descriptor) {
moduleMediator.createFromLabel(descriptor.label, videoPlayer, getBaseClipForModule(descriptor));
loadedModules[descriptor.label] = descriptor;
}
function onDescriptorEvent(evt) {
toggleModule(evt.target);
}
function destroy() {
videoControls.destroy();
super.destroy();
}
function resizeEndScreen() {
var _local2 = videoPlayer.getViewportRect();
var _local3 = new com.google.geom.Rect(_local2.x, _local2.y, _local2.width, _local2.height);
var _local4 = moduleMediator.getReservedRectangleList(true);
var _local5 = 0;
for ( ; _local5 < _local4.length ; _local5++) {
var _local6 = _local4[_local5];
if (_local3.intersects(_local6)) {
if (_local6.y > _local3.y) {
_local3.bottom = _local6.y;
} else {
_local3.height = 0;
}
}
}
endScreen.setSize(_local2.x, _local2.y, _local2.width, _local2.height, false, _local2.height - _local3.height);
}
static function allowAdDomains() {
System.security.allowDomain("http://m1.2mdn.net");
System.security.allowDomain("http://ad.doubleclick.net");
System.security.allowDomain("http://n406lad.doubleclick.net");
System.security.allowDomain("http://pagead2.googlesyndication.com/pagead");
}
static var SINGLE = "single";
static var DEFAULT_BUTTON_HIDE_DELAY = 3000;
static var DEFAULT_VIDEO_DISPLAY_X = 0;
static var DEFAULT_VIDEO_DISPLAY_Y = 0;
static var DEFAULT_STAGE_WIDTH = 480;
static var DEFAULT_STAGE_HEIGHT = 413;
static var VIDEO_BG_DEPTH = 17;
static var VIDEO_PLAYER_DEPTH = 20;
static var VIDEO_CONTROLS_DEPTH = 30;
var buttonHideDelay = DEFAULT_BUTTON_HIDE_DELAY;
var towardsEndOfMovieMarker = 101;
}
Symbol 20530 MovieClip [__Packages.com.google.youtube.players.yva.Controller] Frame 0
class com.google.youtube.players.yva.Controller extends com.google.youtube.players.SinglePlayerController
{
var rootMc, overallHolder, configData, soundController, saveSoundSettings, statsLogger, onInited, isAdAutoPlay, volumeControl, videoPlayer, videoId, locale, canVote, currentVideoData, isStarted, getURL, endScreen, playCompletedOnce, autoplayCompleted, videoControls, yvaInfo, largePlayButton, menuControl, fullscreenButton, playPauseButton, loadVideoByVideoData;
function Controller () {
super();
}
function init(mc) {
rootMc = mc;
overallHolder = rootMc.createEmptyMovieClip("overallHolder", 1);
configData = com.google.youtube.players.Config.getPlayerInstance();
soundController = com.google.youtube.players.SoundController.getPlayerInstance(rootMc, saveSoundSettings);
initData();
statsLogger = com.google.youtube.logging.YouTubeStatsLogger.getPlayerInstance(rootMc);
statsLogger.init(configData);
onInited();
if (isAdAutoPlay) {
soundController.mute(true, true);
volumeControl.setState(com.google.youtube.players.ui.VolumeControl.MUTED);
videoPlayer.play();
}
}
function initData() {
configData.eventLabel = com.google.youtube.logging.YouTubeStatsLogger.EVENT_LABEL_ADUNIT;
configData.playerLayoutStyle = com.google.youtube.logging.YouTubeStatsLogger.PLAYER_STYLE_YVA;
configData.playerType = com.google.youtube.logging.YouTubeStatsLogger.IMPRESSION_TYPE_AD_EMBED;
videoId = configData.videoId;
locale = configData.interfaceLanguage;
canVote = ((configData.getUntypedFlashVars().canv && (configData.getUntypedFlashVars().canv.toLowerCase() != "false")) ? true : false);
isAdAutoPlay = ((configData.getUntypedFlashVars().adAutoPlay && (configData.getUntypedFlashVars().adAutoPlay.toLowerCase() != "false")) ? true : false);
currentVideoData = com.google.youtube.players.VideoData.createFromDictionary({id:videoId});
configData.messages = new com.google.youtube.util.YvaMessages(("xlb/" + locale) + ".xlb", locale);
}
function onVideoDisplayRelease() {
if (isStarted != true) {
onPlayButtonPressed();
} else {
videoPlayer.pause();
var _local2 = ((configData.BASE_YT_URL + "?v=") + videoId) + "&feature=yva";
getURL(_local2, "_blank");
}
}
function onVideoPlayerPlay(evt) {
if (!isAdAutoPlay) {
super.onVideoPlayerPlay(evt);
getMotif().hideThumbnail();
}
}
function onVideoPlayerEnd(evt) {
if (!isAdAutoPlay) {
endScreen.show();
var _local4 = 0;
for ( ; _local4 <= canLogPlayEvent.length ; _local4++) {
if (canLogPlayEvent[_local4].active) {
logPlayEvent(canLogPlayEvent[_local4].count);
canLogPlayEvent[_local4].active = false;
}
}
logPlayEvent(100);
playCompletedOnce = true;
super.onVideoPlayerEnd(evt);
} else {
showThumbnail();
}
}
function onVideoPlayerBuffering(evt) {
videoPlayer.showVideoDisplayBg();
videoPlayer.showVideoDisplay();
if (!isAdAutoPlay) {
super.onVideoPlayerBuffering(evt);
}
}
function onPlayStateChange(evt) {
if (!isAdAutoPlay) {
super.onPlayStateChange(evt);
}
}
function onBytesLoaded(evt) {
if (!isAdAutoPlay) {
super.onBytesLoaded(evt);
}
}
function onProgress(evt) {
if (!isAdAutoPlay) {
super.onProgress(evt);
trackQuartiles(evt);
return(undefined);
}
if ((evt.data.currentTime > AUTOPLAY_LENGTH_LIMIT) && (!autoplayCompleted)) {
autoplayCompleted = true;
showThumbnail();
}
}
function showThumbnail() {
getMotif().showThumbnail();
videoPlayer.hideVideoDisplayBg();
videoPlayer.hideVideoDisplay();
}
function trackQuartiles(evt) {
var _local3 = (evt.data.currentTime / evt.data.duration) * 100;
if ((videoPlayer.getPlayState() != com.google.youtube.players.VideoPlayer.PLAYING) || (_global.isNaN(_local3))) {
return(undefined);
}
var _local4 = canLogPlayEvent.length - 1;
var _local5 = _local4;
for ( ; _local5 >= 0 ; _local5--) {
if (!canLogPlayEvent[_local5].active) {
break;
}
if (canLogPlayEvent[_local5].count <= _local3) {
logPlayEvent(canLogPlayEvent[_local5].count);
canLogPlayEvent[_local5].active = false;
}
}
}
function onSeekBarRelease(evt) {
if (!isAdAutoPlay) {
super.onSeekBarRelease(evt);
} else {
onPlayButtonPressed();
}
}
function onSeekBarPressed() {
if (!isAdAutoPlay) {
super.onSeekBarPressed();
} else {
onPlayButtonPressed();
}
}
function onVolumeControlChange(evt) {
if (!isAdAutoPlay) {
super.onVolumeControlChange(evt);
} else {
onPlayButtonPressed();
}
}
function onVolumeControlUnMute() {
if (!isAdAutoPlay) {
super.onVolumeControlUnMute();
} else {
onPlayButtonPressed();
}
}
function onResize() {
overallHolder._visible = true;
resizePlayer(DEFAULT_STAGE_WIDTH, DEFAULT_STAGE_HEIGHT);
}
function resizePlayer(newWidth, newHeight) {
super.resizePlayer(newWidth, newHeight);
endScreen.setSize(0, 0, videoControls.getSize().width, videoPlayer.getViewportRect().height);
yvaInfo.setLocation(videoControls._x, (videoControls._y + com.google.youtube.players.ui.VideoControls.CONTROLS_DEFAULT_HEIGHT) + 4);
}
function build() {
overallHolder._visible = false;
videoPlayer = com.google.youtube.players.YvaVideoPlayer(overallHolder.attachMovie(com.google.youtube.players.YvaVideoPlayer.LINK_NAME, "videoPlayer", overallHolder.getNextHighestDepth()));
super.build();
videoPlayer.init(configData, soundController);
videoPlayer.hideVideoDisplayBg();
videoPlayer.hideVideoDisplay();
largePlayButton.onRelease = com.google.chianti.event.EventDelegate.create(this, onPlayButtonPressed);
yvaInfo = com.google.youtube.players.yva.YvaInfo(overallHolder.attachMovie(com.google.youtube.players.yva.YvaInfo.LINK_NAME, "yvaInfo", overallHolder.getNextHighestDepth()));
yvaInfo.registerEvent(com.google.youtube.event.VideoInfoEvent.TITLE_CLICKED, com.google.chianti.event.EventDelegate.create(this, logWatchEvent));
yvaInfo.registerEvent(com.google.youtube.event.VideoInfoEvent.AUTHOR_CLICKED, com.google.chianti.event.EventDelegate.create(this, logChannelEvent));
yvaInfo.registerEvent(com.google.youtube.event.VideoInfoEvent.COMMENTS_CLICKED, com.google.chianti.event.EventDelegate.create(this, logCommentsEvent));
yvaInfo.registerEvent(com.google.youtube.event.VideoInfoEvent.RATING_SET, com.google.chianti.event.EventDelegate.create(this, logRatingsEvent));
yvaInfo.registerEvent(com.google.youtube.event.DataEvent.LOAD, com.google.chianti.event.EventDelegate.create(this, logImpressionEvent));
yvaInfo.init(configData, canVote, videoId);
endScreen = com.google.youtube.players.ui.EndScreen(overallHolder.attachMovie(com.google.youtube.players.ui.EndScreen.LINK_NAME, "endScreen", overallHolder.getNextHighestDepth()));
endScreen.registerEvent(com.google.youtube.event.GenericButtonEvent.RELEASE, com.google.chianti.event.EventDelegate.create(this, onReplay));
endScreen.init(configData.messages);
endScreen.setVideoPlayer(videoPlayer);
endScreen.swapDepths(videoControls);
endScreen.hide(true);
}
function buildVideoControls() {
super.buildVideoControls();
videoControls.removeControl(menuControl);
videoControls.removeControl(fullscreenButton);
playPauseButton.unregisterAll(com.google.youtube.event.GenericButtonEvent.PLAY);
playPauseButton.registerEvent(com.google.youtube.event.GenericButtonEvent.PLAY, com.google.chianti.event.EventDelegate.create(this, onPlayButtonPressed));
}
function onPlayButtonPressed() {
if (isAdAutoPlay) {
isAdAutoPlay = false;
soundController.unMute(false);
volumeControl.setState(com.google.youtube.players.ui.VolumeControl.UNMUTED);
playPauseButton.setState(com.google.youtube.players.ui.PlayPauseButton.PLAYING);
var _local2 = (configData.appendVars ? (configData.appendVars) : "");
var _local3 = "&yva_preview=";
var _local4 = _local2.indexOf(_local3);
if (_local4 != -1) {
var _local5 = _local2.substr(0, _local4 + _local3.length);
var _local6 = _local2.substr((_local4 + _local3.length) + 1);
configData.appendVars = (_local5 + "0") + _local6;
} else {
configData.appendVars = _local2 + "&yva_preview=0";
}
loadVideoByVideoData(currentVideoData);
} else {
videoPlayer.play();
}
endScreen.hide();
if (isStarted) {
return(undefined);
}
isStarted = true;
hideLargePlayButton();
getMotif().logClickToPlayEvent();
}
function onReplay() {
resetTrackingCounters();
videoPlayer.play();
endScreen.hide();
logReplayEvent();
}
function resetTrackingCounters() {
var _local2 = 0;
for ( ; _local2 < canLogPlayEvent.length ; _local2++) {
canLogPlayEvent[_local2].active = true;
}
}
function hideLargePlayButton() {
if (!isAdAutoPlay) {
super.hideLargePlayButton();
}
}
function getMotif() {
if (configData.getUntypedFlashVars().yvaMotif) {
return(eval (configData.getUntypedFlashVars().yvaMotif));
}
return(_level0);
}
function logPlayEvent(percent) {
getMotif().log_play_event(percent);
}
function logReplayEvent() {
getMotif().logReplayEvent();
}
function logRatingsEvent() {
getMotif().logRatingsEvent();
}
function logChannelEvent() {
getMotif().logChannelEvent();
}
function logWatchEvent() {
getMotif().logWatchEvent();
}
function logCommentsEvent() {
getMotif().logCommentsEvent();
}
function logImpressionEvent() {
getMotif().logImpressionEvent();
}
static var DEFAULT_STAGE_HEIGHT = 250;
static var DEFAULT_STAGE_WIDTH = 300;
static var AUTOPLAY_LENGTH_LIMIT = 30;
var canLogPlayEvent = [{count:0, active:true}, {count:25, active:true}, {count:50, active:true}, {count:75, active:true}];
}
Symbol 20531 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 20532 MovieClip [__Packages.com.google.youtube.players.modules.ModuleDescriptor] Frame 0
class com.google.youtube.players.modules.ModuleDescriptor extends com.google.youtube.AbstractElement
{
var broadcast;
function ModuleDescriptor () {
super();
}
function notify() {
broadcast({target:this, type:com.google.youtube.event.DataEvent.SET});
}
}
Symbol 20533 MovieClip [__Packages.com.google.youtube.players.modules.AdModuleDescriptor] Frame 0
class com.google.youtube.players.modules.AdModuleDescriptor extends com.google.youtube.players.modules.ModuleDescriptor
{
var loadPolicy, uid, isTopmost, label, path, enabled;
function AdModuleDescriptor () {
super();
loadPolicy = com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_ALWAYS;
uid = 1;
isTopmost = true;
label = "ad_module";
path = "http://www.youtube.com/swf/ad.swf";
enabled = true;
}
}
Symbol 20534 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, 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;
}
function restoreSoundOptions() {
setVolume(soundSharedObjectData.volume);
currentVolume = soundSharedObjectData.volume;
if (soundSharedObjectData.mute) {
mute();
}
}
function setVolume(newVolume, cancelBroadcast) {
if ((newVolume != undefined) && ((!soundSharedObjectData.mute) && (!infringeMute))) {
var _local4 = Math.round(newVolume);
_local4 = Math.min(_local4, 100);
_local4 = Math.max(_local4, 0);
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() {
return(currentVolume);
}
function mute(doBroadcast, bypassSharedObject_opt) {
currentVolume = soundSharedObjectData.volume;
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) {
if (!infringeMute) {
if ((!bypassSharedObject_opt) && (saveSettings)) {
soundSharedObjectData.mute = false;
soundSharedObject.flush();
}
muted = false;
if (!skipRestoreVolume) {
setVolume(currentVolume);
}
broadcast({type:com.google.youtube.event.SoundEvent.UNMUTE, target:this});
}
}
function getMute() {
return(muted);
}
function getSoundMC() {
return(soundMovieClip);
}
static var SOUND_DATA_SO_KEY = "soundData";
}
Symbol 20535 MovieClip [__Packages.com.google.youtube.util.IMessages] Frame 0
class com.google.youtube.util.IMessages implements com.google.youtube.IBroadcaster
{
function IMessages () {
}
}
Symbol 20536 MovieClip [__Packages.com.google.youtube.util.Messages] Frame 0
class com.google.youtube.util.Messages extends com.google.youtube.AbstractBroadcaster implements com.google.youtube.util.IMessages
{
var messages, locale, xlbUrl, xmlData, broadcast;
function Messages (xlbFileUrl, loc) {
super();
messages = {};
registerMsg(ERROR_VIDEO_NO_LONGER_AVAILABLE, ERROR_VIDEO_NO_LONGER_AVAILABLE_STRING);
registerMsg(ERROR_NO_VIDEOS_AVAILABLE, ERROR_NO_VIDEOS_AVAILABLE_STRING);
registerMsg(ERROR_VIDEO_EMBEDDING_DISALLOWED, ERROR_VIDEO_EMBEDDING_DISALLOWED_STRING);
registerMsg(ERROR_NO_VIDEOS_FOUND, ERROR_NO_VIDEOS_FOUND_STRING);
registerMsg(ERROR_GENERIC, ERROR_GENERIC_STRING);
registerMsg(REPLAY, REPLAY_STRING);
registerMsg(ANNOTATIONS_ON, ANNOTATIONS_ON_STRING);
registerMsg(ANNOTATIONS_OFF, ANNOTATIONS_OFF_STRING);
registerMsg(ANNOTATIONS_UNAVAILABLE, ANNOTATIONS_UNAVAILABLE_STRING);
registerMsg(CAPTIONS_ON, CAPTIONS_ON_STRING);
registerMsg(CAPTIONS_OFF, CAPTIONS_OFF_STRING);
registerMsg(CAPTIONS_UNAVAILABLE, CAPTIONS_UNAVAILABLE_STRING);
registerMsg(MORE_MENU_ITEM, MORE_MENU_ITEM_STRING);
locale = (((loc != undefined) && (loc != "")) ? (loc) : (LOCALE_EN));
xlbUrl = xlbFileUrl;
xmlData = new com.google.youtube.data.XMLData(true);
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 registerMsg(key, msg) {
messages[key.toLowerCase()] = msg;
}
function getMsg(key, placeholders) {
var _local4 = messages[key.toLowerCase()];
for (var x in placeholders) {
_local4 = _local4.split(x).join(placeholders[x]);
}
return(_local4);
}
function isLoaded() {
return(loaded);
}
function load() {
if (locale != LOCALE_EN) {
xmlData.loadXML(xlbUrl);
loaded = true;
}
}
function onDataLoad(evt) {
var _local3 = evt.data.messages.msg;
var _local4 = 0;
for ( ; _local4 < _local3.length ; _local4++) {
registerMsg(_local3[_local4].name, _local3[_local4]._value);
}
broadcast({type:com.google.youtube.event.MessagesEvent.UPDATE, target:this});
}
function onDataLoadError(evt) {
}
static var LOCALE_EN = "en";
static var ERROR_VIDEO_NO_LONGER_AVAILABLE = "videonotavailable";
static var ERROR_NO_VIDEOS_AVAILABLE = "videosnotselected";
static var ERROR_VIDEO_EMBEDDING_DISALLOWED = "videoembeddingdisabled";
static var ERROR_NO_VIDEOS_FOUND = "videosnotfound";
static var ERROR_GENERIC = "genericerror";
static var REPLAY = "replay";
static var ANNOTATIONS_ON = "ANNOTATIONS_ON";
static var ANNOTATIONS_OFF = "ANNOTATIONS_OFF";
static var ANNOTATIONS_UNAVAILABLE = "ANNOTATIONS_UNAVAILABLE";
static var CAPTIONS_ON = "CAPTIONS_ON";
static var CAPTIONS_OFF = "CAPTIONS_OFF";
static var CAPTIONS_UNAVAILABLE = "CAPTIONS_UNAVAILABLE";
static var MORE_MENU_ITEM = "MORE_MENU_ITEM";
static var ERROR_VIDEO_NO_LONGER_AVAILABLE_STRING = "We're sorry, this video is no longer available.";
static var ERROR_VIDEO_EMBEDDING_DISALLOWED_STRING = "Embedding is disabled for this video.";
static var ERROR_NO_VIDEOS_AVAILABLE_STRING = "We're sorry, " + "no embeddable videos are currently selected for this player.";
static var ERROR_NO_VIDEOS_FOUND_STRING = "We're sorry, no videos were found.";
static var ERROR_GENERIC_STRING = "An error occurred, please try again later.";
static var REPLAY_STRING = "Replay";
static var ANNOTATIONS_ON_STRING = "Turn on Annotations";
static var ANNOTATIONS_OFF_STRING = "Turn off Annotations";
static var ANNOTATIONS_UNAVAILABLE_STRING = "Annotations are not available";
static var CAPTIONS_ON_STRING = "Turn on Captions";
static var CAPTIONS_OFF_STRING = "Turn off Captions";
static var CAPTIONS_UNAVAILABLE_STRING = "Captions are not available";
static var MORE_MENU_ITEM_STRING = "(more)";
var loaded = false;
}
Symbol 20537 MovieClip [__Packages.com.google.youtube.util.YvaMessages] Frame 0
class com.google.youtube.util.YvaMessages extends com.google.youtube.util.Messages
{
var registerMsg;
function YvaMessages (xlbUrl, locale) {
super(xlbUrl, locale);
registerMsg(FROM, FROM_STRING);
registerMsg(SHARE, SHARE_STRING);
registerMsg(VIEWS, VIEWS_STRING);
registerMsg(COMMENTS, COMMENTS_STRING);
registerMsg(RATING, RATING_STRING);
registerMsg(LOGIN_TO_RATE, LOGIN_TO_RATE_STRING);
registerMsg(RATE_THIS_VIDEO, RATE_THIS_VIDEO_STRING);
registerMsg(THANKS_FOR_RATING, THANKS_FOR_RATING_STRING);
registerMsg(AWESOME, AWESOME_STRING);
registerMsg(PRETTY_COOL, PRETTY_COOL_STRING);
registerMsg(WORTH_WATCHING, WORTH_WATCHING_STRING);
registerMsg(POOR, POOR_STRING);
registerMsg(NOTHING_SPECIAL, NOTHING_SPECIAL_STRING);
}
static var FROM = "from";
static var SHARE = "share";
static var VIEWS = "views";
static var WATCH_AGAIN = "watchAgain";
static var COMMENTS = "comments";
static var RATING = "ratings";
static var LOGIN_TO_RATE = "loginToRate";
static var RATE_THIS_VIDEO = "rateThisVideo";
static var THANKS_FOR_RATING = "thanksForRating";
static var AWESOME = "awesome";
static var PRETTY_COOL = "prettyCool";
static var WORTH_WATCHING = "worthWatching";
static var NOTHING_SPECIAL = "nothingSpecial";
static var POOR = "poor";
static var FROM_STRING = "From:";
static var SHARE_STRING = "Share";
static var VIEWS_STRING = "Views";
static var COMMENTS_STRING = "Comments:";
static var RATING_STRING = "RATING_COUNT_1 ratings";
static var RATE_THIS_VIDEO_STRING = "Rate this video";
static var LOGIN_TO_RATE_STRING = "Login to rate video";
static var THANKS_FOR_RATING_STRING = "Thanks for rating!";
static var AWESOME_STRING = "Awesome!";
static var PRETTY_COOL_STRING = "Pretty Cool";
static var WORTH_WATCHING_STRING = "Worth Watching";
static var NOTHING_SPECIAL_STRING = "Nothing Special";
static var POOR_STRING = "Poor";
}
Symbol 20538 MovieClip [__Packages.com.google.youtube.players.modules.IPlayerModuleAdapter] Frame 0
class com.google.youtube.players.modules.IPlayerModuleAdapter
{
function IPlayerModuleAdapter () {
}
}
Symbol 20539 MovieClip [__Packages.com.google.youtube.players.modules.ModuleAdapter] Frame 0
class com.google.youtube.players.modules.ModuleAdapter extends com.google.youtube.AbstractElement implements com.google.youtube.players.modules.IPlayerModuleAdapter
{
static var playerController;
var moduleMediator, videoPlayer, modulePath, moduleHolder, createEmptyMovieClip, moduleLoader, module, onEnd, onNewVideoLoad, onPause, onPlay, onProgress, onSeek, onPlaylistScroll, onPlaylistClipSelected, onResize, onStartResize, onModuleEventHandler;
function ModuleAdapter () {
super();
}
function init(mm, ipc, vp, path) {
moduleMediator = mm;
playerController = ipc;
videoPlayer = vp;
modulePath = path;
moduleHolder = createEmptyMovieClip("moduleHolder", moduleLoadLevel);
initData(ipc);
}
function initData(ipc) {
moduleLoader = new MovieClipLoader();
moduleLoader.addListener(this);
moduleLoader.loadClip(modulePath, moduleHolder);
}
function onInited() {
if (moduleStatus == com.google.youtube.players.modules.ModuleStatus.ERROR) {
} else {
module = moduleHolder.createInstance();
addListeners();
var _local2 = getModuleConfigData();
module.init(this, _local2);
}
}
function getCurrentTime() {
return(videoPlayer.getCurrentTime());
}
function getCurrentVideoData() {
return(videoPlayer.getCurrentVideoData());
}
function getDisplayRect() {
var _local2 = videoPlayer.getDisplayRect();
var _local3 = getViewportRect();
var _local4 = _local2;
_local4.x = _local4.x - _local3.x;
_local4.y = _local4.y - _local3.y;
return(_local4);
}
function getReservedRectangleList(isTopMost) {
return(moduleMediator.getReservedRectangleList(isTopMost));
}
function getViewportRect() {
return(videoPlayer.getViewportRect());
}
function getDuration() {
return(videoPlayer.getDuration());
}
function getModuleConfigData() {
return(moduleMediator.getModuleConfigData(videoPlayer));
}
function getPlayState() {
return(videoPlayer.getPlayState());
}
function getVolume() {
return(playerController.getVolume());
}
function getIsMuted() {
return(playerController.isMuted());
}
function getReservedRect() {
if (moduleStatus != com.google.youtube.players.modules.ModuleStatus.LOADED) {
return(new com.google.geom.Rect(0, 0, 0, 0));
}
return(module.getReservedRect());
}
function getStatus() {
if (moduleStatus != com.google.youtube.players.modules.ModuleStatus.LOADED) {
return(moduleStatus);
}
return(module.getStatus());
}
function isEmbeddedPlayer() {
return(playerController.isEmbeddedPlayer());
}
function getSubmenu(holder) {
if ((moduleStatus == com.google.youtube.players.modules.ModuleStatus.LOADED) && (module.getSubmenu)) {
return(module.getSubmenu(holder));
}
return(undefined);
}
function onLoadStart(mc) {
moduleStatus = com.google.youtube.players.modules.ModuleStatus.LOADING;
}
function onLoadProgress(mc, loadedBytes, totalBytes) {
}
function onLoadError(mc, errorCode, httpStatus) {
moduleStatus = com.google.youtube.players.modules.ModuleStatus.ERROR;
onInited();
}
function onLoadInit(mc) {
moduleStatus = com.google.youtube.players.modules.ModuleStatus.LOADED;
onInited();
}
function onLoadComplete(mc, httpStatus) {
}
function addListeners() {
if (module && (module.getStatus())) {
onEnd = com.google.chianti.event.EventDelegate.create(module, module.onEnd);
onNewVideoLoad = com.google.chianti.event.EventDelegate.create(module, module.onNewVideoLoad);
onPause = com.google.chianti.event.EventDelegate.create(module, module.onPause);
onPlay = com.google.chianti.event.EventDelegate.create(module, module.onPlay);
onProgress = com.google.chianti.event.EventDelegate.create(module, module.onProgress);
onSeek = com.google.chianti.event.EventDelegate.create(module, module.onSeek);
onPlaylistScroll = com.google.chianti.event.EventDelegate.create(module, module.onPlaylistScroll);
onPlaylistClipSelected = com.google.chianti.event.EventDelegate.create(module, module.onPlaylistClipSelected);
onResize = com.google.chianti.event.EventDelegate.create(module, module.onResize);
onStartResize = com.google.chianti.event.EventDelegate.create(module, module.onStartResize);
onModuleEventHandler = com.google.chianti.event.EventDelegate.create(this, onModuleEvent);
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.END, onEnd);
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.LOAD_NEW_VIDEO, onNewVideoLoad);
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.PAUSE, onPause);
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.PLAY, onPlay);
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.PROGRESS, onProgress);
videoPlayer.registerEvent(com.google.youtube.event.VideoPlayerEvent.SEEKING, onSeek);
videoPlayer.registerEvent(com.google.youtube.event.UIEvent.RESIZE, onResize);
videoPlayer.registerEvent(com.google.youtube.event.UIEvent.START_RESIZE, onStartResize);
playerController.registerEvent(com.google.youtube.event.PlaylistEvent.PLAYLIST_SCROLL, onPlaylistScroll);
playerController.registerEvent(com.google.youtube.event.PlaylistEvent.CLIP_SELECTED, onPlaylistClipSelected);
module.registerEvent(com.google.youtube.event.ModuleEvent.PLAY, onModuleEventHandler);
module.registerEvent(com.google.youtube.event.ModuleEvent.PAUSE, onModuleEventHandler);
module.registerEvent(com.google.youtube.event.ModuleEvent.SEEK, onModuleEventHandler);
module.registerEvent(com.google.youtube.event.ModuleEvent.ENABLE, onModuleEventHandler);
module.registerEvent(com.google.youtube.event.ModuleEvent.DISABLE, onModuleEventHandler);
module.registerEvent(com.google.youtube.event.ModuleEvent.ADD_MARKER, onModuleEventHandler);
module.registerEvent(com.google.youtube.event.ModuleEvent.REMOVE_MARKERS, onModuleEventHandler);
module.registerEvent(com.google.youtube.event.ModuleEvent.HIDE_END_SCREEN, onModuleEventHandler);
module.registerEvent(com.google.youtube.event.ModuleEvent.SHOW_END_SCREEN, onModuleEventHandler);
}
}
function removeListeners() {
if (module && (module.getStatus())) {
videoPlayer.unregisterEvent(com.google.youtube.event.VideoPlayerEvent.END, onEnd);
videoPlayer.unregisterEvent(com.google.youtube.event.VideoPlayerEvent.LOAD_NEW_VIDEO, onNewVideoLoad);
videoPlayer.unregisterEvent(com.google.youtube.event.VideoPlayerEvent.PAUSE, onPause);
videoPlayer.unregisterEvent(com.google.youtube.event.VideoPlayerEvent.PLAY, onPlay);
videoPlayer.unregisterEvent(com.google.youtube.event.VideoPlayerEvent.PROGRESS, onProgress);
videoPlayer.unregisterEvent(com.google.youtube.event.VideoPlayerEvent.SEEKING, onSeek);
videoPlayer.unregisterEvent(com.google.youtube.event.UIEvent.RESIZE, onResize);
videoPlayer.unregisterEvent(com.google.youtube.event.UIEvent.START_RESIZE, onStartResize);
playerController.unregisterEvent(com.google.youtube.event.PlaylistEvent.PLAYLIST_SCROLL, onPlaylistScroll);
playerController.unregisterEvent(com.google.youtube.event.PlaylistEvent.CLIP_SELECTED, onPlaylistClipSelected);
module.unregisterAll();
onEnd = undefined;
onNewVideoLoad = undefined;
onPause = undefined;
onPlay = undefined;
onProgress = undefined;
onSeek = undefined;
onPlaylistScroll = undefined;
onPlaylistClipSelected = undefined;
onResize = undefined;
onStartResize = undefined;
onModuleEventHandler = undefined;
}
}
function onModuleEvent(evt) {
moduleMediator.onModuleEvent(evt, videoPlayer);
}
function destroy() {
removeListeners();
module.destroy();
}
static var LINK_NAME = "__Packages.com.google.youtube.players.modules.ModuleAdapter";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.modules.ModuleAdapter);
var moduleLoadLevel = 2;
var moduleStatus = com.google.youtube.players.modules.ModuleStatus.NOT_LOADED;
}
Symbol 20540 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 20541 MovieClip [__Packages.com.google.youtube.event.StarRatingEvent] Frame 0
class com.google.youtube.event.StarRatingEvent
{
function StarRatingEvent () {
}
static var RATING_RELEASE = "onRatingRelease";
static var RATING_ROLLOVER = "onRatingRollover";
static var RATING_ROLLOUT = "onRatingRollOut";
}
Symbol 20542 MovieClip [__Packages.com.google.youtube.players.ui.ITooltip] Frame 0
class com.google.youtube.players.ui.ITooltip
{
function ITooltip () {
}
}
Symbol 20543 MovieClip [__Packages.com.google.youtube.players.ui.Tooltip] Frame 0
class com.google.youtube.players.ui.Tooltip implements com.google.youtube.players.ui.ITooltip
{
var targetMc, tooltipBottomOffset, isActive, tooltipBgColor, tooltipText, tooltipIconClip, tooltipClip, alertInterval, tooltipTextField;
function Tooltip (target, bottomOffset, opt_bgColor) {
targetMc = target;
tooltipBottomOffset = bottomOffset;
isActive = false;
tooltipBgColor = opt_bgColor || (TOOLTIP_BG_COLOR);
buildTooltipClip();
}
static function createBottomOffsetTooltip(target, bottomOffset) {
return(new com.google.youtube.players.ui.Tooltip(target, bottomOffset));
}
static function createBottomOffsetErrorTooltip(target, bottomOffset) {
return(new com.google.youtube.players.ui.Tooltip(target, bottomOffset, ERROR_TOOLTIP_BG_COLOR));
}
function getTooltipText() {
return(tooltipText);
}
function setTooltipText(text) {
tooltipText = text;
makeTooltip();
}
function clearTooltipText() {
tooltipText = null;
makeTooltip();
}
function setTooltipIcon(resourceId) {
if (tooltipIconClip) {
tooltipIconClip.removeMovieClip();
tooltipIconClip = null;
}
tooltipIconClip = tooltipClip.attachMovie(resourceId, "tooltipIconClip", tooltipClip.getNextHighestDepth());
if (!tooltipIconClip) {
}
makeTooltip();
}
function clearTooltipIcon() {
tooltipIconClip.removeMovieClip();
tooltipIconClip = null;
makeTooltip();
}
function showTooltip() {
if (tooltipText.length > 0) {
isActive = true;
startShowTimer();
}
}
function hideTooltip() {
isActive = false;
clearTimer();
tooltipClip._visible = false;
}
function startShowTimer() {
if (alertInterval) {
clearTimer();
}
parentClips[_root].onMouseMove = com.google.chianti.event.EventDelegate.create(this, clearTimer);
alertInterval = _global.setInterval(this, "doRealShow", TOOLTIP_DELAY);
}
function clearTimer() {
parentClips[_root].onMouseMove = null;
_global.clearInterval(alertInterval);
alertInterval = null;
if (isActive) {
startShowTimer();
} else {
tooltipClip._visible = false;
}
}
function doRealShow() {
tooltipClip._visible = true;
_global.clearInterval(alertInterval);
}
function buildTooltipClip() {
tooltipClip = getTooltipClip();
if (!tooltipClip) {
return(undefined);
}
makeTooltip();
hideTooltip();
}
function makeTooltip() {
if (tooltipText.length <= 0) {
return(undefined);
}
if (tooltipClip.tooltipTextField) {
tooltipClip.tooltipTextField.removeTextField();
}
if (needWordWrap(tooltipText)) {
tooltipTextField = tooltipClip.createTextField("tooltipTextField", tooltipClip.getNextHighestDepth(), 0, 0, getTextFieldMaxWidth(), 0);
tooltipTextField.wordWrap = true;
} else {
tooltipTextField = tooltipClip.createTextField("tooltipTextField", tooltipClip.getNextHighestDepth(), 0, 0, 0, 0);
}
tooltipTextField.autoSize = TOOLTIP_TEXT_FIELD_AUTO_SIZE;
tooltipTextField.text = tooltipText;
tooltipTextField.setTextFormat(TOOLTIP_TEXT_FORMAT);
var _local2 = getWidth(tooltipTextField);
var _local3 = getHeight(tooltipTextField);
repositionTooltip(_local2, _local3);
drawTooltipBackground(_local2, _local3);
if (tooltipIconClip) {
drawTooltipIcon();
}
drawTooltipTextField();
}
function needWordWrap(text) {
var _local3 = getTextFieldMaxWidth();
var _local4 = tooltipClip.createTextField("testTextField", tooltipClip.getNextHighestDepth(), 0, 0, 0, 0);
_local4._alpha = 0;
_local4.text = text;
_local4.setTextFormat(TOOLTIP_TEXT_FORMAT);
var _local5 = _local4.textWidth;
var _local6 = false;
if (_local5 > _local3) {
_local6 = true;
} else {
_local6 = false;
}
_local4.removeTextField();
return(_local6);
}
function getTextFieldMaxWidth() {
var _local2 = TOOLTIP_MAX_WIDTH - (TOOLTIP_TEXT_LEFT_PAD + TOOLTIP_TEXT_RIGHT_PAD);
if (tooltipIconClip) {
_local2 = _local2 - ((tooltipIconClip._width + TOOLTIP_ICON_LEFT_PAD) + TOOLTIP_ICON_RIGHT_PAD);
}
return(_local2);
}
function repositionTooltip(width, height) {
var _local4 = {x:0, y:0};
targetMc.localToGlobal(_local4);
parentClips[_root].globalToLocal(_local4);
tooltipClip._x = _local4.x - (width + TOOLTIP_RIGHT_OFFSET);
tooltipClip._y = (_local4.y + tooltipBottomOffset) - height;
}
function getHeight(textField) {
var _local3 = (textField._height + TOOLTIP_TEXT_TOP_PAD) + TOOLTIP_TEXT_BOTTOM_PAD;
if (tooltipIconClip) {
var _local4 = (tooltipIconClip._height + TOOLTIP_ICON_TOP_PAD) + TOOLTIP_ICON_BOTTOM_PAD;
_local3 = Math.max(_local3, _local4);
}
return(_local3);
}
function getWidth(textField) {
var _local3 = (textField._width + TOOLTIP_TEXT_LEFT_PAD) + TOOLTIP_TEXT_RIGHT_PAD;
if (tooltipIconClip) {
_local3 = _local3 + ((tooltipIconClip._width + TOOLTIP_ICON_LEFT_PAD) + TOOLTIP_ICON_RIGHT_PAD);
}
return(_local3);
}
function drawTooltipBackground(width, height) {
tooltipClip.clear();
var _local4 = width;
var _local5 = height;
var _local6 = 0;
var _local7 = 0;
var _local8 = {thickness:TOOLTIP_BG_BORDER_LINESTYLE_THICKNESS, rgb:TOOLTIP_BG_SHADOW_COLOR, alpha:TOOLTIP_BG_OUTER_SHADOW_ALPHA, noScale:TOOLTIP_BG_BORDER_LINESTYLE_NO_SCALE};
var _local9 = _local6 - TOOLTIP_BG_OUTER_SHADOW_UPPER_LEFT_OFFSET;
var _local10 = _local7 - TOOLTIP_BG_OUTER_SHADOW_UPPER_LEFT_OFFSET;
var _local11 = (_local4 + TOOLTIP_BG_OUTER_SHADOW_UPPER_LEFT_OFFSET) + TOOLTIP_BG_OUTER_SHADOW_LOWER_RIGHT_OFFSET;
var _local12 = (_local5 + TOOLTIP_BG_OUTER_SHADOW_UPPER_LEFT_OFFSET) + TOOLTIP_BG_OUTER_SHADOW_LOWER_RIGHT_OFFSET;
var _local13 = TOOLTIP_BG_BORDER_CORNER_RADIUS + TOOLTIP_BG_OUTER_SHADOW_LOWER_RIGHT_OFFSET;
var _local14 = [_local13, _local13, _local13, _local13];
com.google.youtube.util.Drawing.drawRect(tooltipClip, _local9, _local10, _local11, _local12, null, _local8, _local14);
var _local15 = {thickness:TOOLTIP_BG_BORDER_LINESTYLE_THICKNESS, rgb:TOOLTIP_BG_SHADOW_COLOR, alpha:TOOLTIP_BG_MIDDLE_SHADOW_ALPHA, noScale:TOOLTIP_BG_BORDER_LINESTYLE_NO_SCALE};
var _local16 = _local6 + TOOLTIP_BG_MIDDLE_SHADOW_OFFSET;
var _local17 = _local7 + TOOLTIP_BG_MIDDLE_SHADOW_OFFSET;
var _local18 = TOOLTIP_BG_BORDER_CORNER_RADIUS + TOOLTIP_BG_MIDDLE_SHADOW_OFFSET;
var _local19 = [_local18, _local18, _local18, _local18];
com.google.youtube.util.Drawing.drawRect(tooltipClip, _local16, _local17, _local4, _local5, null, _local15, _local19);
var _local20 = {thickness:TOOLTIP_BG_BORDER_LINESTYLE_THICKNESS, rgb:TOOLTIP_BG_SHADOW_COLOR, alpha:TOOLTIP_BG_INNER_SHADOW_ALPHA, noScale:TOOLTIP_BG_BORDER_LINESTYLE_NO_SCALE};
var _local21 = _local6 + TOOLTIP_BG_INNER_SHADOW_OFFSET;
var _local22 = _local7 + TOOLTIP_BG_INNER_SHADOW_OFFSET;
var _local23 = TOOLTIP_BG_BORDER_CORNER_RADIUS + TOOLTIP_BG_INNER_SHADOW_OFFSET;
var _local24 = [_local23, _local23, _local23, _local23];
com.google.youtube.util.Drawing.drawRect(tooltipClip, _local21, _local22, _local4, _local5, null, _local20, _local24);
var _local25 = {thickness:TOOLTIP_BG_BORDER_LINESTYLE_THICKNESS, rgb:TOOLTIP_BG_BORDER_LINESTYLE_COLOR, alpha:TOOLTIP_BG_BORDER_LINESTYLE_ALPHA, noScale:TOOLTIP_BG_BORDER_LINESTYLE_NO_SCALE};
var _local26 = [TOOLTIP_BG_BORDER_CORNER_RADIUS, TOOLTIP_BG_BORDER_CORNER_RADIUS, TOOLTIP_BG_BORDER_CORNER_RADIUS, TOOLTIP_BG_BORDER_CORNER_RADIUS];
com.google.youtube.util.Drawing.drawRect(tooltipClip, _local6, _local7, _local4, _local5, tooltipBgColor, _local25, _local26);
}
function drawTooltipIcon() {
if (!tooltipIconClip) {
return(undefined);
}
tooltipIconClip._x = TOOLTIP_ICON_LEFT_PAD;
tooltipIconClip._y = TOOLTIP_ICON_TOP_PAD;
}
function drawTooltipTextField() {
var _local2 = TOOLTIP_TEXT_LEFT_PAD;
var _local3 = TOOLTIP_TEXT_TOP_PAD;
if (tooltipIconClip) {
_local2 = _local2 + ((tooltipIconClip._width + TOOLTIP_ICON_LEFT_PAD) + TOOLTIP_ICON_RIGHT_PAD);
}
tooltipTextField._x = _local2;
tooltipTextField._y = _local3;
tooltipTextField._visible = true;
}
static function setParentClip(tooltipParent) {
parentClips[_root] = tooltipParent;
}
static function getTooltipClip() {
var _local2 = parentClips[_root];
if (_local2) {
var _local3 = _local2.getNextHighestDepth();
return(_local2.createEmptyMovieClip("tooltip" + _local3, _local3));
}
}
static function buildTextFormat() {
var _local2 = new TextFormat();
_local2.font = TOOLTIP_TEXT_FONT;
_local2.size = TOOLTIP_TEXT_SIZE;
_local2.color = TOOLTIP_TEXT_COLOR;
return(_local2);
}
static var TOOLTIP_MAX_WIDTH = 185;
static var TOOLTIP_DELAY = 500;
static var TOOLTIP_RIGHT_OFFSET = 10;
static var TOOLTIP_BG_COLOR = 16777165;
static var TOOLTIP_BG_BORDER_CORNER_RADIUS = 3;
static var TOOLTIP_BG_BORDER_LINESTYLE_COLOR = 3355443;
static var TOOLTIP_BG_BORDER_LINESTYLE_THICKNESS = 1;
static var TOOLTIP_BG_BORDER_LINESTYLE_ALPHA = 100;
static var TOOLTIP_BG_BORDER_LINESTYLE_NO_SCALE = "none";
static var ERROR_TOOLTIP_BG_COLOR = 16706005;
static var TOOLTIP_BG_SHADOW_COLOR = 0;
static var TOOLTIP_BG_INNER_SHADOW_ALPHA = 47;
static var TOOLTIP_BG_INNER_SHADOW_OFFSET = 1;
static var TOOLTIP_BG_MIDDLE_SHADOW_ALPHA = 27;
static var TOOLTIP_BG_MIDDLE_SHADOW_OFFSET = 2;
static var TOOLTIP_BG_OUTER_SHADOW_ALPHA = 7;
static var TOOLTIP_BG_OUTER_SHADOW_UPPER_LEFT_OFFSET = 1;
static var TOOLTIP_BG_OUTER_SHADOW_LOWER_RIGHT_OFFSET = 3;
static var TOOLTIP_ICON_LEFT_PAD = 5;
static var TOOLTIP_ICON_RIGHT_PAD = 0;
static var TOOLTIP_ICON_TOP_PAD = 3;
static var TOOLTIP_ICON_BOTTOM_PAD = 2;
static var TOOLTIP_TEXT_LEFT_PAD = 5;
static var TOOLTIP_TEXT_RIGHT_PAD = 5;
static var TOOLTIP_TEXT_TOP_PAD = 2;
static var TOOLTIP_TEXT_BOTTOM_PAD = 2;
static var TOOLTIP_TEXT_SIZE = 10;
static var TOOLTIP_TEXT_FONT = "Arial,_sans";
static var TOOLTIP_TEXT_COLOR = 0;
static var TOOLTIP_TEXT_FIELD_AUTO_SIZE = "left";
static var parentClips = {};
static var TOOLTIP_TEXT_FORMAT = buildTextFormat();
}
Symbol 20544 MovieClip [__Packages.com.google.youtube.players.YvaVideoPlayer] Frame 0
class com.google.youtube.players.YvaVideoPlayer extends com.google.youtube.players.VideoPlayer
{
var videoDisplayBg, videoDisplay, clear, videoLoader, videoLoaded, cuedVideoData, currentVideoData, broadcast, setPlayState;
function YvaVideoPlayer () {
super();
}
function hideVideoDisplayBg() {
videoDisplayBg._alpha = 0;
}
function showVideoDisplayBg() {
videoDisplayBg._alpha = 100;
}
function hideVideoDisplay() {
videoDisplay._alpha = 0;
}
function showVideoDisplay() {
videoDisplay._alpha = 100;
}
function cueVideoByVideoData(videoData) {
if (!videoData.id) {
return(undefined);
}
clear();
videoLoader.reset();
videoLoaded = false;
cuedVideoData = videoData;
currentVideoData = null;
broadcast({type:com.google.youtube.event.VideoPlayerEvent.VIDEO_CUED, data:videoData, target:this});
setPlayState(com.google.youtube.players.VideoPlayer.VIDEO_CUED);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.YvaVideoPlayer";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.YvaVideoPlayer);
}
Symbol 20545 MovieClip [__Packages.com.google.youtube.players.CrossDomainer] Frame 0
class com.google.youtube.players.CrossDomainer
{
function CrossDomainer () {
}
static function allowDomainsForModuleHost() {
allowDomains();
}
static function allowDomainsForModules() {
allowDomains();
}
static function allowDomains() {
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");
}
}
Symbol 20546 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 20547 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 20548 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 20549 MovieClip [__Packages.com.google.youtube.players.ui.ReplayButton] Frame 0
class com.google.youtube.players.ui.ReplayButton extends com.google.youtube.AbstractElement
{
var broadcast, bgOver, useHandCursor, bg, createEmptyMovieClip, getNextHighestDepth, replayGraphic, attachMovie;
function ReplayButton () {
super();
build();
}
function onRelease() {
if (isEnabled) {
drawBgUpState();
broadcast({type:com.google.youtube.event.GenericButtonEvent.RELEASE, target:this});
}
}
function onRollOver() {
hover();
}
function onRollOut() {
drawBgUpState();
com.gs.TweenLite.to(bgOver, 0.18, {_alpha:0});
}
function onReleaseOutside() {
drawBgUpState();
}
function onPress() {
drawBgDownState();
}
function hover() {
com.gs.TweenLite.to(bgOver, 0.18, {_alpha:100});
}
function enable() {
isEnabled = true;
useHandCursor = true;
com.gs.TweenLite.to(this, 0.15, {_alpha:100});
}
function disable() {
isEnabled = false;
useHandCursor = false;
com.gs.TweenLite.to(this, 0.15, {_alpha:DISABLED_ALPHA});
}
function drawBgUpState() {
com.gs.TweenLite.to(bgOver, 0.18, {_alpha:0});
var _local2 = {colors:[16777215, 9737364], fillType:"linear", alphas:[100, 100], ratios:[50, 255], matrix:{matrixType:"box", x:0, y:0, w:BUTTON_WIDTH, h:BUTTON_HEIGHT, r:(90 / 180) * Math.PI}};
var _local3 = {thickness:0, rgb:0, alpha:40};
bg.clear();
com.google.youtube.util.Drawing.drawRect(bg, 0.5, 0.5, BUTTON_WIDTH, BUTTON_HEIGHT, _local2, _local3, CORNER_RADIUS);
}
function drawBgDownState() {
var _local2 = {colors:[16777215, 13421772], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0, y:0, w:BUTTON_WIDTH, h:BUTTON_HEIGHT, r:(90 / 180) * Math.PI}};
var _local3 = {thickness:0, rgb:0, alpha:40};
bg.clear();
com.google.youtube.util.Drawing.drawRect(bg, 0.5, 0.5, BUTTON_WIDTH, BUTTON_HEIGHT, _local2, _local3, CORNER_RADIUS);
}
function buildBgHover() {
var _local2 = {colors:[16777215, 16777215], fillType:"linear", alphas:[0, 60], ratios:[180, 255], matrix:{matrixType:"box", x:0, y:0, w:BUTTON_WIDTH, h:BUTTON_HEIGHT, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(bgOver, 0.5, 0.5, BUTTON_WIDTH, BUTTON_HEIGHT, _local2, null, CORNER_RADIUS);
}
function build() {
bg = createEmptyMovieClip("bg", getNextHighestDepth());
bgOver = createEmptyMovieClip("bgOver", getNextHighestDepth());
buildBgHover();
bgOver._alpha = 0;
drawBgUpState();
var _local2 = {colors:[16777215, 0], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:-3, y:-3, w:10, h:5, r:(90 / 180) * Math.PI}};
var _local3 = {alpha:50, thickness:0, color:0};
replayGraphic = attachMovie("ReplayButtonGraphic", "replayGraphic", getNextHighestDepth());
replayGraphic._x = 7;
replayGraphic._y = 3;
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.ReplayButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.ReplayButton);
var BUTTON_WIDTH = 30;
var BUTTON_HEIGHT = 22;
var CORNER_RADIUS = 5;
var DISABLED_ALPHA = 45;
var DOT_OFF_ALPHA = 55;
var isEnabled = true;
}
Symbol 20550 MovieClip [__Packages.com.google.youtube.players.ui.EndScreenReplayButton] Frame 0
class com.google.youtube.players.ui.EndScreenReplayButton extends com.google.youtube.players.ui.ReplayButton
{
var messages, label_txt, createTextField, getNextHighestDepth, _width;
function EndScreenReplayButton () {
super();
}
function init(messagesObj) {
messages = messagesObj;
messages.registerEvent(com.google.youtube.event.MessagesEvent.UPDATE, com.google.chianti.event.EventDelegate.create(this, onTextUpdate));
buildExtras();
}
function hideText() {
label_txt._visible = false;
}
function showText() {
label_txt._visible = true;
}
function onTextUpdate(evt) {
setText(messages.getMsg(com.google.youtube.util.Messages.REPLAY));
}
function setText(newText) {
label_txt.text = newText;
}
function buildExtras() {
var _local2 = new TextFormat();
_local2.size = 17;
_local2.color = 16777215 /* 0xFFFFFF */;
_local2.font = "_sans";
createTextField("label_txt", getNextHighestDepth(), _width + 3, 0, 100, 25);
label_txt.setNewTextFormat(_local2);
label_txt.selectable = false;
label_txt.autoSize = true;
label_txt.text = messages.getMsg(com.google.youtube.util.Messages.REPLAY);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.EndScreenReplayButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.EndScreenReplayButton);
}
Symbol 20551 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 20552 MovieClip [__Packages.com.google.youtube.players.ui.EndScreen] Frame 0
class com.google.youtube.players.ui.EndScreen extends com.google.youtube.players.ui.BaseEndScreen
{
var built, bg, replayButton, broadcast, attachMovie, getNextHighestDepth, messages;
function EndScreen () {
super();
}
function setSize(newX, newY, newWidth, newHeight, doSmoothTransition) {
if ((newWidth > 0) && (newHeight > 0)) {
if (!built) {
build(newWidth, newHeight);
}
if (doSmoothTransition) {
com.gs.TweenLite.to(bg, com.google.youtube.players.ui.BaseEndScreen.MENU_TRANSITION_SPEED, {_x:newX, _y:newY, _width:newWidth, _height:newHeight});
com.gs.TweenLite.to(replayButton, com.google.youtube.players.ui.BaseEndScreen.MENU_TRANSITION_SPEED, {_x:(newX + (newWidth / 2)) - (replayButton._width / 4), _y:(newY + (newHeight / 2)) - (replayButton._height / 2)});
} else {
bg._x = newX;
bg._y = newY;
bg._width = newWidth;
bg._height = newHeight;
updateButtonPositions(newX, newY, newWidth, newHeight);
}
}
}
function updateButtonPositions(newX, newY, newWidth, newHeight) {
replayButton._x = (newX + (newWidth / 2)) - (replayButton._width / 4);
replayButton._y = (newY + (newHeight / 2)) - (replayButton._height / 2);
}
function hideText() {
replayButton.hideText();
super.hideText();
}
function showText() {
replayButton.showText();
super.showText();
}
function onReplayRelease(evt) {
broadcast({type:com.google.youtube.event.GenericButtonEvent.RELEASE, target:this});
}
function build(bgWidth, bgHeight) {
super.build(bgWidth, bgHeight);
replayButton = com.google.youtube.players.ui.EndScreenReplayButton(attachMovie(com.google.youtube.players.ui.EndScreenReplayButton.LINK_NAME, "replayButton", getNextHighestDepth()));
replayButton.init(messages);
replayButton.registerEvent(com.google.youtube.event.GenericButtonEvent.RELEASE, com.google.chianti.event.EventDelegate.create(this, onReplayRelease));
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.EndScreen";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.EndScreen);
}
Symbol 20553 MovieClip [__Packages.com.google.youtube.players.modules.ModuleStatus] Frame 0
class com.google.youtube.players.modules.ModuleStatus
{
function ModuleStatus () {
}
static var NOT_LOADED = 0;
static var LOADING = 1;
static var LOADED = 2;
static var ERROR = 3;
}
Symbol 20554 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, currentValue, handle, broadcast, onEnterFrame, unhover, rollOver, rollOut, _ymouse, _xmouse, movePercent, hitArea, 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);
}
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 20555 MovieClip [__Packages.com.google.youtube.players.modules.VisibleModuleDescriptor] Frame 0
class com.google.youtube.players.modules.VisibleModuleDescriptor extends com.google.youtube.players.modules.ModuleDescriptor
{
var broadcast, notify, messages, enableMessageKey, disableMessageKey, unavailableMessageKey;
function VisibleModuleDescriptor () {
super();
}
function onRelease() {
broadcast({type:com.google.youtube.event.GenericButtonEvent.RELEASE, target:this});
notify();
}
function setMessages(m) {
messages = m;
}
function getEnableTooltip() {
if (messages) {
return(messages.getMsg(enableMessageKey));
}
return("");
}
function getDisableTooltip() {
if (messages) {
return(messages.getMsg(disableMessageKey));
}
return("");
}
function getUnavailableTooltip() {
if (messages) {
return(messages.getMsg(unavailableMessageKey));
}
return("");
}
}
Symbol 20556 MovieClip [__Packages.com.google.youtube.players.modules.IvModuleDescriptor] Frame 0
class com.google.youtube.players.modules.IvModuleDescriptor extends com.google.youtube.players.modules.VisibleModuleDescriptor
{
var loadPolicy, uid, label, path, iconClass, menuIndex, enabled, hasSubmenu, enableMessageKey, disableMessageKey, unavailableMessageKey;
function IvModuleDescriptor () {
super();
loadPolicy = com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_ALWAYS;
uid = 8;
label = "iv_module";
path = "http://www.youtube.com/swf/iv_module.swf";
iconClass = com.google.youtube.players.ui.IvIconMenuButton.LINK_NAME;
menuIndex = 3;
enabled = false;
hasSubmenu = false;
enableMessageKey = com.google.youtube.util.Messages.ANNOTATIONS_ON;
disableMessageKey = com.google.youtube.util.Messages.ANNOTATIONS_OFF;
unavailableMessageKey = com.google.youtube.util.Messages.ANNOTATIONS_UNAVAILABLE;
}
}
Symbol 20557 MovieClip [__Packages.com.google.youtube.players.ui.TimeDisplay] Frame 0
class com.google.youtube.players.ui.TimeDisplay extends com.google.youtube.AbstractElement implements com.google.youtube.ui.IVideoControl
{
var timeDisplay, _x, _y, createTextField, timeDisplayFormat, timeDisplayShadowFormat, timeDisplayShadow, currentSeconds, displayDuration, broadcast;
function TimeDisplay () {
super();
build();
}
function isResizable() {
return(false);
}
function hasDivider() {
return(false);
}
function getWidth() {
return(timeDisplay._width + (PADDING_SIDE * 2));
}
function getMinRequiredControlsWidth() {
return(225);
}
function setPosition(newX, newY) {
_x = newX;
_y = newY;
}
function setWidth(newWidth) {
}
function build() {
createTextField("timeDisplay", 2, PADDING_SIDE, PADDING_TOP, 10, 10);
timeDisplayFormat = new TextFormat();
timeDisplayFormat.color = 0;
timeDisplayFormat.size = 11;
timeDisplayFormat.font = "_sans";
timeDisplayFormat.align = "center";
timeDisplay = timeDisplay;
timeDisplay.autoSize = true;
timeDisplay.setNewTextFormat(timeDisplayFormat);
createTextField("timeDisplayShadow", 1, PADDING_SIDE + 1, PADDING_TOP + 1, 10, 10);
timeDisplayShadowFormat = new TextFormat();
timeDisplayShadowFormat.color = 14540253 /* 0xDDDDDD */;
timeDisplayShadowFormat.size = 11;
timeDisplayShadowFormat.font = "_sans";
timeDisplayShadowFormat.align = "center";
timeDisplayShadow = timeDisplayShadow;
timeDisplayShadow.selectable = false;
timeDisplayShadow.autoSize = true;
timeDisplayShadow.setNewTextFormat(timeDisplayShadowFormat);
setTime(0);
}
function setTime(seconds, newDuration, noDurationDisplay) {
seconds = Math.round(seconds);
if ((seconds == currentSeconds) && (((newDuration == duration) || (newDuration == undefined)) && (displayDuration == noDurationDisplay))) {
return(undefined);
}
if (newDuration != undefined) {
duration = newDuration;
}
displayDuration = noDurationDisplay;
currentSeconds = seconds;
var _local5 = com.google.youtube.util.StringUtil.secondsToTimeString(Math.round(duration), 3);
var _local6 = _local5.split(":").join("").length;
var _local7 = getWidth();
var _local8 = com.google.youtube.util.StringUtil.secondsToTimeString(seconds, _local6) + " / ";
if ((noDurationDisplay == undefined) || (noDurationDisplay == false)) {
_local8 = _local8 + _local5;
}
timeDisplay.text = (timeDisplayShadow.text = _local8);
if (_local7 != getWidth()) {
broadcast({type:com.google.youtube.event.UIEvent.RESIZE, target:this});
}
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.TimeDisplay";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.TimeDisplay);
static var PADDING_TOP = 2;
static var PADDING_SIDE = 3;
var duration = 0;
}
Symbol 20558 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 20559 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) {
if (fill != null) {
setFill(target, fill);
}
setLineStyle(target, lineStyle);
var _local11 = [];
if (typeof(radii) == "number") {
var _local12 = 0;
for ( ; _local12 < 4 ; _local12++) {
_local11[_local12] = radii;
}
} else {
_local11 = Array(radii);
}
if (!radii) {
target.moveTo(x, y);
target.lineTo(x + width, y);
target.lineTo(x + width, y + height);
target.lineTo(x, y + height);
target.lineTo(x, y);
} else {
target.moveTo(x + _local11[0], y);
target.lineTo((x + width) - _local11[1], y);
target.curveTo(x + width, y, x + width, y + _local11[1]);
target.lineTo(x + width, (y + height) - _local11[2]);
target.curveTo(x + width, y + height, (x + width) - _local11[2], y + height);
target.lineTo(x + _local11[3], y + height);
target.curveTo(x, y + height, x, (y + height) - _local11[3]);
target.lineTo(x, y + _local11[0]);
target.curveTo(x, y, x + _local11[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 TO_RADIANS = Math.PI / 180;
}
Symbol 20560 MovieClip [__Packages.com.google.youtube.players.ui.MenuControl] Frame 0
class com.google.youtube.players.ui.MenuControl extends com.google.youtube.ui.CompoundButton implements com.google.youtube.ui.IVideoControl
{
var buttonWidth, color1, color2, active, _x, _y, menuHolder, menuVisibleY, menuOriginalY, bg, buttonHeight, menuButtonsHolder, icon, menuBg, createEmptyMovieClip, getNextHighestDepth, includeMouseActivityOf, iconShadow;
function MenuControl () {
super();
buttonWidth = 33;
}
function init(c1, c2) {
color1 = c1;
color2 = c2;
active = false;
build();
}
function isResizable() {
return(false);
}
function hasDivider() {
return(true);
}
function getWidth() {
return(buttonWidth);
}
function getMinRequiredControlsWidth() {
return(320);
}
function setWidth(newWidth) {
}
function setPosition(newX, newY) {
_x = newX;
_y = newY;
}
function activate() {
showPopup();
drawIcon(true);
}
function deactivate() {
hidePopup();
drawIcon(false);
}
function showPopup() {
active = true;
com.gs.TweenLite.to(menuHolder, MENU_SHOW_HIDE_SPEED, {_y:menuVisibleY});
}
function hidePopup() {
active = false;
com.gs.TweenLite.to(menuHolder, MENU_SHOW_HIDE_SPEED, {_y:menuOriginalY});
}
function drawBgDownState() {
bg.clear();
var _local2 = {colors:[14671839, 16579836], fillType:"linear", alphas:[100, 100], ratios:[50, 200], matrix:{matrixType:"box", x:0, y:0, w:buttonWidth, h:buttonHeight, r:(90 / 180) * Math.PI}};
var _local3 = {thickness:0, rgb:13355979, alpha:100};
com.google.youtube.util.Drawing.drawRect(bg, 0, 0, buttonWidth, buttonHeight, _local2);
}
function addMenuItems(items) {
var _local3 = [];
var _local4 = items.length;
var _local6 = false;
var _local5 = 0;
for ( ; _local5 < _local4 ; _local5++) {
if (items[_local5].hasSubmenu) {
_local6 = true;
break;
}
}
_local5 = 0;
for ( ; _local5 < _local4 ; _local5++) {
var _local7 = com.google.youtube.players.modules.VisibleModuleDescriptor(items[_local5]);
var _local8 = com.google.youtube.players.ui.SplitMenuButtonHolder(menuButtonsHolder.attachMovie(com.google.youtube.players.ui.SplitMenuButtonHolder.LINK_NAME, _local7.label + "split", menuButtonsHolder.getNextHighestDepth()));
_local8.registerParentButton(this);
_local8.init(_local7, this, _local6);
_local3.unshift(_local8);
}
var _local9 = 0;
var _local10 = 0;
_local5 = 0;
for ( ; _local5 < _local4 ; _local5++) {
var _local11 = com.google.youtube.players.ui.SplitMenuButtonHolder(_local3[_local5]);
if (_local5 > 0) {
_local9 = _local9 + MENU_BUTTONS_PADDING;
} else {
_local9 = _local9 + MENU_TOP_PADDING;
}
_local11._y = _local9;
_local9 = _local9 + _local11.getSize().height;
_local10 = Math.max(_local10, _local11.getSize().width);
}
_local9 = _local9 + MENU_BOTTOM_PADDING;
drawMenuBg(_local9, _local10);
menuVisibleY = (menuOriginalY - _local9) - 2;
if (active) {
com.gs.TweenLite.to(menuHolder, MENU_SHOW_HIDE_SPEED, {_y:menuVisibleY});
}
}
function setMenuItems(items) {
removeMenuItems();
addMenuItems(items);
}
function removeMenuItems() {
for (var i in menuButtonsHolder) {
menuButtonsHolder[i].removeMovieClip();
}
}
function drawIcon(drawDownState) {
icon.clear();
var _local3 = (drawDownState ? 16724787 : 6710886);
var _local4 = (drawDownState ? 12193808 : 3355443);
var _local5 = {colors:[_local3, _local4], fillType:"linear", alphas:[100, 100], ratios:[0, 200], matrix:{matrixType:"box", x:0, y:0, w:22, h:15, r:(90 / 180) * Math.PI}};
com.google.youtube.util.Drawing.drawRect(icon, 0, 0, 22, 15, _local5, null, 5);
var _local6 = [{x:4, y:10}, {x:10.5, y:4}, {x:17, y:10}];
com.google.youtube.util.Drawing.drawPoly(icon, _local6, 16777215);
}
function drawMenuBg(newHeight, newWidth) {
menuBg.clear();
menuHolder._x = Math.floor(buttonWidth - newWidth);
com.google.youtube.util.Drawing.drawRect(menuBg, 0, -0.5, newWidth, newHeight, 16777215);
var _local4 = {colors:[15461355, 13421772], fillType:"linear", alphas:[100, 100], ratios:[0, 255], matrix:{matrixType:"box", x:0, y:0, w:newWidth, h:50, r:(90 / 180) * Math.PI}};
var _local5 = {alpha:100, rgb:10066329, thickness:0};
com.google.youtube.util.Drawing.drawRect(menuBg, 1, 1, newWidth - 3, newHeight - 4, _local4, _local5);
}
function build() {
super.build();
drawBgDownState();
menuHolder = createEmptyMovieClip("menuHolder", getNextHighestDepth());
menuHolder._y = 1;
menuBg = menuHolder.createEmptyMovieClip("menuBg", menuHolder.getNextHighestDepth());
includeMouseActivityOf(menuBg);
menuBg.useHandCursor = false;
menuButtonsHolder = menuHolder.createEmptyMovieClip("menuButtonsHolder", menuHolder.getNextHighestDepth());
var _local3 = createEmptyMovieClip("menuMask", getNextHighestDepth());
com.google.youtube.util.Drawing.drawRect(_local3, -5000, -5000, 10000, 5000, 16711680);
menuHolder.setMask(_local3);
menuOriginalY = menuHolder._y + 1;
icon = createEmptyMovieClip("icon", getNextHighestDepth());
icon._x = 6;
icon._y = 4;
drawIcon();
iconShadow = icon.duplicateMovieClip("iconShadow", getNextHighestDepth());
iconShadow.swapDepths(icon);
var _local4 = new Color(iconShadow);
_local4.setRGB(com.google.youtube.ui.BaseButton.ICON_SHADOW_COLOR);
iconShadow._x = iconShadow._x + 1;
iconShadow._y = iconShadow._y + 1;
iconShadow._alpha = com.google.youtube.ui.BaseButton.ICON_SHADOW_ALPHA;
com.google.youtube.players.ui.Tooltip.setParentClip(createEmptyMovieClip("tooltipLayer", getNextHighestDepth()));
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.MenuControl";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.MenuControl);
static var MENU_SHOW_HIDE_SPEED = 0.3;
static var MENU_CLOSE_TIMOUT = 2000;
static var MENU_BUTTONS_PADDING = 1;
static var MENU_TOP_PADDING = 0;
static var MENU_BOTTOM_PADDING = 2;
}
Symbol 20561 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 20562 MovieClip [__Packages.com.google.youtube.event.PlaylistEvent] Frame 0
class com.google.youtube.event.PlaylistEvent
{
function PlaylistEvent () {
}
static var CLIP_SELECTED = "onClipSelected";
static var CLIP_SHARED = "onClipShared";
static var PLAYLIST_SCROLL = "onPlaylistScroll";
}
Symbol 20563 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 20564 MovieClip [__Packages.com.google.youtube.players.ui.SubtitleIconMenuButton] Frame 0
class com.google.youtube.players.ui.SubtitleIconMenuButton extends com.google.youtube.players.ui.IconMenuButton
{
var upIconSymbol, overIconSymbol;
function SubtitleIconMenuButton () {
super();
}
function init(moduleDescriptor, paddingWidth) {
if (moduleDescriptor.locale == "en") {
upIconSymbol = "subtitleNorthAmericaUp";
overIconSymbol = "subtitleNorthAmericaOver";
} else {
upIconSymbol = "subtitleWorldUp";
overIconSymbol = "subtitleWorldOver";
}
super.init(moduleDescriptor, paddingWidth);
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.SubtitleIconMenuButton";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.SubtitleIconMenuButton);
}
Symbol 20565 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 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 20566 MovieClip [__Packages.com.google.youtube.players.ui.VideoControls] Frame 0
class com.google.youtube.players.ui.VideoControls extends com.google.youtube.AbstractElement
{
var controls, configData, disabledOverlay, getNextHighestDepth, bg, dividers, createEmptyMovieClip, unregisterAll;
function VideoControls () {
super();
controls = [];
}
function init(playerConfigData) {
configData = playerConfigData;
build();
}
function enable() {
disabled = false;
disabledOverlay._visible = false;
}
function disable() {
disabled = true;
disabledOverlay.swapDepths(getNextHighestDepth());
disabledOverlay._visible = true;
}
function testHit(x, y) {
return(bg.hitTest(x, y));
}
function updateLayout() {
layoutControlItems();
}
function setWidth(newWidth) {
drawBackground(newWidth, CONTROLS_DEFAULT_HEIGHT);
layoutControlItems();
}
function getSize() {
return({width:bg._width, height:bg._height});
}
function addControl(control, opt_index) {
var _local4 = ((opt_index < 0) ? 0 : (opt_index));
if ((!(_local4 === undefined)) && (_local4 <= controls.length)) {
controls.splice(_local4, 0, control);
} else {
controls.push(control);
}
MovieClip(control)._visible = true;
layoutControlItems();
return(_local4);
}
function removeControl(control) {
var _local3 = false;
var _local4 = controls.length;
var _local5 = 0;
for ( ; _local5 < _local4 ; _local5++) {
if (controls[_local5] == control) {
MovieClip(controls[_local5])._visible = false;
_local3 = true;
controls.splice(_local5, 1);
break;
}
}
layoutControlItems();
return(_local3);
}
function getControlIndex(control) {
var _local3 = -1;
var _local4 = controls.length;
var _local5 = 0;
for ( ; _local5 < _local4 ; _local5++) {
if ((controls[_local5] == control) && (MovieClip(controls[_local5])._visible)) {
_local3 = _local5;
break;
}
}
return(_local3);
}
function layoutControlItems() {
var _local2 = getSize().width;
var _local3 = {};
var _local4 = 0;
var _local5 = [];
var _local6 = [];
var _local7 = controls.length;
var _local8 = 0;
for ( ; _local8 < _local7 ; _local8++) {
var _local9 = controls[_local8];
_local9._visible = true;
if (_local9.getMinRequiredControlsWidth() <= _local2) {
if (!_local9.isResizable()) {
_local3[_local8] = _local9.getWidth();
_local4 = _local4 + _local9.getWidth();
} else {
_local5.push(_local9);
}
_local4 = _local4 + CONTROLS_MARGIN;
_local6.push(_local9);
} else {
_local9._visible = false;
}
}
var _local10 = (_local2 - _local4) - 1;
var _local11 = _local5.length;
var _local12 = 0;
for ( ; _local12 < _local11 ; _local12++) {
_local5[_local12].setWidth(_local10 / _local11);
}
dividers.clear();
var _local13 = 1;
var _local14 = _local6.length;
var _local15 = 0;
for ( ; _local15 < _local14 ; _local15++) {
var _local16 = _local6[_local15];
_local16.setPosition(_local13, 1);
if ((_local15 < (_local14 - 1)) && (_local16.hasDivider() || (_local6[_local15 + 1].hasDivider()))) {
com.google.youtube.util.Drawing.drawDivider(dividers, _local13 + _local16.getWidth(), 1, getSize().height - 2, com.google.youtube.util.Drawing.VERTICAL, configData.color1, 15658734);
}
_local13 = Math.round((_local13 + _local16.getWidth()) + CONTROLS_MARGIN);
}
}
function createBg() {
bg = createEmptyMovieClip("bg", getNextHighestDepth());
dividers = createEmptyMovieClip("dividers", getNextHighestDepth());
disabledOverlay = createEmptyMovieClip("disabledOverlay", getNextHighestDepth());
disabledOverlay.onRelease = function () {
};
disabledOverlay.useHandCursor = false;
disabledOverlay._visible = false;
}
function drawBackground(width, height) {
var _local4 = {colors:[configData.CONTROLS_TOP_GRADIENT_COLOR, configData.color2], fillType:"linear", alphas:[100, 100], ratios:[0, 225], matrix:{matrixType:"box", x:0, y:0, w:width, h:height, r:(90 / 180) * Math.PI}};
bg.clear();
com.google.youtube.util.Drawing.drawRect(bg, 0, 0, width, height, configData.color1);
com.google.youtube.util.Drawing.drawRect(bg, 1, 1, width - 2, height - 2, _local4);
_local4.alphas = [com.google.youtube.ui.BaseButton.DISABLED_ALPHA, com.google.youtube.ui.BaseButton.DISABLED_ALPHA];
disabledOverlay.clear();
com.google.youtube.util.Drawing.drawRect(disabledOverlay, 1, 1, width - 2, height - 2, _local4);
}
function build() {
createBg();
drawBackground(CONTROLS_DEFAULT_WIDTH, CONTROLS_DEFAULT_HEIGHT);
}
function destroy() {
unregisterAll();
}
static var LINK_NAME = "__Packages.com.google.youtube.players.ui.VideoControls";
static var FORCE_LINK = Object.registerClass(LINK_NAME, com.google.youtube.players.ui.VideoControls);
static var CONTROLS_DEFAULT_WIDTH = 470;
static var CONTROLS_DEFAULT_HEIGHT = 25;
static var CONTROLS_MARGIN = 1;
var disabled = false;
}
Symbol 20567 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 20568 MovieClip [__Packages.com.google.youtube.players.modules.SubtitleModuleDescriptor] Frame 0
class com.google.youtube.players.modules.SubtitleModuleDescriptor extends com.google.youtube.players.modules.VisibleModuleDescriptor
{
var loadPolicy, isTopmost, label, path, iconClass, menuIndex, enabled, activated, locale, hasSubmenu, enableMessageKey, disableMessageKey, unavailableMessageKey, instance;
function SubtitleModuleDescriptor () {
super();
loadPolicy = com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_BY_PREFERENCE;
isTopmost = false;
label = "subtitle_module";
path = "http://www.youtube.com/swf/subtitle_module.swf";
iconClass = com.google.youtube.players.ui.SubtitleIconMenuButton.LINK_NAME;
menuIndex = 2;
enabled = false;
activated = false;
locale = "en";
hasSubmenu = true;
enableMessageKey = com.google.youtube.util.Messages.CAPTIONS_ON;
disableMessageKey = com.google.youtube.util.Messages.CAPTIONS_OFF;
unavailableMessageKey = com.google.youtube.util.Messages.CAPTIONS_UNAVAILABLE;
}
function getSubmenu(holder) {
if (instance) {
return(instance.getSubmenu(holder));
}
return(undefined);
}
function onRelease() {
var _local3 = SharedObject.getLocal(com.google.youtube.players.modules.ModuleMediator.MODULE_DATA_SO_KEY, "/");
var _local4 = _local3.data;
if (!_local4[label]) {
_local4[label] = {};
}
if (_local4[label].loadPolicy != com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_ALWAYS) {
_local4[label].loadPolicy = com.google.youtube.players.modules.ModuleLoadPolicy.MODULE_LOAD_ALWAYS;
activated = true;
} else {
_local4[label].loadPolicy = 0;
activated = false;
}
_local3.flush();
super.onRelease();
}
}
Symbol 20569 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 20570 MovieClip [__Packages.com.google.youtube.players.ui.SeekBarMarker] Frame 0
class com.google.youtube.players.ui.SeekBarMarker
{
var startTime, endTime, markerWidth, shouldBeDisplayedNow;
function SeekBarMarker (newStartTime, newEndTime, newMarkerWidth) {
startTime = newStartTime;
endTime = newEndTime;
markerWidth = newMarkerWidth;
shouldBeDisplayedNow = false;
}
}
Symbol 20571 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 20572 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 20573 MovieClip [__Packages.com.google.youtube.players.modules.ModuleLoadPolicy] Frame 0
class com.google.youtube.players.modules.ModuleLoadPolicy
{
function ModuleLoadPolicy () {
}
static var MODULE_LOAD_ALWAYS = 1;
static var MODULE_LOAD_BY_PREFERENCE = 2;
static var MODULE_LOAD_BY_REQUEST = 3;
static var MODULE_LOAD_INTRINSIC = 4;
}
Symbol 20574 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 20575 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);
}
}
Symbol 20576 MovieClip [__Packages.com.google.youtube.players.Config] Frame 0
class com.google.youtube.players.Config
{
static var instanceMap;
function Config () {
}
static function getPlayerInstance(mc) {
if (!instanceMap) {
instanceMap = {};
}
var _local3 = String(mc);
if (!instanceMap[_local3]) {
instanceMap[_local3] = new com.google.youtube.players.PlayerConfigData(mc);
}
return(instanceMap[_local3]);
}
static function destroyPlayerInstance(mc) {
var _local3 = String(mc);
instanceMap[_local3] = null;
}
}