Frame 1
function create_clips() {
this.createEmptyMovieClip("cont_mc", this.getNextHighestDepth());
this.createEmptyMovieClip("debug_mc", this.getNextHighestDepth());
this.createEmptyMovieClip("prevent_click_mc", this.getNextHighestDepth());
}
function widget_init() {
var _local3 = new EventManager();
create_clips();
render_debug();
var _local2 = parse_flash_vars();
var _local4 = new SkinFlix(this.cont_mc, _local2, _local3, stageWidth, stageHeight);
if (_local2.map == "00000000") {
raise_clickshield();
}
dispatchEvent({type:"onWidgetInit", target:_local4});
}
function onShowComplete() {
_global.debug("_root.onShowComplete()-------------------------------------------------");
dispatchEvent({type:"onWidgetFinished", target:controller});
}
function getWidgetObject() {
return(widget_object);
}
function raise_clickshield() {
Draw.square(this.prevent_click_mc, 0, 0, stageWidth, stageHeight, 0, 0, 0);
this.prevent_click_mc.onRollOver = (this.prevent_click_mc.onRollOut = (this.prevent_click_mc.onRelease = function () {
return(null);
}));
}
function parse_flash_vars() {
var _local3 = ["media_url", "img_url", "th", "thc", "sk", "cy", "url", "bgc", "internal", "site", "channel", "map", "s", "autoplay"];
var _local2 = [];
var _local1;
while (_local1 = _local3.pop() , _local1) {
_local2[_local1] = terriblev(_local1);
}
return(_local2);
}
function terriblev(keyname) {
var _local2 = 0;
while (_local2 < 6) {
if (_root[keyname]) {
return(_root[keyname]);
}
keyname = "amp;" + keyname;
_local2++;
}
return(undefined);
}
function getPlayerVersion() {
var _local1 = System.capabilities.version;
var _local3 = _local1.indexOf(" ");
var _local2 = _local1.substr(_local3 + 1, 1);
return(Number(_local2));
}
function show_version_notice() {
_root.createEmptyMovieClip("version_notice_bg", _root.getNextHighestDepth());
Draw.square(_root.version_notice_bg, 0, 0, stageWidth, stageHeight, 100, 6588004, 0);
_root.createEmptyMovieClip("version_notice_cont", _root.getNextHighestDepth());
var _local2 = _root.version_notice_cont;
_local2.attachMovie("version_notice", "version_notice_mc", _local2.getNextHighestDepth());
_local2._x = (stageWidth / 2) - (_local2._width / 2);
_local2._y = (stageHeight / 2) - (_local2._height / 2);
_local2.onRelease = (_root.version_notice_bg.onRelease = function () {
getURL ("http://www.adobe.com/products/flashplayer/", "_blank");
});
}
function debug_append(msg) {
var _local2 = new TextFormat("Arial", 12, 16777215, true);
_root.debug_mc.deeebug.text = _root.debug_mc.deeebug.text + (msg + "\r");
_root.debug_mc.deeebug.setTextFormat(_local2);
}
function render_debug() {
Draw.square(this.debug_mc, 0, 0, stageWidth * 0.75, stageHeight * 0.75, 100, 0, 0);
this.debug_mc._alpha = 50;
this.debug_mc.createTextField("deeebug", this.debug_mc.getNextHighestDepth(), 0, 0, this.debug_mc._width, this.debug_mc._height);
this.debug_mc.deeebug.text = "";
var _local3 = new TextFormat("Arial", 12, 16777215, true);
this.debug_mc.deeebug.setTextFormat(_local3);
this.debug_mc.deeebug.multiline = true;
_root.debug_append = this.debug_append;
_root.debug_mc._visible = false;
this.debug_mc._y = stageHeight * 0.25;
}
function toggle_debug() {
this.debug_mc._visible = !this.debug_mc._visible;
}
Stage.scaleMode = "noScale";
Stage.align = "TL";
_lockroot = true;
var stageWidth;
var stageHeight;
mx.events.EventDispatcher.initialize(this);
System.security.allowDomain("*");
Stage.align = "TL";
Stage.scaleMode = "noScale";
controller.loadbar_mc = loadbar_mc;
if (_root.stagew) {
loadbar_mc._visible = false;
}
notice_mc._visible = false;
var scope = this;
var stage_listener_mc = _root.createEmptyMovieClip("stage_listener_mc", _root.getNextHighestDepth());
Stage.addListener(stage_listener_mc);
stage_listener_mc.onResize = (stage_listener_mc.onEnterFrame = function () {
if ((Stage.width > 1) && (Stage.height > 1)) {
Stage.align = "TL";
Stage.scaleMode = "noScale";
delete this.onEnterFrame;
Stage.removeListener(this);
stageWidth = _root.stagew || (Stage.width);
stageHeight = _root.stageh || (Stage.height);
if (getPlayerVersion() < 8) {
show_version_notice();
} else {
scope.widget_init();
}
}
});
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 10
stop();
Symbol 54 MovieClip Frame 20
stop();
Symbol 54 MovieClip Frame 30
stop();
Symbol 54 MovieClip Frame 40
stop();
Symbol 70 MovieClip Frame 1
stop();
Symbol 77 MovieClip [__Packages.EventManager] Frame 0
class EventManager
{
static var em;
var event_listeners, connection_string, local_connection;
function EventManager (conn_string) {
event_listeners = new Array();
if (conn_string) {
connection_string = conn_string;
set_local_connection(connection_string);
}
em = this;
}
function register(event_name, event_listener) {
if ((event_name != undefined) && (event_listener != undefined)) {
if (event_listeners[event_name] == undefined) {
event_listeners[event_name] = new Array();
}
event_listeners[event_name].push(event_listener);
}
}
function fire(event_name, event_data, delay) {
if (delay != undefined) {
delay_event(event_name, event_data, delay);
return(undefined);
}
if (event_listeners[event_name].length > 0) {
for (var _local4 in event_listeners[event_name]) {
event_listeners[event_name][_local4][event_name](event_data);
}
}
}
function rm_listener(event_listener) {
for (var _local5 in event_listeners) {
var _local2 = event_listeners[_local5];
for (var _local3 in _local2) {
if (event_listener == _local2[_local3]) {
event_listeners[_local5][_local3] = undefined;
}
}
}
}
function delay_event(event_name, event_data, delay) {
var _local4;
var _local3 = new Date();
var _local2 = String(_local3.getTime() + Math.floor(Math.random() * 1000));
_local4 = setInterval(this, "exec_delayed_event", delay, event_name, event_data, _local2);
intervals[_local2] = _local4;
}
function exec_delayed_event(event_name, event_data, int_key) {
clearInterval(intervals[int_key]);
fire(event_name, event_data);
}
function set_local_connection(conn_string) {
var scope = this;
local_connection = new LocalConnection();
local_connection.connectEvent = function (func, args) {
scope.fire(func, {ed:args});
};
local_connection.onStatus = function (infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
}
};
local_connection.connect(conn_string);
}
var intervals = [];
}
Symbol 78 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 79 MovieClip [__Packages.Draw] Frame 0
class Draw
{
function Draw () {
}
static function frame(target_mc, x0, y0, x1, y1, color, alpha, insets) {
target_mc.moveTo(x0, y0);
target_mc.beginFill(color, alpha);
target_mc.lineTo(x1, y0);
target_mc.lineTo(x1, y1);
target_mc.lineTo(x0, y1);
target_mc.lineTo(x0, y0);
target_mc.moveTo(x0 + insets.left, y0 + insets.top);
target_mc.lineTo(x0 + insets.left, y1 - insets.bottom);
target_mc.lineTo(x1 - insets.right, y1 - insets.bottom);
target_mc.lineTo(x1 - insets.right, y0 + insets.top);
target_mc.lineTo(x0 + insets.left, y0 + insets.top);
target_mc.endFill();
}
static function square(target_mc, x0, y0, x1, y1, alpha, color, radius) {
var _local2 = (radius ? (radius) : 0);
target_mc.moveTo(x0 + _local2, y0);
target_mc.beginFill(color, alpha);
target_mc.lineTo(x1 - _local2, y0);
target_mc.curveTo(x1, y0, x1, y0 + _local2);
target_mc.lineTo(x1, y1 - _local2);
target_mc.curveTo(x1, y1, x1 - _local2, y1);
target_mc.lineTo(x0 + _local2, y1);
target_mc.curveTo(x0, y1, x0, y1 - _local2);
target_mc.lineTo(x0, y0 + _local2);
target_mc.curveTo(x0, y0, x0 + _local2, y0);
target_mc.endFill();
}
static function rect(target_mc, x0, y0, x1, y1, alpha, color, thickness, radius) {
var _local1 = (radius ? (radius) : 0);
target_mc.moveTo(x0 + _local1, y0);
target_mc.lineStyle(thickness, color, alpha);
target_mc.lineTo(x1 - _local1, y0);
target_mc.curveTo(x1, y0, x1, y0 + _local1);
target_mc.lineTo(x1, y1 - _local1);
target_mc.curveTo(x1, y1, x1 - _local1, y1);
target_mc.lineTo(x0 + _local1, y1);
target_mc.curveTo(x0, y1, x0, y1 - _local1);
target_mc.lineTo(x0, y0 + _local1);
target_mc.curveTo(x0, y0, x0 + _local1, y0);
}
static function outline(target_mc, x1, y1, width, height, border_color, border_width, alpha) {
if (alpha == undefined) {
alpha = 100;
}
if (border_color == undefined) {
border_color = 0;
}
if (border_width == undefined) {
border_width = 2;
}
target_mc.lineStyle(border_width, border_color, 100);
target_mc.moveTo(x1, y1);
target_mc.lineTo((x1 + width) - 1, y1);
target_mc.lineTo((x1 + width) - 1, (y1 + height) - 1);
target_mc.lineTo(x1, (y1 + height) - 1);
target_mc.lineTo(x1, y1);
}
static function square_with_border(target_mc, x0, y0, x1, y1, alpha, color, radius, line_weight, line_color) {
var _local2 = (radius ? (radius) : 0);
target_mc.lineStyle(line_weight, line_color, 100);
target_mc.moveTo(x0 + _local2, y0);
target_mc.beginFill(color, alpha);
target_mc.lineTo(x1 - _local2, y0);
target_mc.curveTo(x1, y0, x1, y0 + _local2);
target_mc.lineTo(x1, y1 - _local2);
target_mc.curveTo(x1, y1, x1 - _local2, y1);
target_mc.lineTo(x0 + _local2, y1);
target_mc.curveTo(x0, y1, x0, y1 - _local2);
target_mc.lineTo(x0, y0 + _local2);
target_mc.curveTo(x0, y0, x0 + _local2, y0);
target_mc.endFill();
}
static function triangle(target_mc, sideLength, fillColor, fillAlpha, down) {
var tHeight = ((sideLength * 1.73205080756888) / 2);
if (down) {
with (target_mc) {
beginFill(fillColor, fillAlpha);
moveTo(0, 0);
lineTo(sideLength, 0);
lineTo(sideLength / 2, tHeight);
lineTo(0, 0);
endFill();
}
} else {
with (target_mc) {
beginFill(fillColor, fillAlpha);
moveTo(sideLength / 2, 0);
lineTo(sideLength, tHeight);
lineTo(0, tHeight);
lineTo(sideLength / 2, 0);
endFill();
}
}
}
}
Symbol 80 MovieClip [__Packages.GenericBroadcaster] Frame 0
class GenericBroadcaster
{
function GenericBroadcaster () {
mx.events.EventDispatcher.initialize(this);
}
function wrapDispatchEvent(eventObject) {
eventObject.target = this;
dispatchEvent(eventObject);
}
function dispatchEvent() {
}
function addEventListener() {
}
function removeEventListener() {
}
}
Symbol 81 MovieClip [__Packages.SkinFlix] Frame 0
class SkinFlix extends GenericBroadcaster
{
var stageWidth, stageHeight, em, flash_vars, _mc, _clHarness, _logvars, _ytlogger, config, insets, skin_stuff, logger, sfMenu;
function SkinFlix (container, fvars, emanager, w, h) {
super();
stageWidth = w;
stageHeight = h;
em = emanager;
flash_vars = fvars;
_mc = container;
mc_refs.container = _mc;
register_events();
create_clips();
load_config();
}
function getName() {
return("skinflix widget object!");
}
function initPlayer() {
if (_clHarness) {
return(false);
}
var _local3 = get_player_dims();
_clHarness = new ChromelessHarness(mc_refs.player_mc);
_clHarness.addEventListener("ChromelessHarness_stateEvent", this);
_clHarness.addEventListener("VideoControls_menuClick", this);
_clHarness.init(showSFMenu(), {width:_local3.w, height:_local3.h});
_logvars = {url:_root.seurl, sample_rate:_root.selog, user_id:_root.uid, ev_play:_root.ev_play, ev_clickthrough:_root.ev_clickthrough, flags:_root.fl, channel_id:_root.channel, context_info:_root.cinfo};
_ytlogger = new YoutubeSELogger(_clHarness);
_ytlogger.setConfig(_logvars);
_ytlogger.setIsActivePlay(true);
}
function VideoControls_menuClick() {
menuButtonClicked(true);
}
function positionPlayer() {
var _local2 = get_player_dims();
mc_refs.player_mc._x = _local2.x;
mc_refs.player_mc._y = _local2.y;
mc_refs.player_mc._x = mc_refs.player_mc._x + 0.5;
mc_refs.player_mc._y = mc_refs.player_mc._y + 3;
}
function ChromelessHarness_stateEvent(ed) {
switch (ed.name) {
case "loaded" :
positionPlayer();
break;
case "finished" :
_root.onShowComplete();
}
}
function register_events() {
com.slide.sis.Translog.CURRENT_VIEW = (com.slide.sis.Translog.PREVIOUS_VIEW = "SF_TICKER");
em.register("on_skin_rendered", this);
em.register("on_video_selected", this);
}
function initialize() {
com.slide.FlashVars.__set__GLOBAL_CFG(config.globalconf);
if (config.tickerconf.skin == "199") {
config.tickerconf.skin = "0";
}
if (config.tickerconf.skin != "0") {
init_skin();
} else {
insets = inset_defaults();
init_flick();
}
}
function init_skin() {
var _local2 = flash_vars.s != "1";
var _local3 = {tickerconf:config.tickerconf, globalconf:config.globalconf, flash_vars:flash_vars, dim:{iw:345, ih:293, w:stageWidth, h:stageHeight}, clickthru:_local2};
skin_stuff = new SkinStuff(mc_refs.skin_mc, _local3, em);
}
function create_clips() {
mc_refs.canvas_mc = _mc.createEmptyMovieClip("canvas_mc", _mc.getNextHighestDepth());
mc_refs.player_mc = _mc.createEmptyMovieClip("player_mc", _mc.getNextHighestDepth());
mc_refs.theme_mc = _mc.createEmptyMovieClip("theme_mc", _mc.getNextHighestDepth());
mc_refs.skin_mc = _mc.createEmptyMovieClip("skin_mc", _mc.getNextHighestDepth());
mc_refs.controls_mc = _mc.createEmptyMovieClip("controls_mc", _mc.getNextHighestDepth());
mc_refs.menu_mc = _mc.createEmptyMovieClip("menu_mc", _mc.getNextHighestDepth());
}
function get_config_url() {
return(((((("http://" + flash_vars.site) + "/accept/application/x-xmljson/channel/") + flash_vars.channel) + "/videoconfig/1") + "?") + com.slide.sis.Comscore.SKINFLIX);
}
function get_embed_url() {
return((((("http://" + flash_vars.site) + "/accept/application/x-xmljson/channel/") + flash_vars.channel) + "/embedcode?cy=") + flash_vars.cy);
}
function load_config() {
if (flash_vars.channel) {
networkConfig();
} else {
arrangeConfig();
}
}
function arrangeConfig() {
config = {};
config.items = [];
config.items[0] = {media_url:_root.media_url, img_url:_root.img_url};
config.tickerconf = {};
config.tickerconf.skin = _root.sk;
config.tickerconf.skin_url = _root.skin_url;
initialize();
}
function networkConfig() {
var _local3 = get_config_url();
var _local2 = new XML();
var scope = this;
_local2.load(_local3);
_local2.onLoad = function (success) {
if (success) {
var _local2 = SlideXML.convertPlistGeneric(this.firstChild);
scope.config = _local2;
scope.initialize();
} else {
scope.loadbar_mc.fill();
scope.loadbar_mc.gotoAndStop("error");
}
};
}
function on_skin_rendered(event_data) {
_root.loadbar_mc._visible = false;
insets = event_data.config.insets;
init_flick();
}
function inset_defaults() {
return({top:0, right:0, bottom:0, left:0, no_insets:true});
}
function clear_background() {
if (insets.no_insets) {
} else {
var _local3 = (stageWidth - insets.left) - insets.right;
var _local2 = (stageHeight - insets.top) - insets.bottom;
mc_refs.canvas_mc.moveTo(insets.left, insets.top);
mc_refs.canvas_mc.beginFill(0, 100);
mc_refs.canvas_mc.lineTo(insets.left + _local3, insets.top);
mc_refs.canvas_mc.lineTo(insets.left + _local3, insets.top + _local2);
mc_refs.canvas_mc.lineTo(insets.left, insets.top + _local2);
mc_refs.canvas_mc.lineTo(insets.left, insets.top);
mc_refs.canvas_mc.endFill();
}
}
function init_flick() {
_root.loadbar_mc._visible = false;
var _local3 = flash_vars.autoplay == "1";
clear_background();
if (config.items[0].media_url && (config.items[0].media_url != "undefined")) {
load_video(config.items[0], _local3);
} else {
load_image(config.items[0].img_url);
}
logger = new TransLogger(em, flash_vars.channel);
}
function chopIdFromUrl(vidurl) {
var _local1 = vidurl.split("/");
var _local2 = _local1[_local1.length - 1];
var _local3 = _local2.split("?")[0];
return(_local3);
}
function load_video(video, autoplay) {
if (!_clHarness.isReady()) {
initPlayer();
}
var _local2 = chopIdFromUrl(video.media_url);
_clHarness.setAutoplay(autoplay);
_clHarness.playVideoId(_local2);
}
function load_image(img_url) {
}
function get_player_dims() {
var _local2 = (stageWidth - insets.left) - insets.right;
var _local3 = (stageHeight - insets.top) - insets.bottom;
return({w:_local2, h:_local3, x:insets.left, y:insets.top});
}
function on_video_selected(ed) {
load_video(ed.item, true);
sfMenu.menuClose();
}
function menuButtonClicked(realClick) {
if (sfMenu) {
sfMenu.menuOpen(realClick);
} else {
initMenu(realClick);
}
}
function initMenu(realClick) {
var scope = this;
var _local2 = new MovieClipLoader();
var _local3 = {};
_local3.onLoadInit = function (target_mc) {
scope.sfMenu = target_mc.getMenu(scope.getMenuDim());
};
_local2.addListener(_local3);
_local2.loadClip(menuSwfUrl(), mc_refs.menu_mc);
}
function getMenuDim() {
return({w:stageWidth, h:stageHeight});
}
function menuSwfUrl() {
return(baseSwfUrl() + "/widgets/menuSkinflix.swf");
}
function baseSwfUrl() {
return(_url.split("/").slice(0, 3).join("/"));
}
function showSFMenu() {
return((com.slide.FlashVars.__get__SHOW_MENU() && (stageWidth >= 350)) && (stageHeight >= 260));
}
var mc_refs = [];
var yt_menu = false;
}
Symbol 82 MovieClip [__Packages.SkinStuff] Frame 0
class SkinStuff
{
var stageWidth, stageHeight, em, _mc, skin_config, skin_info;
function SkinStuff (skin_mc, skin_dict, emanager, w, h) {
stageWidth = w;
stageHeight = h;
em = emanager;
_mc = skin_mc;
skin_config = skin_dict;
create_skin_mc();
load_skin();
}
function create_skin_mc() {
_mc.createEmptyMovieClip("skin_mc", _mc.getNextHighestDepth());
_mc.skin_mc.createEmptyMovieClip("skin_bg", _mc.skin_mc.getNextHighestDepth());
_mc.skin_mc.createEmptyMovieClip("skin_swf", _mc.skin_mc.getNextHighestDepth());
_mc.skin_mc.createEmptyMovieClip("skin_clickarea", _mc.skin_mc.getNextHighestDepth());
}
function load_skin() {
var scope = this;
var _local2 = new XML();
_local2.onLoad = function () {
scope.skin_info = SlideXML.convertPlistGeneric(this.firstChild);
scope.em.fire("on_skin_rendered", {config:scope.skin_info});
scope.draw_skin_frame();
scope.set_skin_clickthru();
scope.load_skin_mc(scope.skin_info);
};
var _local3 = (((((((skin_config.tickerconf.skin_url + "?w=") + skin_config.dim.w) + "&h=") + skin_config.dim.h) + "&ih=") + skin_config.dim.ih) + "&iw=") + skin_config.dim.iw;
_local2.load(_local3);
}
function draw_skin_frame() {
Draw.frame(_mc.skin_mc.skin_bg, 0, 0, stageWidth, stageHeight, 0, 70, skin_info.insets);
}
function set_skin_clickthru() {
if (!skin_config.clickthru) {
return(false);
}
return(false);
}
function skin_clickthru() {
getURL (construct_pivot_url({id:skin_config.flash_vars.channel, cy:skin_config.flash_vars.cy, th:skin_config.tickerconf.theme, sk:skin_config.tickerconf.skin, at:400, site:skin_config.globalconf.ad_click}), "_blank");
}
function construct_pivot_url(args) {
return(((((((((((args.site + "pivot?id=") + args.id) + "&cy=") + args.cy) + "&th=") + args.th) + "&sk=") + args.sk) + "&at=") + args.at) + "&map=7");
}
function load_skin_mc(config) {
var _local4 = _mc.skin_mc.skin_swf;
var _local3 = new MovieClipLoader();
var scope = this;
var _local2 = new Object();
_local2.onLoadInit = function () {
scope.hide_skin_bg();
};
_local3.addListener(_local2);
_local3.loadClip(config.url, _local4);
}
function hide_skin_bg() {
_mc.skin_mc.createEmptyMovieClip("skin_bg", _mc.skin_mc.skin_bg.getDepth());
}
}
Symbol 83 MovieClip [__Packages.SlideXML] Frame 0
class SlideXML
{
function SlideXML () {
}
static function convertPlistGeneric(node) {
switch (node.nodeName.toLowerCase()) {
case "dict" :
return(convertPlistDict(node));
case "array" :
return(convertPlistArray(node));
case "string" :
return(convertPlistString(node));
case "integer" :
return(convertPlistInteger(node));
case "integer" :
return(convertPlistReal(node));
case "true" :
return(true);
case "false" :
return(false);
case "null" :
return(null);
case "s" :
return(convertPlistItem(node));
}
trace("CRACK:" + node.nodeName);
}
static function convertPlistDict(plist) {
var _local5 = {};
var _local1 = 0;
while (_local1 < plist.childNodes.length) {
var _local3 = plist.childNodes[_local1].childNodes[0].nodeValue;
var _local2 = plist.childNodes[_local1 + 1];
_local5[_local3] = convertPlistGeneric(_local2);
_local1 = _local1 + 2;
}
return(_local5);
}
static function convertNodeNameToKey(node) {
var _local1 = node.nodeName.toLowerCase();
switch (_local1) {
case "d" :
return("description");
case "t" :
return("target_url");
case "i" :
return("item_img_url");
case "f" :
return("fallback_img_url");
case "m" :
return("media_url");
case "c" :
return("content_type");
case "n" :
return("ciid");
}
trace(("unknown key [" + _local1) + "]");
return(String(_local1));
}
static function convertPlistItem(plist) {
var _local5 = {};
var _local1 = 0;
while (_local1 < plist.childNodes.length) {
var _local3 = convertNodeNameToKey(plist.childNodes[_local1]);
var _local2 = plist.childNodes[_local1].childNodes[0].nodeValue;
_local5[_local3] = _local2;
_local1++;
}
return(_local5);
}
static function convertPlistSticker(plist) {
var _local5 = {};
var _local1 = 0;
while (_local1 < plist.childNodes.length) {
var _local3 = plist.childNodes[_local1].nodeName;
var _local2 = plist.childNodes[_local1].childNodes[0].nodeValue;
_local5[_local3] = _local2;
_local1++;
}
return(_local5);
}
static function convertPlistArray(node) {
var _local3 = [];
var _local1 = 0;
while (_local1 < node.childNodes.length) {
_local3.push(convertPlistGeneric(node.childNodes[_local1]));
_local1++;
}
return(_local3);
}
static function convertPlistString(node) {
return(node.childNodes[0].nodeValue);
}
static function convertPlistInteger(node) {
return(parseInt(node.childNodes[0].nodeValue));
}
static function convertPlistReal(node) {
return(parseFloat(node.childNodes[0].nodeValue));
}
static function parseUploadSlot(data) {
var _local3 = new Object();
var _local2 = data.firstChild.childNodes;
var _local1 = 0;
while (_local1 < _local2.length) {
if ((_local2[_local1].nodeName == "key") && (_local2[_local1].firstChild.nodeValue == "upload_url")) {
_local3.upload_url = _local2[_local1 + 1].firstChild.nodeValue;
}
if ((_local2[_local1].nodeName == "key") && (_local2[_local1].firstChild.nodeValue == "share_url")) {
_local3.share_url = _local2[_local1 + 1].firstChild.nodeValue;
}
if ((_local2[_local1].nodeName == "key") && (_local2[_local1].firstChild.nodeValue == "detail_url")) {
_local3.detail_url = _local2[_local1 + 1].firstChild.nodeValue;
}
if ((_local2[_local1].nodeName == "key") && (_local2[_local1].firstChild.nodeValue == "img_url")) {
_local3.img_url = _local2[_local1 + 1].firstChild.nodeValue;
}
_local1++;
}
return(_local3);
}
static function parseUploadDetails(data) {
var _local3 = new Object();
var _local2 = data.firstChild.childNodes;
var _local1 = 0;
while (_local1 < _local2.length) {
if ((_local2[_local1].nodeName == "key") && (_local2[_local1].firstChild.nodeValue == "rc")) {
_local3.rc = Number(_local2[_local1 + 1].firstChild.nodeValue);
}
if ((_local2[_local1].nodeName == "key") && (_local2[_local1].firstChild.nodeValue == "content_type")) {
_local3.content_type = String(_local2[_local1 + 1].firstChild.nodeValue);
}
if ((_local2[_local1].nodeName == "key") && (_local2[_local1].firstChild.nodeValue == "filename")) {
_local3.filename = String(_local2[_local1 + 1].firstChild.nodeValue);
}
_local1++;
}
return(_local3);
}
}
Symbol 84 MovieClip [__Packages.ThemeStuff] Frame 0
class ThemeStuff
{
var em, _mc, conf;
function ThemeStuff (parent_mc, thconf, emanager) {
em = emanager;
_mc = parent_mc;
conf = thconf;
load_theme_mc(conf.theme_num);
}
function load_theme_mc(theme_number) {
_mc.createEmptyMovieClip("theme_mc", _mc.getNextHighestDepth());
var _local4 = _mc.theme_mc;
var _local3 = new MovieClipLoader();
var scope = this;
var _local2 = new Object();
_local2.onLoadInit = function () {
scope.theme_loaded();
};
_local3.addListener(_local2);
var _local5 = get_theme_filename(theme_number);
var _local6 = (("http://" + conf.site) + "/widgets/ver9/") + _local5;
_local3.loadClip(_local6, _local4);
}
function get_theme_filename(theme_number) {
switch (Number(theme_number)) {
case 0 :
return(null);
case 1 :
return("t_hearts.swf");
case 2 :
return("t_star.swf");
case 3 :
return("t_bubbles.swf");
case 4 :
return("t_bling.swf");
case 5 :
return("t_girl.swf");
}
return(("t_" + theme_number) + ".swf");
}
function theme_loaded() {
var _local2 = new Object();
_local2.tx = conf.coords.tx;
_local2.ty = conf.coords.ty;
_local2.SH = conf.coords.sh;
_local2.SW = conf.coords.sw;
_local2.mask_h = _local2.SH;
_local2.mask_w = _local2.SW;
_mc.theme_mc.initialize(_local2);
}
}
Symbol 85 MovieClip [__Packages.TransLogger] Frame 0
class TransLogger
{
static var channel;
var em;
function TransLogger (emanager, cid) {
em = emanager;
channel = cid;
register_events();
}
function register_events() {
em.register("on_trans_log", this);
}
function on_trans_log(event_data) {
send(event_data);
}
static function get_default_views(transtype) {
switch (transtype) {
case "bupload" :
return({previous_view:"bupload", current_view:"bupload"});
case "themepic" :
return({previous_view:"themepic", current_view:"themepic"});
}
return({previous_view:"sf_ticker", current_view:"sf_ticker"});
}
static function send(event_data) {
var _local3 = get_log_url();
var _local1 = new LoadVars();
if (event_data.user_id && (event_data.user_id != 0)) {
_local1.user_id = event_data.user_id;
}
if (channel && (channel != 0)) {
_local1.channel_id = com.slide.FlashVars.CHANNEL;
}
_local1.previous_action = event_data.action;
_local1.previous_view = event_data.previous_view;
_local1.current_view = event_data.current_view;
_local1.sendAndLoad(_local3, {}, "GET");
}
static function get_log_url() {
return(_url.split("/").slice(0, 3).join("/") + "/translog");
}
}
Symbol 86 MovieClip [__Packages.com.slide.FlashVars] Frame 0
class com.slide.FlashVars
{
static var _skinConfig, _tickerCfg, _globalCfg, _itemArray, _fullDict;
function FlashVars () {
}
static function showViewerUpload() {
switch (TICKER_CFG.publish_status) {
case "public" :
return(true);
case "moderate" :
return(true);
}
return(false);
}
static function get ARTIST_INFO_CLICK() {
return(parseMap(3));
}
static function get BG_CLICK() {
return(parseMap(2));
}
static function get CHANNEL() {
return(_channel);
}
static function get GB_ITEM_CLICK() {
return(parseMap(5));
}
static function get ITEM_CLICK() {
return(parseMap(0));
}
static function get LANGUAGE() {
return(_language.toLowerCase());
}
static function get SHOW_AD() {
return(parseMap(4));
}
static function get SHOW_MENU() {
return(parseMap(6) == ONE);
}
static function get SHOW_NOTICE() {
return(parseMap(7) == ONE);
}
static function get SKIN_CLICK() {
return(parseMap(1));
}
static function get TARGET_WINDOW() {
return(parseTargetWindow(parseMap(8)));
}
static function get WIDGET_URL() {
var _local2 = _root._url.split("\\").join("/").split("/");
_local2.pop();
var _local3 = _local2.join("/") + "/";
return(_local3);
}
static function get SKIN_CONFIG() {
return(_skinConfig);
}
static function set SKIN_CONFIG(o) {
_skinConfig = o;
//return(SKIN_CONFIG);
}
static function get TICKER_CFG() {
return(_tickerCfg);
}
static function set TICKER_CFG(o) {
if (!(_root.sc === undefined)) {
o.stageColor = _root.sc;
}
_tickerCfg = o;
//return(TICKER_CFG);
}
static function get GLOBAL_CFG() {
return(_globalCfg);
}
static function set GLOBAL_CFG(o) {
_globalCfg = o;
//return(GLOBAL_CFG);
}
static function get ITEM_ARRAY() {
return(_itemArray);
}
static function set ITEM_ARRAY(o) {
_itemArray = o;
//return(ITEM_ARRAY);
}
static function get FULL_DICT() {
return(_fullDict);
}
static function set FULL_DICT(o) {
_fullDict = o;
//return(FULL_DICT);
}
static function clearAll() {
_channel = null;
_language = null;
_itemArray = null;
_globalCfg = null;
_tickerCfg = null;
_fullDict = null;
}
static function findVar(prop) {
var _local4 = 10;
var _local2 = "amp;" + prop;
var _local5 = 0;
do {
if (_root[prop] === undefined) {
_root[prop] = _root[_local2];
_local2 = "amp;" + _local2;
} else {
return(_root[prop]);
}
} while ((_local5++) < _local4);
}
static function parseMap(index) {
var _local4 = (_root.map || (TICKER_CFG.default_map)) || (MAP_DEFAULT);
var _local2 = _local4.split("")[index];
if ((_local2 === "_") || (_local2 === undefined)) {
var _local3 = TICKER_CFG.default_map || (MAP_DEFAULT);
_local2 = _local3.split("")[index] || "0";
}
return(_local2);
}
static function parseTargetWindow(targetValue) {
switch (targetValue) {
case "0" :
return(com.slide.utils.URL._SELF);
case "1" :
return(com.slide.utils.URL._BLANK);
case "2" :
return(com.slide.utils.URL._TOP);
case "3" :
return(com.slide.utils.URL._DIE);
case "4" :
return(com.slide.utils.URL._PARENT);
}
return(com.slide.utils.URL._BLANK);
}
static function WEB_DOMAIN() {
return(_globalCfg.ad_click);
}
var nopretty = "";
static var _channel = findVar("channel") || "4294972048";
static var _language = findVar("lang") || "en-us";
static var MAP_DEFAULT = "546111111";
static var ONE = "1";
}
Symbol 87 MovieClip [__Packages.com.slide.utils.URL] Frame 0
class com.slide.utils.URL
{
function URL () {
}
static function parseUrl(url) {
var _local2 = url.split(BSLASH).join(FSLASH).split(FSLASH);
var _local1 = {};
_local1.url = url + "";
_local1.protocol = _local2[0].slice(0, -1);
_local1.domain = _local2[2].split(":")[0];
_local1.port = _local2[2].split(":")[1];
_local1.path = _local2.slice(2, -1).join(FSLASH) + FSLASH;
_local1.file = _local2.slice(-1).pop().split("?")[0];
_local1.query = _local2.slice(-1).pop().split("?")[1];
_local1.base = _local2.slice(0, 3).join(FSLASH) + FSLASH;
return(_local1);
}
static function decoFinder(base, itm) {
var _local1;
_local1 = base + "decofinder2/0/0/";
_local1 = _local1 + escape(imageUrl(itm));
return(_local1);
}
static function imageUrl(itm) {
var _local1;
_local1 = (isInArray(itm.content_type, SUPPORTEDIMG) ? (itm.media_url) : (itm.item_img_url));
return(_local1);
}
static function isInArray(input, arrayData) {
var _local1 = 0;
while (_local1 < arrayData.length) {
if (arrayData[_local1] == input) {
return(true);
}
_local1++;
}
return(false);
}
static function cleanURL(url) {
if ((url.indexOf("?") == -1) && (url.indexOf("&") == -1)) {
return(url);
}
var _local1 = url.split("?").join("&").split("&");
var _local3 = _local1.shift();
return((_local3 + "?") + _local1.join("&"));
}
static function createEmptyTarget(namespace) {
var _local3 = _root.hidden_mc || (_root.createEmptyMovieClip("hidden_mc", com.slide.managers.RootDepthManager.HIDDEN));
var _local2 = _root.hidden_mc;
return(_local2[namespace] || (_local2.createEmptyMovieClip(namespace, _local2.getNextHighestDepth())));
}
static function getEmbeddedURL(callback, fullURL) {
var _local5 = "com.slide.utils.URL.getEmbeddedURL";
var cb = callback;
var _local1 = {};
_local1.onLoadError = function (target) {
trace(target._url);
var _local1 = target._url + "";
target.unloadMovie();
cb(_local1.substr(0, _local1.lastIndexOf("/")));
};
_local1.onLoadInit = function (target) {
trace(target._url);
trace(target._url + "");
var _local1 = target._url + "";
target.unloadMovie();
cb(_local1.substr(0, _local1.lastIndexOf("/")));
};
var _local4 = createEmptyTarget(_local5);
var _local3 = new MovieClipLoader();
_local3.addListener(_local1);
_local3.loadClip((fullURL ? "" : "/") + "favicon.ico", _local4);
}
static function getURL(url, window, method) {
var _local3 = (window || (com.slide.FlashVars.__get__TARGET_WINDOW())) || (_BLANK);
if (_local3 == _DIE) {
} else {
url = url || "http://www.slide.com/?url=false";
url = cleanURL(url);
if (_local3 == _SELF) {
_root.getURL(url);
} else {
_root.getURL(url, _local3);
}
}
}
static var _DIE = "slide.com.utils.url._die";
static var _BLANK = "_blank";
static var _SELF = "_self";
static var _TOP = "_top";
static var _PARENT = "_parent";
static var FSLASH = "/";
static var BSLASH = "\\";
static var SUPPORTEDIMG = ["image/jpeg", "image/gif", "image/png"];
}
Symbol 88 MovieClip [__Packages.com.slide.managers.DepthManager] Frame 0
class com.slide.managers.DepthManager
{
var _managee, _mc, _depth;
function DepthManager (mc) {
_managee = mc;
}
function swapTop(clip) {
if (_mc) {
_mc.swapDepth(_depth);
}
_mc = clip;
_depth = _mc.getDepth();
var _local2 = _managee.getNextHighestDepth();
clip.swapDepths(_local2);
}
}
Symbol 89 MovieClip [__Packages.com.slide.managers.RootDepthManager] Frame 0
class com.slide.managers.RootDepthManager extends com.slide.managers.DepthManager
{
function RootDepthManager () {
super(_root);
}
static var STAGE_LISTENER_MC = -100004;
static var HIDDEN = -100001;
static var PACKAGES = -100000;
static var MASK_MC = -16383;
static var PRELOADER_MC = -16381;
static var NOTICE_MC = -16377;
static var _QUANTCAST_COM = 0;
static var TRANS_BG = 1;
static var SKIN_BG = 2;
static var TRANSITION_MC = 3;
static var FX_MC = 99;
static var THEME_MC = 100;
static var CONTROLS_MC = 1100;
static var SBUTTON = 200;
static var AD_MC = 201;
static var SKIN_MC = 999;
static var NCAPTION_MC = 1000;
static var __JAVASCRIPT_CALLBACK = 1562;
static var _TH_ = 6788;
static var CAPTION_MC = 6799;
static var FANTAB_MC = 6800;
static var VIDEO_GUI_MC = 6801;
static var MUSIC_GUI_MC = 6802;
static var BUG_MC = 6803;
static var MENU_MC = 6804;
static var LOADBAR_MC = 6805;
static var WATER_MARK = 8000;
static var THIRD_PARTY_AD_UNIT = 9000;
}
Symbol 90 MovieClip [__Packages.ChromelessHarness] Frame 0
class ChromelessHarness extends GenericBroadcaster
{
var _mc, ytPlayer, _dims, prevVol, prevVolState, _videoControls, _mcRefs, _currentVideo, _playtimeInt, _ytState, wrapDispatchEvent, counter_memory, _countdownInterval;
function ChromelessHarness (mc) {
super();
_mc = mc;
}
function isReady() {
return(ytPlayer.isPlayerLoaded());
}
function init(menuVisible, dims) {
_dims = dims;
_global.youtubeScope = this;
prevVol = 100;
prevVolState = 1;
_showMenu = menuVisible;
initClips();
initVideoControls();
initEvents();
stateEvent("loaded");
}
function initEvents() {
_videoControls.addEventListener("VideoControls_menuClick", this);
_videoControls.addEventListener("VideoControls_speakerClick", this);
_videoControls.addEventListener("VideoControls_playPauseClick", this);
_videoControls.addEventListener("VideoControls_onSeek", this);
_videoControls.addEventListener("VideoControls_onVolume", this);
}
function initVideoControls() {
var _local2 = {w:_baseControlW, h:_baseControlH};
_videoControls = new VideoControls(_mcRefs.controls, _local2, _showMenu);
}
function playVideoId(videoId, publisherId, playerURL) {
if (!playerURL) {
playerURL = youtube_url;
}
hideErrorMessage();
_currentVideo = {id:videoId, publisherId:publisherId, playerURL:playerURL};
if (videoId == "preroll") {
playPreroll();
} else {
preRollCleanup();
if (ytPlayer.isPlayerLoaded()) {
playVideoById(videoId, publisherId);
} else {
loadYtPlayer(videoId, publisherId, playerURL);
}
}
}
function setAutoplay(val) {
_autoPlay = val;
}
function onPlay() {
hideForward();
}
function loadYtPlayer(videoId, publisherId, playerURL) {
var scope = this;
var _local3 = {};
var _local4 = new MovieClipLoader();
_local4.addListener(_local3);
_local3.onLoadInit = function () {
_root.onEnterFrame = function () {
if (scope.ytPlayer.isPlayerLoaded()) {
_root.onEnterFrame = null;
scope.onPlayerLoad(videoId, publisherId);
}
};
};
_local4.loadClip(appendKey(playerURL), ytPlayer);
}
function externForward(header, body, videoId, countdown) {
var scope = this;
var _local3 = {};
var _local2 = new MovieClipLoader();
_local2.addListener(_local3);
_local3.onLoadInit = function () {
scope.forwardLoaded(header, body, videoId, countdown);
};
_local2.loadClip(makeForwardUrl(), _mcRefs.forward);
}
function forwardLoaded(header, body, videoId, countdown) {
var _local2 = _mcRefs.forward;
_local2.setButtonText("Forward");
_local2.setHeaderText(header);
_local2.setBodyText(body);
size_to(_mcRefs.forward, _dims.width, _dims.height);
if (countdown) {
initCounter(videoId);
}
_local2.setCounterVisible(countdown);
setForwardClick(_local2.forward_btn, videoId);
setReplayClick(_local2.replay_btn, videoId);
setBackgroundClick(_local2.background_mc, videoId);
_local2._visible = true;
_mcRefs.playerContainer._visible = false;
}
function initCounter(videoId) {
counter_paused = false;
var _local2 = _mcRefs.forward.getNumPieSlices();
_pieSliceIncrement = _local2 / _timerLength;
updateCounter(_timerLength, videoId);
}
function appendKey(playerURL) {
if (playerURL.indexOf("youtube.com/apiplayer") > -1) {
return(playerURL + "?key=AI39si7XysT8GccmRKIaJBaoa4KRYd2njmZPSJu3NbCkrvkvbJot0GZmts8yL0I0sQL3A0Iaps88zxlkXlV8RVhKlRi1NTW83w");
}
return(playerURL);
}
function onPlayerLoad(videoId, publisherId) {
initYTEvents();
resizePlayerAndControls(_dims.width, _dims.height);
playVideoById(videoId, publisherId);
setTimerPoll();
ytPlayer.unMute();
ytPlayer.setVolume(prevVol);
_videoControls.setVolumeView(prevVol);
}
function playVideoById(videoId, publisherId) {
_suppressFinished = true;
if (_autoPlay) {
ytPlayer.loadVideoById(videoId, publisherId);
logEvent("autostart");
} else {
ytPlayer.cueVideoById(videoId, publisherId);
}
if (_root.automute) {
ytPlayer.mute();
}
_mcRefs.playerContainer._visible = true;
onPlay();
}
function setTimerPoll() {
var _local2 = this;
_playtimeInt = setInterval(this, "getVidTime", 500);
}
function getVidTime() {
if (ytPlayer.isPlayerLoaded()) {
if (ytPlayer.getPlayerState() == 1) {
_currentVideo.currentTime = ytPlayer.getCurrentTime();
_videoControls.setPlayTime(Math.floor(_currentVideo.currentTime));
_videoControls.setSeekPosition(_currentVideo.currentTime / _currentVideo.totalSeconds);
}
}
}
function initYTEvents() {
ytPlayer.addEventListener("onStateChange", onYTStateChange);
ytPlayer.addEventListener("onError", onPlayerError);
_mcRefs.playerContainer.onMouseDown = onPlayerMouseDown;
}
function onPlayerMouseDown() {
if ((_global.youtubeScope.ytPlayer.hitTest(_xmouse, _ymouse) and (_global.youtubeScope.ytPlayer.getPlayerState() != 5)) and _level0.container.playerContainer._visible) {
_global.youtubeScope.logEvent("clickthru");
}
}
function onPlayerError(ed) {
if (!(ed === 100)) {
} else {
_global.youtubeScope.showErrorMessage("Video disabled by YouTube");
}
}
function onYTStateChange(ed) {
_global.youtubeScope.setPlayerState();
}
function setPlayerState() {
_ytState = ytPlayer.getPlayerState();
switch (_ytState) {
case -1 :
state_yt_loaded();
break;
case 0 :
state_finished();
break;
case 1 :
state_playing();
break;
case 2 :
state_paused();
break;
case 3 :
state_buffering();
break;
case 5 :
state_video_cued();
}
_videoControls.setPlayState(_ytState);
}
function state_finished() {
if (!_suppressFinished) {
stateEvent("finished");
}
}
function state_playing() {
_suppressFinished = false;
_currentVideo.totalSeconds = ytPlayer.getDuration();
stateEvent("playing");
}
function state_paused() {
stateEvent("paused");
}
function state_buffering() {
}
function state_video_cued() {
logEvent("cued");
}
function state_yt_loaded() {
}
function stateEvent(sname) {
wrapDispatchEvent({type:"ChromelessHarness_stateEvent", name:sname, videoid:_currentVideo.id});
}
function logEvent(sname) {
wrapDispatchEvent({type:"ChromelessHarness_logEvent", name:sname, videoid:_currentVideo.id});
}
function VideoControls_menuClick() {
wrapDispatchEvent({type:"VideoControls_menuClick"});
}
function VideoControls_speakerClick() {
toggleMute();
}
function VideoControls_playPauseClick() {
if (_ytState != 1) {
if (_ytState == 5) {
logEvent("manualstart");
}
ytPlayer.playVideo();
} else {
ytPlayer.pauseVideo();
}
}
function VideoControls_onSeek(ed) {
var _local2 = Math.floor(ytPlayer.getDuration() * ed.percent);
ytPlayer.seekTo(_local2, true);
}
function VideoControls_onVolume(ed) {
if (ed.volume != prevVol) {
ytPlayer.setVolume(ed.volume);
prevVol = ed.volume;
_videoControls.setVolumeView(ed.volume);
prevVolState = ed.volume;
}
}
function toggleMute() {
var _local2 = ytPlayer.getVolume();
if ((_local2 > 0) || (_local2 < 0)) {
_local2 = 0;
_videoControls.setVolumeView(0);
_videoControls.setMuteView(true);
} else {
ytPlayer.unMute();
_local2 = prevVol;
_videoControls.setVolumeView(prevVolState);
_videoControls.setMuteView(false);
}
ytPlayer.setVolume(_local2);
}
function playPreroll() {
if (!_mcRefs.preroll._loaded) {
return(loadPreroll());
}
_mcRefs.playerContainer._visible = false;
var scope = this;
size_to(_mcRefs.preroll, _dims.width, _dims.height);
_mcRefs.preroll._visible = true;
_mcRefs.preroll.play();
_mcRefs.preroll.onEnterFrame = function () {
if (this._currentframe != this._totalframes) {
return(undefined);
}
scope.preRollCleanup();
scope.stateEvent("finished");
};
}
function preRollCleanup() {
_mcRefs.preroll.onEnterFrame = null;
_mcRefs.preroll._visible = false;
}
function loadPreroll() {
var scope = this;
var _local4 = makePrerollUrl();
var _local2 = {};
var _local3 = new MovieClipLoader();
_local3.addListener(_local2);
_local2.onLoadInit = function (target_mc) {
target_mc.stop();
scope._mcRefs.preroll._loaded = true;
scope.playPreroll();
};
_mcRefs.preroll._visible = false;
_local3.loadClip(_local4, _mcRefs.preroll);
return(true);
}
function makePrerollUrl() {
_global.debug(swfUrlBase() + "preroll2.swf");
return(swfUrlBase() + "preroll2.swf");
}
function makeForwardUrl() {
return(swfUrlBase() + "/fbForward.swf");
}
function swfUrlBase() {
var _local2 = _root._url.split("\\").join("/").split("/");
_local2.pop();
var _local3 = _local2.join("/") + "/";
return(_local3);
}
function resizePlayerAndControls(w, h) {
_mcRefs.controls._y = 0;
resizePlayer(_mcRefs.controls._width - 0.5);
_mcRefs.controls._y = ytPlayer._y + ytPlayer._height;
_mcRefs.playerContainer._width = w;
_mcRefs.playerContainer._height = h;
}
function resizePlayer(w) {
var _local2 = w;
var _local3 = (_ytBaseH / _ytBaseW) * w;
ytPlayer.setSize(_local2, _local3);
}
function size_to(target_mc, w, h) {
target_mc._xscale = (target_mc._yscale = 100);
var _local4 = w / target_mc._width;
var _local2 = h / target_mc._height;
var _local3 = Math.min(_local4, _local2);
target_mc._yscale = (target_mc._xscale = _local3 * 100);
target_mc._width = Math.floor(target_mc._width);
target_mc._height = Math.floor(target_mc._height);
}
function initClips() {
_mcRefs = {};
_mcRefs.playerContainer = _mc.createEmptyMovieClip("playerContainer", _mc.getNextHighestDepth());
_mcRefs.preroll = _mc.createEmptyMovieClip("preroll", _mc.getNextHighestDepth());
ytPlayer = (_mcRefs.ytplay = _mcRefs.playerContainer.createEmptyMovieClip("ytplay", _mcRefs.playerContainer.getNextHighestDepth()));
_mcRefs.controls = _mcRefs.playerContainer.createEmptyMovieClip("controls", _mcRefs.playerContainer.getNextHighestDepth());
_mcRefs.forward = _mc.createEmptyMovieClip("forward", _mc.getNextHighestDepth());
_mcRefs.preroll._loaded = false;
_mcRefs.playerContainer._visible = false;
}
function initForwardClips() {
_mcRefs.forward = _mc.createEmptyMovieClip("forward", _mcRefs.forward.getDepth());
_mcRefs.forwardBg = _mcRefs.forward.createEmptyMovieClip("forwardBg", _mcRefs.forward.getNextHighestDepth());
_mcRefs.bForward = _mcRefs.forward.createEmptyMovieClip("bForward", _mcRefs.forward.getNextHighestDepth());
_mcRefs.header = _mcRefs.forward.createEmptyMovieClip("header", _mcRefs.forward.getNextHighestDepth());
_mcRefs.body = _mcRefs.forward.createEmptyMovieClip("body", _mcRefs.forward.getNextHighestDepth());
_mcRefs.counter = _mcRefs.forward.createEmptyMovieClip("body", _mcRefs.forward.getNextHighestDepth());
_mcRefs.counterTitle = _mcRefs.forward.createEmptyMovieClip("counterTitle", _mcRefs.forward.getNextHighestDepth());
}
function showErrorMessage(msg) {
_mcRefs.playerContainer._visible = false;
var _local3 = 360;
var _local6 = 300;
_mcRefs.message = _mc.createEmptyMovieClip("message", _mc.getNextHighestDepth());
_mcRefs.message.lineStyle(1, 0);
Draw.square(_mcRefs.message, 0, 0, _local3, _local6, 85, 16777215, 0);
var _local7 = messageTF(4613538, 22, true);
var _local2 = _local7.getTextExtent(msg);
var _local5 = _local2.textFieldWidth + 10;
var _local4 = _local2.textFieldHeight;
createText(_mcRefs.message, _local5, _local4, 4613538, 22, true);
_mcRefs.message._tf.text = msg;
_mcRefs.message._tf._x = (_local3 / 2) - (_local5 / 2);
_mcRefs.message._tf._y = (_local6 / 2) - (_local4 / 2);
size_to(_mcRefs.message, _dims.width, _dims.height);
}
function hideErrorMessage() {
removeMovieClip(_mcRefs.message);
}
function showForward(header, body, videoId, countdown) {
initForwardClips();
externForward(header, body, videoId, countdown);
return(undefined);
}
function setForwardClick(mc, videoId) {
var scope = this;
mc.onRelease = function () {
scope.onForwardClick(videoId);
};
}
function setReplayClick(mc, videoId) {
var scope = this;
mc.onRelease = function () {
clearInterval(scope._countdownInterval);
scope.replayVideo();
};
}
function replayVideo() {
_global.youtubeScope.ytPlayer.seekTo(0, true);
_mcRefs.playerContainer._visible = true;
hideForward();
logEvent("replaystart");
}
function setBackgroundClick(mc, videoId) {
var _local3 = this;
mc.useHandCursor = false;
mc.onRelease = function () {
};
}
function pause_countdown() {
counter_paused = true;
}
function resume_countdown() {
counter_paused = false;
updateCounter(counter_memory, _currentVideo.id);
}
function updateCounter(counter, videoId) {
clearInterval(_countdownInterval);
if (counter_paused) {
return(undefined);
}
var _local4 = (1 + _timerLength) - counter;
var _local3 = Math.floor(_local4 * _pieSliceIncrement);
_mcRefs.forward.setSecondCounter(counter + " seconds");
_mcRefs.forward.setPieSlice(_local3);
if (counter > 0) {
counter--;
counter_memory = counter;
_countdownInterval = setInterval(this, "updateCounter", 1000, counter, videoId);
} else {
callForwardFinished(videoId);
}
}
function callForwardFinished(videoId) {
wrapDispatchEvent({type:"ChromelessHarness_forwardEvent", eventName:"timerEnded", vidId:videoId});
}
function hideForward() {
_mcRefs.forward._visible = false;
}
function onForwardClick(videoId) {
wrapDispatchEvent({type:"ChromelessHarness_forwardEvent", eventName:"buttonClick", vidId:videoId});
}
function onReplayClick(videoId) {
}
function createText(mc, w, h, tcolor, tsize, bold) {
mc.createTextField("_tf", mc.getNextHighestDepth(), 0, 0, w, h);
mc.tf = mc._tf;
mc.tf.setNewTextFormat(messageTF(tcolor, tsize, bold));
mc.tf.selectable = false;
return(mc.tf);
}
function messageTF(tcolor, tsize, bold) {
var _local1 = new TextFormat();
_local1.color = tcolor;
_local1.font = "_sans";
_local1.size = tsize;
_local1.align = "center";
_local1.bold = bold;
return(_local1);
}
var youtube_url = "http://www.youtube.com/apiplayer";
var developerkey = "AI39si7XysT8GccmRKIaJBaoa4KRYd2njmZPSJu3NbCkrvkvbJot0GZmts8yL0I0sQL3A0Iaps88zxlkXlV8RVhKlRi1NTW83w";
var _suppressFinished = false;
var _ytBaseW = 480;
var _ytBaseH = 360;
var _baseControlW = 233;
var _baseControlH = 19.5;
var _showMenu = false;
var _timerLength = 5;
var _pieSliceIncrement = 1;
var _autoPlay = true;
var counter_paused = false;
}
Symbol 91 MovieClip [__Packages.VideoControls] Frame 0
class VideoControls extends GenericBroadcaster
{
var _showMenu, _mc, _mcRefs, _playState, wrapDispatchEvent;
function VideoControls (mc, dims, menuVisible) {
super();
_showMenu = menuVisible;
if (dims.w) {
_width = dims.w;
}
if (dims.h) {
_height = dims.h;
}
_mc = mc;
initClips();
render();
}
function render() {
drawGradientBG(_mcRefs.bg, _width, _height);
attachClips();
createTimer();
positionClips();
setClickEvents();
setGrabberEvents();
togglePlayPause();
createMenuBtn();
}
function togglePlayPause() {
_mcRefs.pause._visible = isPlaying(_playState);
_mcRefs.play._visible = !_mcRefs.pause._visible;
}
function isPlaying(playState) {
if (!(playState === 1)) {
} else {
return(true);
}
return(false);
}
function controlTF() {
var _local1 = new TextFormat();
_local1.color = 16777215 /* 0xFFFFFF */;
_local1.font = "_sans";
_local1.size = 9;
return(_local1);
}
function createTimer() {
_mcRefs.counter.createTextField("counter", _mcRefs.counter.getNextHighestDepth(), 0, 0, 27, 20);
_mcRefs.counter.tf = _mcRefs.counter.counter;
_mcRefs.counter.tf.setNewTextFormat(controlTF());
_mcRefs.counter.tf.selectable = false;
setTimerValue(0);
}
function createMenuBtn() {
if (!_showMenu) {
return(false);
}
var scope = this;
_mcRefs.menuBtn.createTextField("menuBtn", _mcRefs.menuBtn.getNextHighestDepth(), 0, 0, 30, 20);
_mcRefs.menuBtn.tf = _mcRefs.menuBtn.menuBtn;
_mcRefs.menuBtn.tf.setNewTextFormat(controlTF());
_mcRefs.menuBtn.tf.selectable = false;
_mcRefs.menuBtn.tf.text = "Menu";
lazyAttach(_mcRefs.divider3, "divider", "divider3");
_mcRefs.divider3._x = (_mcRefs.speakerControls._x + _mcRefs.speakerControls._width) + 3;
_mcRefs.menuBtn._y = verticalCenter(_mcRefs.menuBtn) + 3;
_mcRefs.menuBtn._x = (_mcRefs.divider3._x + _mcRefs.divider3._width) + 2;
makeClickTarget(_mcRefs.menuBtn);
_mcRefs.menuBtn.clickTarget.onRelease = function () {
scope.menuClick();
};
}
function setTimerValue(seconds) {
_mcRefs.counter.tf.text = getTimerStringValue(seconds);
}
function getTimerStringValue(seconds) {
var _local3 = Math.floor(seconds / 60);
seconds = seconds % 60;
return(String((zeroPad(_local3) + ":") + zeroPad(seconds)));
}
function zeroPad(number) {
var _local1 = String(number);
if (_local1.length > 1) {
return(_local1);
}
return("0" + _local1);
}
function playPauseClick() {
wrapDispatchEvent({type:"VideoControls_playPauseClick"});
}
function speakerClick() {
wrapDispatchEvent({type:"VideoControls_speakerClick"});
}
function menuClick() {
wrapDispatchEvent({type:"VideoControls_menuClick"});
}
function setGrabberEvents() {
var scope = this;
var _local2 = {};
_local2.onMouseUp = function () {
if (scope._seekActive) {
var _local1 = scope._mcRefs;
scope._seekActive = false;
_local1.grabber.stopDrag();
var _local2 = (_local1.grabber._x - _local1.vidTimeline._x) / _local1.vidTimeline._width;
scope.setSeekPercent(_local2);
}
};
_mcRefs.grabber.onPress = function () {
scope._seekActive = true;
var _local1 = scope._mcRefs;
startDrag (_local1.grabber, false, _local1.vidTimeline._x, _local1.grabber._y, (_local1.vidTimeline._x + _local1.vidTimeline._width) - _local1.grabber._width, _local1.grabber._y);
};
_mcRefs.sensor.onPress = function () {
var _local2 = scope._mcRefs;
this.onEnterFrame = function () {
scope.setVolume(scope.normalizeVolume(this._xmouse));
};
};
_mcRefs.sensor.onRelease = function () {
delete this.onEnterFrame;
};
_mcRefs.sensor.onReleaseOutside = function () {
delete this.onEnterFrame;
};
_mcRefs.sensor.onDragOut = function () {
delete this.onEnterFrame;
};
Mouse.addListener(_local2);
}
function normalizeVolume(raw) {
var _local1 = 0;
if (raw <= 3) {
_local1 = 0;
} else if (raw >= 13) {
_local1 = 100;
} else {
_local1 = (raw - 3) * 10;
}
return(_local1);
}
function setSeekPercent(seekPercent) {
wrapDispatchEvent({type:"VideoControls_onSeek", percent:seekPercent});
}
function setVolume(volume) {
wrapDispatchEvent({type:"VideoControls_onVolume", volume:volume});
}
function clickSeek(topMouse) {
_mcRefs.grabber._visible = false;
_mcRefs.grabber._x = topMouse + _mcRefs.vidTimeline._x;
if (!_showMenu) {
setSeekPercent(topMouse / (_mcRefs.vidTimeline._width - 30));
} else {
setSeekPercent(topMouse / _mcRefs.vidTimeline._width);
}
_mcRefs.grabber._visible = true;
}
function setPlayState(playState) {
_playState = playState;
togglePlayPause();
}
function setPlayTime(seconds) {
if (!Number(seconds)) {
return(setTimerValue(0));
}
setTimerValue(seconds);
}
function setSeekPosition(percent) {
if (_seekActive) {
return(false);
}
var _local2 = _mcRefs.vidTimeline._width * percent;
_mcRefs.grabber._x = _mcRefs.vidTimeline._x + _local2;
}
function setVolumeView(level) {
if (level <= 0) {
_mcRefs.speaker_mute._visible = false;
_mcRefs.speaker_0._visible = true;
_mcRefs.speaker_20._visible = false;
_mcRefs.speaker_40._visible = false;
_mcRefs.speaker_60._visible = false;
_mcRefs.speaker_80._visible = false;
_mcRefs.speaker_100._visible = false;
} else if (level <= 20) {
_mcRefs.speaker_mute._visible = false;
_mcRefs.speaker_0._visible = false;
_mcRefs.speaker_20._visible = true;
_mcRefs.speaker_40._visible = false;
_mcRefs.speaker_60._visible = false;
_mcRefs.speaker_80._visible = false;
_mcRefs.speaker_100._visible = false;
} else if (level <= 40) {
_mcRefs.speaker_mute._visible = false;
_mcRefs.speaker_0._visible = false;
_mcRefs.speaker_20._visible = false;
_mcRefs.speaker_40._visible = true;
_mcRefs.speaker_60._visible = false;
_mcRefs.speaker_80._visible = false;
_mcRefs.speaker_100._visible = false;
} else if (level <= 60) {
_mcRefs.speaker_mute._visible = false;
_mcRefs.speaker_0._visible = false;
_mcRefs.speaker_20._visible = false;
_mcRefs.speaker_40._visible = false;
_mcRefs.speaker_60._visible = true;
_mcRefs.speaker_80._visible = false;
_mcRefs.speaker_100._visible = false;
} else if (level <= 80) {
_mcRefs.speaker_mute._visible = false;
_mcRefs.speaker_0._visible = false;
_mcRefs.speaker_20._visible = false;
_mcRefs.speaker_40._visible = false;
_mcRefs.speaker_60._visible = false;
_mcRefs.speaker_80._visible = true;
_mcRefs.speaker_100._visible = false;
} else if (level > 80) {
_mcRefs.speaker_mute._visible = false;
_mcRefs.speaker_0._visible = false;
_mcRefs.speaker_20._visible = false;
_mcRefs.speaker_40._visible = false;
_mcRefs.speaker_60._visible = false;
_mcRefs.speaker_80._visible = false;
_mcRefs.speaker_100._visible = true;
}
}
function setMuteView(muted) {
_mcRefs.speaker_mute._visible = muted;
}
function setDefaults() {
_playState = -1;
setVolumeView(100);
}
function setClickEvents() {
var scope = this;
makeClickTarget(_mcRefs.playNPause);
_mcRefs.playNPause.clickTarget.onRelease = function () {
scope.playPauseClick();
};
makeClickTarget(_mcRefs.speaker);
_mcRefs.speaker.clickTarget.onRelease = function () {
scope.speakerClick();
};
Draw.square(_mcRefs.tlTarget, 0, 0, _mcRefs.vidTimeline._width, _height, 0, 2267596, 0);
_mcRefs.tlTarget.onRelease = function () {
scope.clickSeek(scope._mcRefs.vidTimeline._xmouse);
};
}
function makeClickTarget(clip) {
var _local2 = clip.createEmptyMovieClip("clickTarget", clip.getNextHighestDepth());
Draw.square(_local2, 0, 0, clip._width, clip._height, 0, 16777215, 0);
}
function positionClips() {
_mcRefs.logo._y = verticalCenter(_mcRefs.logo);
_mcRefs.playNPause._y = verticalCenter(_mcRefs.playNPause);
_mcRefs.grabber._y = verticalCenter(_mcRefs.grabber);
_mcRefs.vidTimeline._y = verticalCenter(_mcRefs.vidTimeline);
_mcRefs.counter._y = _mcRefs.vidTimeline._y - 6;
_mcRefs.speakerControls._y = verticalCenter(_mcRefs.speakerControls);
_mcRefs.logo._x = 3;
_mcRefs.divider1._x = (_mcRefs.logo._x + _mcRefs.logo._width) + 3;
_mcRefs.playNPause._x = (_mcRefs.divider1._x + _mcRefs.divider1._width) + 4;
_mcRefs.vidTimeline._x = (_mcRefs.playNPause._x + _mcRefs.playNPause._width) + 4;
_mcRefs.grabber._x = _mcRefs.vidTimeline._x;
_mcRefs.tlTarget._x = _mcRefs.vidTimeline._x;
_mcRefs.counter._x = (_mcRefs.vidTimeline._x + _mcRefs.vidTimeline._width) + 3;
_mcRefs.divider2._x = (_mcRefs.counter._x + _mcRefs.counter._width) + 3;
drawRectFill(_mcRefs.sensor, 16, 12, 0, 0);
_mcRefs.sensor._x = (_mcRefs.divider2._x + _mcRefs.divider2._width) + 8;
_mcRefs.sensor._y = _mcRefs.sensor._y + 3;
_mcRefs.speakerControls._x = (_mcRefs.divider2._x + _mcRefs.divider2._width) + 4;
_mcRefs.speaker_0._x = _mcRefs.speaker_0._x + 8;
_mcRefs.speaker_20._x = _mcRefs.speaker_20._x + 8;
_mcRefs.speaker_40._x = _mcRefs.speaker_40._x + 8;
_mcRefs.speaker_60._x = _mcRefs.speaker_60._x + 8;
_mcRefs.speaker_80._x = _mcRefs.speaker_80._x + 8;
_mcRefs.speaker_100._x = _mcRefs.speaker_100._x + 8;
}
function attachClips() {
lazyAttach(_mcRefs.logo, "slide_logo");
lazyAttach(_mcRefs.divider1, "divider", "divider1");
lazyAttach(_mcRefs.divider2, "divider", "divider2");
lazyAttach(_mcRefs.play, "play");
lazyAttach(_mcRefs.pause, "pause");
lazyAttach(_mcRefs.grabber, "grabber");
lazyAttach(_mcRefs.vidTimeline, "vidTimeline");
if (!_showMenu) {
_mcRefs.vidTimeline._width = _mcRefs.vidTimeline._width + 30;
}
lazyAttach(_mcRefs.speaker, "speaker");
lazyAttach(_mcRefs.speaker_mute, "speaker_mute");
lazyAttach(_mcRefs.speaker_0, "speaker_0");
lazyAttach(_mcRefs.speaker_20, "speaker_20");
lazyAttach(_mcRefs.speaker_40, "speaker_40");
lazyAttach(_mcRefs.speaker_60, "speaker_60");
lazyAttach(_mcRefs.speaker_80, "speaker_80");
lazyAttach(_mcRefs.speaker_100, "speaker_100");
}
function lazyAttach(clip, name, specName) {
if (!specName) {
specName = name;
}
var _local1 = clip.createEmptyMovieClip("container", clip.getNextHighestDepth());
_local1.attachMovie(name, specName, _local1.getNextHighestDepth());
}
function verticalCenter(clip) {
return((_height / 2) - (clip._height / 2));
}
function drawRectFill(mc, w, h, c, a) {
mc.clear();
mc.beginFill(c, a);
mc.moveTo(0, 0);
mc.lineTo(w, 0);
mc.lineTo(w, h);
mc.lineTo(0, h);
mc.lineTo(0, 0);
mc.endFill();
}
function drawGradientBG(bgmc, w, h) {
var _local6 = "linear";
var _local5 = [6908265, 0];
var _local3 = [100, 100];
var _local7 = [0, 51];
var _local4 = {a:0, b:193.26, c:0, d:-118.8, e:0, f:0, g:0, h:78.43, i:1};
bgmc.lineStyle(1, 4802632, 100);
bgmc.beginGradientFill(_local6, _local5, _local3, _local7, _local4);
bgmc.moveTo(0, 0);
bgmc.lineTo(w, 0);
bgmc.lineTo(w, h);
bgmc.lineTo(0, h);
bgmc.lineTo(0, 0);
bgmc.endFill();
}
function initClips() {
_mcRefs = {};
_mcRefs.c = _mc.createEmptyMovieClip("c", _mc.getNextHighestDepth());
_mcRefs.bg = _mcRefs.c.createEmptyMovieClip("bg", _mcRefs.c.getNextHighestDepth());
_mcRefs.playNPause = _mcRefs.c.createEmptyMovieClip("playNPause", _mcRefs.c.getNextHighestDepth());
_mcRefs.play = _mcRefs.playNPause.createEmptyMovieClip("play", _mcRefs.playNPause.getNextHighestDepth());
_mcRefs.pause = _mcRefs.playNPause.createEmptyMovieClip("pause", _mcRefs.playNPause.getNextHighestDepth());
_mcRefs.sensor = _mcRefs.c.createEmptyMovieClip("sensor", _mcRefs.c.getNextHighestDepth());
_mcRefs.speakerControls = _mcRefs.c.createEmptyMovieClip("speakerControls", _mcRefs.c.getNextHighestDepth());
_mcRefs.speaker = _mcRefs.speakerControls.createEmptyMovieClip("speaker", _mcRefs.speakerControls.getNextHighestDepth());
_mcRefs.speaker_mute = _mcRefs.speakerControls.createEmptyMovieClip("speaker_mute", _mcRefs.speakerControls.getNextHighestDepth());
_mcRefs.speaker_0 = _mcRefs.speakerControls.createEmptyMovieClip("speaker_0", _mcRefs.speakerControls.getNextHighestDepth());
_mcRefs.speaker_20 = _mcRefs.speakerControls.createEmptyMovieClip("speaker_20", _mcRefs.speakerControls.getNextHighestDepth());
_mcRefs.speaker_40 = _mcRefs.speakerControls.createEmptyMovieClip("speaker_40", _mcRefs.speakerControls.getNextHighestDepth());
_mcRefs.speaker_60 = _mcRefs.speakerControls.createEmptyMovieClip("speaker_60", _mcRefs.speakerControls.getNextHighestDepth());
_mcRefs.speaker_80 = _mcRefs.speakerControls.createEmptyMovieClip("speaker_80", _mcRefs.speakerControls.getNextHighestDepth());
_mcRefs.speaker_100 = _mcRefs.speakerControls.createEmptyMovieClip("speaker_100", _mcRefs.speakerControls.getNextHighestDepth());
_mcRefs.logo = _mcRefs.c.createEmptyMovieClip("logo", _mcRefs.c.getNextHighestDepth());
_mcRefs.vidTimeline = _mcRefs.c.createEmptyMovieClip("timeline", _mcRefs.c.getNextHighestDepth());
_mcRefs.tlTarget = _mcRefs.c.createEmptyMovieClip("tlTarget", _mcRefs.c.getNextHighestDepth());
_mcRefs.grabber = _mcRefs.c.createEmptyMovieClip("grabber", _mcRefs.c.getNextHighestDepth());
_mcRefs.counter = _mcRefs.c.createEmptyMovieClip("counter", _mcRefs.c.getNextHighestDepth());
_mcRefs.divider1 = _mcRefs.c.createEmptyMovieClip("divider1", _mcRefs.c.getNextHighestDepth());
_mcRefs.divider2 = _mcRefs.c.createEmptyMovieClip("divider2", _mcRefs.c.getNextHighestDepth());
_mcRefs.divider3 = _mcRefs.c.createEmptyMovieClip("divider3", _mcRefs.c.getNextHighestDepth());
_mcRefs.menuBtn = _mcRefs.c.createEmptyMovieClip("menuBtn", _mcRefs.c.getNextHighestDepth());
}
var _height = 19.5;
var _width = 233;
var pan = {};
var _seekActive = false;
}
Symbol 92 MovieClip [__Packages.YoutubeSELogger] Frame 0
class YoutubeSELogger
{
var _chromelessHarness, config;
function YoutubeSELogger (ch) {
_chromelessHarness = ch;
_chromelessHarness.addEventListener("ChromelessHarness_logEvent", this);
}
function setIsActivePlay(is_active) {
autoplay_is_active_play = is_active;
}
function setConfig(c) {
config = c;
}
function setChannel(c) {
config.channel_id = c;
}
function ChromelessHarness_logEvent(ed) {
switch (ed.name) {
case "autostart" :
logAutoStart();
break;
case "manualstart" :
logManualStart();
break;
case "replaystart" :
logReplayStart();
break;
case "clickthru" :
logClickThru();
}
}
function logAutoStart() {
config.event_code = config.ev_play;
if (autoplay_is_active_play) {
config.flags = setActiveFlag(config.flags);
} else {
config.flags = setPassiveFlag(config.flags);
}
sample();
}
function logClickThru() {
config.event_code = config.ev_clickthrough;
sample();
}
function logManualStart() {
config.event_code = config.ev_play;
config.flags = setActiveFlag(config.flags);
sample();
}
function logReplayStart() {
config.event_code = config.ev_replay;
config.flags = setReplayFlag(config.flags);
sample();
}
function sample() {
if (!goodConfig(config)) {
return(undefined);
}
if (Math.random() <= (1 / config.sample_rate)) {
log();
}
}
function log() {
var _local2 = new LoadVars();
_local2.xaction = "se_record_ajax";
_local2.uid = config.user_id;
_local2.event_code = config.event_code;
_local2.flags = config.flags;
_local2.foreign_id = config.channel_id;
_local2.context_info = config.context_info;
_local2.sendAndLoad(good_log_url(config.url), {}, "POST");
}
function goodConfig(c) {
if ((((!c) || (!c.url)) || (!c.sample_rate)) || (!config.flags)) {
return(false);
}
return(true);
}
function setActiveFlag(flags) {
return(flags | 4096);
}
function setPassiveFlag(flags) {
return(flags | 0);
}
function setReplayFlag(flags) {
return(flags | 8192);
}
function good_log_url(s) {
s = unescape(s);
if (s.indexOf("http://") == -1) {
s = "http://" + s;
}
return(s);
}
var autoplay_is_active_play = false;
}
Symbol 93 MovieClip [__Packages.com.slide.sis.SISConnector] Frame 0
class com.slide.sis.SISConnector
{
function SISConnector () {
if (_url.indexOf("http") == 0) {
ROOT_URL = _url.split("/").slice(0, 3).join("/") + "/";
} else {
ROOT_URL = "http://widget.dev.slide.com:9922/";
}
}
var ROOT_URL = "";
}
Symbol 94 MovieClip [__Packages.com.slide.sis.Translog] Frame 0
class com.slide.sis.Translog extends com.slide.sis.SISConnector
{
static var PREVIOUS_VIEW, CURRENT_VIEW;
var ROOT_URL;
function Translog () {
super();
}
static function logAction(action, callback, context, data) {
var _local1 = new com.slide.sis.Translog();
_local1.logEvent(com.slide.FlashVars.__get__CHANNEL(), action, PREVIOUS_VIEW, CURRENT_VIEW, callback, context, data);
}
function logEvent(cid, action, previous_view, current_view, req_lang, rend_lang, callback, context, data) {
if (!req_lang) {
req_lang = "";
}
if (!rend_lang) {
rend_lang = "";
}
var _local2 = new LoadVars();
_local2.channel_id = cid;
_local2.previous_action = action;
_local2.previous_view = previous_view;
_local2.current_view = current_view;
_local2.req_lang = req_lang;
_local2.rend_lang = rend_lang;
var _local6 = ROOT_URL + "translog";
var _local4 = new com.slide.sis.LoadVarsTarget(builder, this, callback, context, data);
_local2.sendAndLoad(_local6, _local4, "GET");
}
static function getURLWithLogging(url, cid, action, previous_view, current_view) {
var _local1 = [];
if (url.indexOf(cid) == -1) {
_local1.cid = cid;
}
if (action) {
_local1.previous_action = action;
}
if (previous_view) {
_local1.previous_view = previous_view;
}
if (current_view) {
_local1.current_view = current_view;
}
var _local2 = [];
for (var _local3 in _local1) {
_local2.push((_local3 + "=") + _local1[_local3]);
}
return((url + ((url.indexOf("?") == -1) ? "?" : "&")) + _local2.join("&"));
}
function builder(result, callback, context, data) {
var _local2 = {};
var _local3 = 0;
_local2.src = result._src;
_local2.count = result.count || (_local3);
_local2.sum = result.sum || (_local3 * _local3);
_local2.average = result.average || (_local3);
_local2.rc = result.rc || (_local3);
_local2.rank = (_local2.count ? (Math.round((_local2.sum * 10) / _local2.count) / 10) : (_local3));
callback.apply(context, [_local2].concat(arguments.slice(3)));
}
static var ACTION_MAP = {};
}
Symbol 95 MovieClip [__Packages.com.slide.sis.LoadVarsTarget] Frame 0
class com.slide.sis.LoadVarsTarget extends LoadVars
{
var _timer, _callback, _context, _data, _src, decode;
function LoadVarsTarget (callback, context) {
super();
_timer = getTimer();
_callback = callback;
_context = context;
_data = [this].concat(arguments.slice(2));
}
function onData(src) {
var _local2 = getTimer();
_src = src + "";
decode(src);
_callback.apply(_context, _data);
}
function toString() {
return(_src || null);
}
}
Symbol 96 MovieClip [__Packages.com.slide.sis.Comscore] Frame 0
class com.slide.sis.Comscore
{
function Comscore () {
}
static var SLIDESHOW = "CXNID=1000005.1NXC";
static var FUNPIX = "CXNID=1000005.2NXC";
static var SKINFLIX = "CXNID=1000005.3NXC";
static var GUESTBOOK = "CXNID=1000005.4NXC";
static var SKETCHPAD = "CXNID=1000005.5NXC";
}