Frame 1
function t(s) {
}
function check_js_available() {
return(true);
}
function get_slate_variables() {
var _local2 = new Array();
_local2.stage_width = _root.stage_width;
_local2.stage_height = _root.stage_height;
_local2.video_width = _root.video_width;
_local2.video_height = _root.video_height;
_local2.video_owner_pic = _root.video_owner_pic;
_local2.video_owner_name = _root.video_owner_name;
_local2.video_owner_href = _root.video_owner_href;
_local2.highqual_src = _root.highqual_src;
_local2.lowqual_src = _root.lowqual_src;
_local2.video_src = (highqual_is_on ? (_root.highqual_src) : (_root.lowqual_src));
_local2.video_timestamp = _root.video_timestamp;
_local2.video_title = _root.video_title;
_local2.video_href = _root.video_href;
_local2.thumb_url = _root.thumb_url;
_local2.video_rotation = _root.video_rotation;
_local2.video_timestamp = _root.video_timestamp;
_local2.video_seconds = _root.video_seconds;
_local2.controls_hide = _root.controls_hide;
_local2.highqual_is_on = _root.highqual_is_on;
_local2.video_has_high_def = _root.video_has_high_def;
return(_local2);
}
function get_tail_slate_variables() {
var _local2 = new Array();
_local2.video_href = _root.video_href;
_local2.next_video_url = _root.next_video_url;
_local2.go_to_video = (_root.is_featured_video || (_root.video_is_offsite)) || (_root.show_banner);
_local2.fbt_play_again = _root.fbt_play_again;
_local2.fbt_next_video = _root.fbt_next_video;
_local2.fbt_go_to_video = _root.fbt_go_to_video;
return(_local2);
}
function getTestData(mp4) {
var _local2 = new Array();
_local2.video_id = 15943367753;
_local2.video_length = 123800 /* 0x01E398 */;
_local2.video_seconds = 123;
_local2.video_category = 0;
_local2.video_rotation = 0;
_local2.video_href = "/video/video.php?v=15943367753";
_local2.video_player_type = "video_player_offsite";
_local2.video_width = 448;
_local2.video_height = 336;
_local2.video_owner_pic = "http://profile.ak.facebook.com/object2/1347/94/s6169193238_8541.jpg";
_local2.video_owner_name = "The War";
_local2.video_owner_href = "http://www.facebook.com/pages/The-War/6169193238";
_local2.video_src = (mp4 ? "http://video-sf2p.facebook.com/v163/116/61/513978630756_15458.mp4" : "http://video-sf2p.facebook.com/v163/67/62/15943367753_17013.flv");
_local2.video_timestamp = "Added about 7 months ago";
_local2.video_title = "MJ would be proud";
_local2.thumb_url = "http://vthumb.ak.facebook.com/vthumb-ak-sf2p/v221/240/46/683602753/b683602753_15943367753_1330.jpg";
_local2.video_is_offsite = true;
_root.video_obj = _local2;
return(_local2);
}
function test_run(mp4) {
for (var _local2 in getTestData(mp4)) {
_root[_local2] = video_obj[_local2];
}
}
function video_recalculate_dimensions() {
is_scaled = ((Stage.displayState == "fullScreen") || (Stage.width != _root.stage_width)) || (_root.stage_width != _root.video_width);
if ((_root.video_height && (_root.video_width)) && (!is_scaled)) {
_root.video_cur_height = _root.video_height;
_root.video_cur_width = _root.video_width;
} else {
var _local3 = Stage.width / Stage.height;
var _local2 = _root.video_width / _root.video_height;
var _local4 = Stage.width;
var _local5 = Stage.height;
if (_local2 > _local3) {
_local5 = Math.round(Stage.width / _local2);
} else if (_local2 < _local3) {
_local4 = Math.round(Stage.height * _local2);
}
_root.video_cur_width = _local4;
_root.video_cur_height = _local5;
}
_root.video_y = ((is_scaled ? (Stage.height) : (_root.stage_height)) / 2) - (_root.video_cur_height / 2);
_root.video_x = ((is_scaled ? (Stage.width) : (_root.stage_width)) / 2) - (_root.video_cur_width / 2);
}
function video_update_dimensions() {
switch (_root.video_rotation) {
case 90 :
case 270 :
_global.video_video._rotation = 0;
_global.video_video._width = _root.video_cur_height;
_global.video_video._height = _root.video_cur_width;
_global.video_video._rotation = _root.video_rotation;
if (controls_yoked && (_root.video_rotation == 90)) {
_global.video_mc._x = _root.video_x;
_global.video_mc._y = _root.video_y;
} else if ((!controls_yoked) && (_root.video_rotation == 90)) {
_global.video_video._x = _root.video_cur_width + _root.video_x;
_global.video_video._y = Math.round((Stage.height / 2) - (_global.video_video._height / 2));
}
if (controls_yoked && (_root.video_rotation == 270)) {
_global.video_mc._x = _root.video_x;
_global.video_mc._y = _root.video_y;
} else if ((!controls_yoked) && (_root.video_rotation == 270)) {
_global.video_video._x = Math.round((Stage.width / 2) - (_root.video_cur_width / 2));
_global.video_video._y = Math.round((Stage.height / 2) + (_global.video_video._height / 2));
}
break;
case 180 :
_global.video_video._width = _root.video_cur_width;
_global.video_video._height = _root.video_cur_height;
_global.video_video._rotation = _root.video_rotation;
if (controls_yoked) {
_global.video_mc._x = _root.video_x + _global.video_video._width;
_global.video_mc._y = _root.video_y + _global.video_video._height;
} else {
_global.video_video._x = _root.video_x + _global.video_video._width;
_global.video_video._y = _root.video_y + _global.video_video._height;
}
break;
case 0 :
default :
_global.video_video._width = _root.video_cur_width;
_global.video_video._height = _root.video_cur_height;
if (controls_yoked) {
_global.video_mc._x = _root.video_x;
_global.video_mc._y = _root.video_y;
} else {
_global.video_video._x = _root.video_x;
_global.video_video._y = _root.video_y;
}
}
}
function video_build(video_inception_function, controls_are_ready, volume_level) {
_global.video_mc = _root.attachMovie("video_mc", "video_mc", _root.getNextHighestDepth());
video_mc._visible = false;
video_mc.video_volume = (isNaN(volume_level) ? undefined : (volume_level));
video_recalculate_dimensions();
var _local6 = _root.attachMovie("loading_bars_mc", "loading_mc", _root.getNextHighestDepth());
_global.loading_mc = _local6;
center_loading_mc();
_global.video_video = video_mc.video_display_mc.video_video;
video_update_dimensions();
video_video.smoothing = true;
video_video.deblocking = deblocking;
_global.video_nc = new NetConnection();
video_nc.connect(null);
_global.video_ns = new NetStream(video_nc);
video_ns.setBufferTime(video_buffer);
video_mc.attachAudio(video_ns);
_global.video_sound = new Sound(video_mc);
video_sound.setVolume(video_volume);
video_video.attachVideo(video_ns);
video_ns.onStatus = function (returnObj) {
if ((returnObj.code == "NetStream.Buffer.Empty") && (video_seconds > minimum_video_seconds)) {
video_buffering = true;
center_loading_mc();
var _local4 = new animation.mc_tween(_root.loading_mc, "_alpha", _root.loading_mc._alpha, 100, 0.45, 5);
var _local3 = new animation.mc_tween(video_display_mc, "_alpha", video_display_mc._alpha, 65, 0.35, 5);
trace_to_facebook("BUFFER");
}
if (returnObj.code == "NetStream.Buffer.Full") {
video_buffering = false;
var _local4 = new animation.mc_tween(_root.loading_mc, "_alpha", _root.loading_mc._alpha, 0, 0.45, 5);
var _local3 = new animation.mc_tween(video_display_mc, "_alpha", video_display_mc._alpha, 100, 0.45, 5);
}
if (returnObj.code == "NetStream.Play.StreamNotFound") {
trace_to_facebook("ERROR", video_src);
video_load_error();
}
};
video_ns.onMetaData = function (infoObject) {
for (var _local5 in infoObject) {
if (_local5 == "seekpoints") {
_root.seekpoints = infoObject[_local5];
continue;
}
if (_local5 == "keyframes") {
keyframes = infoObject[_local5];
_root.seekpoints = {};
for (var _local4 in keyframes.times) {
_root.seekpoints[_local4].time = keyframes.times[_local4];
}
for (var _local4 in keyframes.filepositions) {
_root.seekpoints[_local4].offset = keyframes.filepositions[_local4];
}
continue;
}
if (_local5 == "framerate") {
video_ns.framerate = infoObject[_local5];
continue;
}
if ((_local5 != "duration") || (video_seconds)) {
continue;
}
video_seconds = Math.floor(infoObject[_local5]);
var _local3 = time_mc._width / 2;
if (video_seconds < 600) {
time_mc.gotoAndStop(1);
} else if (video_seconds < 3600) {
time_mc.gotoAndStop(2);
} else {
time_mc.gotoAndStop(3);
}
time_mc._x = time_mc._x + Math.round(_local3 - (time_mc._width / 2));
display_time(video_seconds, true);
}
};
_global.video_inception_function = video_inception_function;
if (!controls_are_ready) {
controls_build(Number(controls_style));
}
video_engage(choose_video_src(), Number(controls_style));
}
function choose_video_src() {
if (_root.highqual_is_on && (_root.highqual_src)) {
return(_root.highqual_src);
}
if (_root.lowqual_src) {
return(_root.lowqual_src);
}
return(_root.video_src);
}
function center_loading_mc() {
if (!loading_mc._width) {
return(undefined);
}
var _local2;
var _local1;
if ((loading_mc._width > stage_width) || (loading_mc._height > stage_height)) {
load_ratio = loading_mc._width / loading_mc._height;
stage_ratio = stage_width / stage_height;
if (load_ratio > stage_ratio) {
loading_mc._width = stage_width;
loading_mc._yscale = loading_mc._xscale;
} else {
loading_mc._width = stage_height;
loading_mc._yscale = loading_mc._yscale;
}
}
if (Stage.displayState == "fullScreen") {
_local2 = Math.round((Stage.width / 2) - (loading_mc._width / 2));
_local1 = Math.round((Stage.height / 2) - (loading_mc._height / 2));
} else {
_local2 = Math.round((stage_width / 2) - (loading_mc._width / 2));
_local1 = Math.round((stage_height / 2) - (loading_mc._height / 2));
}
loading_mc._x = _local2;
loading_mc._y = _local1;
}
function destroy_controls() {
clearTimeout(video_display_time_timeout);
clearTimeout(video_playhead_timeout);
_root.video_mc.controls_mask_mc.removeMovieClip();
for (var _local2 in extra_controls) {
extra_controls[_local2].removeMovieClip();
}
delete extra_controls;
}
function controls_rebuild() {
_root.tracer = _root.tracer + "\r Controls Rebuilt?";
destroy_controls();
controls_build(Number(controls_style));
video_loader(video_ns);
display_time_listener(video_ns);
video_playhead_listener(video_ns);
Key.addListener(space_bar_listener);
}
function controls_build(style) {
_global.controls_mc = video_mc.controls_mc;
_root.controls_width = ((Stage.displayState == "fullScreen") ? 500 : ((controls_yoked ? (video_cur_width) : (_root.stage_width))));
if (controls_width <= 320) {
style = 9;
controls_style = 9;
}
if (controls_width <= 110) {
style = 10;
controls_style = 10;
}
if (controls_hide) {
var _local9 = (new shape.create_rectangle("controls_mask_mc", video_mc, video_cur_width + 20, video_cur_height, 0)).return_mc;
controls_mc.background_mc.solid_mc._visible = false;
if (!controls_yoked) {
_local9._width = controls_width;
_local9._height = Stage.height;
}
controls_mc._y = ((Stage.displayState == "fullScreen") ? (Stage.height - Math.round(1.5 * controls_mc._height)) : ((controls_yoked ? (video_cur_height) : (Stage.height))));
controls_mc.reset_y = controls_mc._y;
controls_mc.setMask(_local9);
} else {
controls_mc._y = ((Stage.displayState == "fullScreen") ? (Stage.height - Math.round(1.5 * controls_mc._height)) : ((controls_yoked ? (video_cur_height) : (Stage.height - controls_mc.background_mc._height))));
}
controls_mc._x = ((Stage.displayState == "fullScreen") ? ((controls_yoked ? (Math.round((video_cur_width / 2) - (controls_width / 2))) : (Math.round((Stage.width / 2) - (controls_width / 2))))) : 0);
_local9._x = controls_mc._x;
controls_mc._alpha = 100;
if (Stage.displayState == "fullScreen") {
_local9._width = _local9._width + 2;
controls_mc.bg_border_mc._visible = false;
controls_mc.fs_bg_mc._visible = true;
controls_mc.background_mc._visible = false;
} else {
controls_mc.bg_border_mc._visible = false;
controls_mc.fs_bg_mc._visible = false;
controls_mc.background_mc._visible = true;
}
controls_mc.gotoAndStop(style);
switch (style) {
case 1 :
case 5 :
case 9 :
var _local4 = new Array("play_mc", "volume_mc", "fs_mc");
break;
case 2 :
case 6 :
case 8 :
_local4 = new Array("play_mc", "volume_mc");
break;
case 3 :
_local4 = new Array("play_mc", "volume_mc", "cc_mc");
break;
case 4 :
case 7 :
_local4 = new Array("volume_mc");
break;
case 10 :
_local4 = new Array("play_mc");
}
controls_mc.background_mc._width = controls_width;
var _local5 = 6;
var _local11 = new TextField.StyleSheet();
_local11.setStyle("font-family", {fontFamily:"lucida grande, tahoma, verdana, arial, sans-serif"});
_local11.setStyle("font-size", {fontSize:"11"});
if (controls_style != 10) {
_global.time_mc = controls_mc.time_mc;
time_mc.useHandCursor = false;
time_mc.onPress = toggle_hide_listener;
time_mc.onRelease = change_count_direction;
time_mc._visible = false;
_global.time_x_reset = false;
if (video_seconds) {
if (video_seconds < 600) {
time_mc.gotoAndStop(1);
} else if (video_seconds < 3600) {
time_mc.gotoAndStop(2);
} else {
time_mc.gotoAndStop(3);
}
display_time(video_seconds, true);
} else {
time_mc.gotoAndStop(3);
}
}
var _local8 = 0;
for (control in _local4) {
_local8 = _local8 + controls_mc[_local4[control]]._width;
_global[_local4[control]] = controls_mc[_local4[control]];
if (_local4[control] == "fs_mc") {
var _local6 = ((Stage.displayState == "fullScreen") ? 9 : 1);
controls_mc[_local4[control]].gotoAndStop(_local6);
}
}
_global.timeline_mc = controls_mc.timeline_mc;
if (controls_style != 10) {
play_mc._x = _local5;
} else {
play_mc._x = Math.round((controls_mc.background_mc._width / 2) - (play_mc._width / 2));
}
play_mc.useHandCursor = false;
play_mc.onPress = function () {
this.hit_mc._alpha = 100;
toggle_hide_listener(false);
};
play_mc.onRelease = function () {
this.hit_mc._alpha = 0;
play_pause();
toggle_hide_listener(true);
};
play_mc.onReleaseOutside = function () {
this.hit_mc._alpha = 0;
};
if (timeline_mc) {
timeline_mc.playhead_mc._x = 0;
timeline_mc._x = (controls_mc.play_mc ? ((play_mc._x + play_mc._width) + _local5) : (_local5));
timeline_mc.gutter_mc.useHandCursor = false;
timeline_mc.gutter_mc._width = (controls_width - ((_local4.length + 2) * _local5)) - _local8;
timeline_mc.load_mc._x = timeline_mc.gutter_mc._width;
timeline_mc.load_mc._width = (timeline_mc.gutter_mc._width + 2) - timeline_mc.playhead_mc._width;
if ((!controls_mc.title_mc) && (style != 9)) {
timeline_mc.gutter_mc._width = timeline_mc.gutter_mc._width - Math.floor(time_mc._width + _local5);
timeline_mc.load_mc._x = timeline_mc.gutter_mc._width;
timeline_mc.load_mc._width = (timeline_mc.gutter_mc._width + 2) - timeline_mc.playhead_mc._width;
timeline_mc._y = 14;
time_mc._x = (timeline_mc._x + timeline_mc._width) + _local5;
time_mc._y = 14;
} else {
controls_mc.title_mc._x = timeline_mc._x;
var _local10 = controls_mc.title_mc.text_mc.title_txt;
_local10.styleSheet = _local11;
_local10._width = timeline_mc._width - time_mc._width;
_local10.autoSize = true;
_local10.text = video_title;
controls_mc.title_mask_mc._width = timeline_mc._width - time_mc._width;
controls_mc.title_mask_mc._x = timeline_mc._x;
controls_mc.title_mc.setMask(controls_mc.title_mask_mc);
if (controls_mc.title_mc._height > (controls_mc.title_mask_mc._height + 6)) {
_global.ticker_divisions = Math.floor(controls_mc.title_mc._height / controls_mc.title_mask_mc._height);
}
timeline_mc._y = 20;
time_mc._x = Math.floor((timeline_mc._x + timeline_mc._width) - time_mc._width);
time_mc._y = 5;
if (style == 9) {
}
}
} else {
time_mc._x = Math.floor((controls_width / 2) - (time_mc._width / 2));
time_mc._y = 14;
}
control = 0;
while (control < _local4.length) {
if (controls_mc[_local4[control]] != play_mc) {
controls_mc[_local4[control]]._x = Math.floor((timeline_mc._x + timeline_mc._width) + _local5);
if ((control > 1) && (timeline_mc)) {
controls_mc[_local4[control]]._x = Math.floor((controls_mc[_local4[control - 1]]._x + controls_mc[_local4[control - 1]]._width) + _local5);
}
if (((!controls_mc.title_mc) && ((control <= 1) && (style != 9))) && (timeline_mc)) {
controls_mc[_local4[control]]._x = controls_mc[_local4[control]]._x + (Math.floor(time_mc._width) + _local5);
}
if (!timeline_mc) {
controls_mc[_local4[control]]._x = Math.floor((controls_width - _local5) - controls_mc[_local4[control]]._width);
}
}
control++;
}
if (isNaN(volume_refresh)) {
_global.volume_refresh = volume_mc.slider_mc._xscale;
}
if ((!isNaN(video_mc.video_volume)) && (video_mc.video_volume == 0)) {
video_mute();
} else if (((!isNaN(video_mc.video_volume)) && (video_mc.video_volume > 0)) && (video_mc.video_volume < 100)) {
volume_mc.slider_mc._xscale = video_mc.video_volume;
}
volume_mc.mute_mc.useHandCursor = false;
volume_mc.mute_mc.onPress = function () {
volume_mc.speaker_mc.hit_mc._alpha = 100;
toggle_hide_listener(false);
};
volume_mc.mute_mc.onRelease = video_mute;
volume_mc.mute_mc.onReleaseOutside = function () {
volume_mc.speaker_mc.hit_mc._alpha = 0;
toggle_hide_listener(true);
};
volume_mc.level_mc.useHandCursor = false;
volume_mc.level_mc.onPress = function () {
video_adjust_volume();
Mouse.addListener(video_volume_listener);
toggle_hide_listener(false);
};
volume_mc.level_mc.onRelease = (volume_mc.level_mc.onReleaseOutside = function () {
Mouse.removeListener(video_volume_listener);
toggle_hide_listener(true);
});
Key.addListener(space_bar_listener);
_root.extra_controls = new Array();
if (!highqual_src) {
controls_mc.hd_mc._visible = false;
} else {
controls_mc.hd_mc._visible = false;
}
controls_dont_show();
if (highqual_src) {
render_highqual_button();
}
if (video_is_offsite) {
render_offsite_logo();
}
if (mvp_close_button) {
render_close_button();
}
if (mvp_connect) {
render_connect_button();
}
if (mvp_like) {
render_like_button();
}
_root.tracer = _root.tracer + "\r Controls Rebuilt.";
}
function render_offsite_logo() {
var logo_mc = _root.attachMovie("fb_logo", "logo_mc", _root.getNextHighestDepth());
logo_mc.bg_mc._alpha = 0;
logo_mc.logotype_mc._alpha = 60;
logo_mc.logotype_mc._xscale = (logo_mc.logotype_mc._yscale = 80);
logo_mc.logotype_mc._x = (logo_mc.logotype_mc._y = 7);
logo_mc._x = video_x;
logo_mc._y = video_y;
if ((logo_mc._x + logo_mc._width) > (stage_width / 3)) {
logo_mc._width = stage_width / 4;
} else if ((logo_mc._x + logo_mc._width) > hq_mc._x) {
logo_mc._width = hq_mc._width - 10;
}
logo_mc._yscale = logo_mc._xscale;
logo_mc._visible = ui_is_visible;
if (js_is_available) {
logo_mc.onRollOver = function () {
var _local1 = new animation.mc_tween(logo_mc.logotype_mc, "_alpha", logo_mc.logotype_mc._alpha, 100, 0.4);
};
logo_mc.onRollOut = function () {
var _local1 = new animation.mc_tween(logo_mc.logotype_mc, "_alpha", logo_mc.logotype_mc._alpha, 60, 0.4);
};
logo_mc.onRelease = function () {
getURL (_root.video_href, "_blank");
};
}
extra_controls.logo_mc = logo_mc;
}
function render_highqual_button() {
var _local2 = new MovieClip();
_local2 = _root.createEmptyMovieClip("hq_mc", _root.getNextHighestDepth());
hq_toggle = new video.HQToggle(_local2, fbt_highqual, fbt_lowqual, highqual_is_on);
if (Stage.displayState == "normal") {
_local2._x = video_x + 5;
_local2._y = video_y + 5;
} else {
_local2._x = Math.round(controls_mc._x) + 2;
_local2._y = controls_mc._y - _local2._height;
}
_local2._visible = ui_is_visible;
extra_controls.hq_mc = _local2;
}
function toggle_hd() {
try {
if (Stage.displayState != "normal") {
video_toggle_full();
}
if (highqual_is_on) {
highqual_is_on = false;
_root.video_src = lowqual_src;
trace_to_facebook("EXIT_HD");
} else {
highqual_is_on = true;
_root.video_src = highqual_src;
trace_to_facebook("ENTER_HD");
}
video_width = (highqual_is_on ? (highqual_width) : (lowqual_width));
stage_width = (highqual_is_on ? (highqual_stage_width) : (lowqual_stage_width));
video_height = (highqual_is_on ? (highqual_height) : (lowqual_height));
stage_height = (highqual_is_on ? (highqual_stage_height) : (lowqual_stage_height));
if (js_is_available && (!video_is_offsite)) {
flash.external.ExternalInterface.call("VideoQualityController.getInstance().resize_player", stage_width, stage_height);
flash.external.ExternalInterface.call("VideoQualityController.getInstance().hq_enable", Boolean(highqual_is_on));
}
center_loading_mc();
_root.tail_slate_mc.resize();
reset_video();
if (!_global.video_mc) {
_root.slate_mc.resize();
_root.slate_mc.play();
return(undefined);
}
} catch(err) {
t("error: " + err.message);
}
}
function render_connect_button() {
if (!connect_like_lv) {
loadConnectInfo();
return(undefined);
}
if ((!connect_like_lv.loaded) || (!connect_obj)) {
return(undefined);
}
if (connect_mc) {
connect_mc.removeMovieClip();
connect_button.removeMovieClip();
}
if (connect_obj.status) {
return(undefined);
}
var connect_mc = new MovieClip();
connect_mc = _root.createEmptyMovieClip("connect_mc", _root.getNextHighestDepth());
connect_button = new display.JSButton(connect_mc, connect_obj);
if (Stage.displayState == "normal") {
connect_mc._x = Math.round(video_x) + 5;
if (hq_mc) {
connect_mc._y = hq_mc._y + hq_mc._height;
} else {
connect_mc._y = video_y + 5;
}
} else {
connect_mc._x = -100;
connect_mc._y = -100;
}
connect_mc._visible = ui_is_visible;
extra_controls.connect_mc = connect_mc;
}
function toggle_connect() {
if (like_mc) {
var _local2 = new animation.mc_tween(like_mc, "_y", like_mc._y, connect_mc._y, 0.4, 2);
}
connect_mc.removeMovieClip();
_root.mvp_connect = false;
extra_controls.connect_mc = null;
trace_to_facebook("CONNECT");
}
function render_like_button(like_visible) {
if (!connect_like_lv) {
loadConnectInfo();
return(undefined);
}
if (((!connect_like_lv.loaded) || (!like_obj)) || (!unlike_obj)) {
return(undefined);
}
if (like_mc || ((!like_obj) && (!unlike_obj))) {
like_mc.removeMovieClip();
like_button.removeMovieClip();
}
var like_mc = new MovieClip();
like_mc = _root.createEmptyMovieClip("like_mc", _root.getNextHighestDepth());
if (like_obj.status) {
like_button = new display.JSButton(like_mc, unlike_obj, _root.toggle_like);
} else {
like_button = new display.JSButton(like_mc, like_obj, _root.toggle_like);
}
if (Stage.displayState == "normal") {
like_mc._x = Math.round(video_x) + 5;
if (connect_mc) {
like_mc._y = connect_mc._y + connect_mc._height;
} else if (hq_mc) {
like_mc._y = hq_mc._y + hq_mc._height;
} else {
like_mc._y = video_y + 5;
}
} else {
like_mc._x = -100;
like_mc._y = -100;
}
like_mc._visible = ui_is_visible;
extra_controls.like_mc = like_mc;
}
function toggle_like() {
like_obj.status = !like_obj.status;
unlike_obj.status = !unlike_obj.status;
like_mc.removeMovieClip();
extra_controls.like_mc = null;
render_like_button();
if (like_obj.status) {
trace_to_facebook("LIKE");
} else {
trace_to_facebook("UNLIKE");
}
}
function render_close_button() {
var _local2 = new MovieClip();
_local2 = _root.createEmptyMovieClip("close_button_mc", _root.getNextHighestDepth());
closer = new video.CloseButton(_local2, mvp_close_button);
if (Stage.displayState == "normal") {
_local2._x = Math.round((video_x + video_width) - _local2._width) - 5;
_local2._y = video_y + 5;
} else {
_local2._x = -100;
_local2._y = -100;
}
_local2._visible = ui_is_visible;
extra_controls.close_button_mc = _local2;
}
function video_title_ticker(division_count_num) {
if (video_play) {
var _local3 = new animation.mc_tween(controls_mc.title_mc, "_y", controls_mc.title_mc._y, (division_count_num * -15) + 5, 0.3);
}
if (division_count_num < (ticker_divisions - 1)) {
division_count_num++;
} else {
division_count_num = 0;
}
if (video_play) {
_global.ticker_timeout = setTimeout(video_title_ticker, 5000, division_count_num);
} else {
clearTimeout(ticker_timeout);
}
}
function video_toggle_full() {
Stage.displayState = ((Stage.displayState == "fullScreen") ? "normal" : "fullScreen");
var _local1 = ((Stage.displayState == "fullScreen") ? "ENTER_FS" : "EXIT_FS");
trace_to_facebook(_local1);
}
function video_resize_stage() {
_root.tracer = "resize stage called: " + Stage.displayState;
video_recalculate_dimensions();
video_update_dimensions();
if (Stage.displayState == "normal") {
curtain_mc._visible = true;
curtain_mc._width = Stage.width;
curtain_mc._height = stage_height;
} else {
curtain_mc._visible = true;
curtain_mc._width = Stage.width;
curtain_mc._height = Stage.height;
}
controls_rebuild();
if (_root.controls_hide_listener) {
controls_hide_listener.onMouseMove();
}
}
function video_engage(video_src, style) {
video_ns.play(video_src);
var _local3 = new Date();
_global.play_start_time = _local3.valueOf();
_global.video_playing = true;
_global.video_timeline_resume = true;
if (video_autoplay) {
video_ns.pause(true);
play_mc.gotoAndStop("pause");
video_playing = false;
}
switch (style) {
case 1 :
case 5 :
case 9 :
fs_mc.onRollOver = function () {
this.play();
};
fs_mc.onRollOut = function () {
var _local2 = ((Stage.displayState == "fullScreen") ? 9 : 1);
this.gotoAndStop(_local2);
};
fs_mc.onRelease = video_toggle_full;
case 2 :
case 3 :
case 6 :
timeline_mc.gutter_mc.onPress = video_activate_timeline;
timeline_mc.gutter_mc.onRelease = (timeline_mc.gutter_mc.onReleaseOutside = video_deactivate_timeline);
break;
case 4 :
case 7 :
timeline_mc.playhead_mc.gotoAndStop("no_scrub");
}
video_loader(video_ns);
video_play(true);
video_fade_in();
if (controls_hide) {
var _local6 = setTimeout(add_hide_listener, controls_in);
} else {
add_hide_listener();
}
trace_to_facebook("REQUESTED");
}
function report_bandwidth_info(total_bytes) {
var _local5 = new Date();
var _local4 = _local5.valueOf() - _global.play_start_time;
var _local3 = Math.round(total_bytes / (_local4 / 1000));
var _local2 = new LoadVars();
_local2.bw = _local3;
_local2.sendAndLoad(motion_log, _local2);
}
function video_loader(video_content) {
_global.video_totally_loaded = false;
var _local4 = video_content.bytesLoaded;
var _local3 = video_content.bytesTotal;
var _local6 = _local4 / _local3;
var _local10 = new animation.mc_tween(timeline_mc.load_mc, "_width", timeline_mc.load_mc._width, timeline_mc.gutter_mc._width - (_local6 * (timeline_mc.gutter_mc._width - timeline_mc.playhead_mc._width)), 0.5, 5);
if (_local4 != _local3) {
var _local8 = setTimeout(video_loader, 100, video_ns);
} else if ((!video_buffering) && (_local4 == _local3)) {
_global.video_totally_loaded = true;
if (_local3 > 1048576) {
report_bandwidth_info(_local3);
}
_local10 = new animation.mc_tween(timeline_mc.load_mc, "_width", timeline_mc.load_mc._width, 0, 0.5, 5);
timeline_mc.load_mc._visible = false;
var _local7 = new animation.mc_tween(video_display_mc, "_alpha", video_display_mc._alpha, 100, 0.45, 5);
var _local5 = new animation.mc_tween(_root.loading_mc, "_alpha", _root.loading_mc._alpha, 0, 0.45, 5);
_local5.Done = function () {
_root.loading_mc.removeMovieClip();
};
delete video_ns.onStatus;
clearTimeout(_local8);
} else {
var _local8 = setTimeout(video_loader, 10, video_ns);
}
}
function video_fade_in() {
if (video_ns.time && (video_ns.time > 0)) {
ui_is_visible = true;
curtain_mc._visible = true;
video_mc._visible = true;
video_mc.onEnterFrame = function () {
if ((this._alpha < video_mc.video_volume) && (!isNaN(video_mc.video_volume))) {
video_sound.setVolume(this._alpha);
}
};
var _local3 = new animation.mc_tween(video_mc, "_alpha", 0, 100, 0.3, 5);
_local3.Done = function () {
if (_root.slate_mc) {
_root.slate_mc.removeSlate();
_root.slate_mc.removeMovieClip();
_root.slate_mc = undefined;
}
video_inception_function();
var _local2 = (isNaN(video_mc.video_volume) ? 100 : (video_mc.video_volume));
video_sound.setVolume(_local2);
delete video_mc.onEnterFrame;
};
var _local5 = new animation.mc_tween(loading_mc, "_alpha", 100, 0, 0.45, 5);
video_terminus_listener();
clearTimeout(video_fade_timeout);
trace_to_facebook("STARTED", ("{\"c\":" + _root.play_context) + "}");
if (histogram_is_on) {
video_histogram = new video.VideoHistogram(swf_id, video_id, video_ns, video_seconds);
video_histogram.enable();
}
} else {
var video_fade_timeout = setTimeout(video_fade_in, 10);
}
}
function video_terminus_listener() {
if (video_playing && (video_terminus_time != video_ns.time)) {
video_terminus_count = 0;
video_terminus_time = video_ns.time;
} else if (video_playing && (video_terminus_time == video_ns.time)) {
video_terminus_count++;
}
if (video_playing) {
_global.video_terminus_timeout = setTimeout(video_terminus_listener, 250);
}
if (((video_playing && (video_totally_loaded)) && (video_ns.time > (video_seconds * 0.5))) && (video_terminus_count > 2)) {
if (Stage.displayState == "fullScreen") {
Stage.displayState = "normal";
}
var _local2 = new animation.mc_tween(timeline_mc.playhead_mc, "_x", timeline_mc.playhead_mc._x, (timeline_mc.gutter_mc._width - timeline_mc.playhead_mc._width) + timeline_mc.gutter_mc._x, 0.5, 4);
Mouse.show();
video_terminus_count = 0;
video_ns.pause(true);
play_mc.gotoAndStop("pause");
video_playing = false;
clearTimeout(ticker_timeout);
clearTimeout(video_display_time_timeout);
clearTimeout(video_playhead_timeout);
clearTimeout(video_mute_timeout);
clearTimeout(video_terminus_timeout);
toggle_hide_listener(false);
Key.removeListener(space_bar_listener);
trace_to_facebook("FINISHED");
if (video_histogram) {
video_histogram.finished();
}
video_terminus_function();
}
}
function video_play() {
play_mc.gotoAndStop("play");
video_playing = true;
video_ns.pause(false);
display_time_listener(video_ns);
video_playhead_listener(video_ns);
if (_global.ticker_divisions) {
video_title_ticker(0);
}
clearTimeout(video_terminus_timeout);
video_terminus_listener();
}
function play_pause() {
if (video_playing) {
video_ns.pause(true);
play_mc.gotoAndStop("pause");
video_playing = false;
trace_to_facebook("PAUSED");
} else {
video_play();
trace_to_facebook("UNPAUSED");
}
}
function display_time(total_time, duration, other_txt) {
var _local4;
var _local1;
var _local3;
if (((total_time < 0) || (total_time > 999999)) || (!total_time)) {
return(undefined);
}
if (video_seconds > 3600) {
_local4 = "0";
}
if (total_time <= 59) {
_local1 = "0";
_local3 = Math.floor(total_time);
}
if ((total_time > 59) && (total_time <= 3600)) {
_local1 = Math.floor(total_time / 60);
_local3 = Math.floor(total_time - (60 * _local1));
}
if (total_time > 3600) {
_local4 = Math.floor(total_time / 3600);
_local1 = Math.floor(total_time / 60) - (60 * _local4);
_local3 = Math.floor((total_time - (60 * _local1)) - (3600 * _local4));
}
if ((_local1 < 10) && (video_seconds > 590)) {
_local1 = "0" + _local1;
}
if (_local3 < 10) {
_local3 = "0" + _local3;
}
if ((countdown && (video_seconds < 3600)) && (!duration)) {
_local1 = "-" + _local1;
} else if ((countdown && (video_seconds > 3600)) && (!duration)) {
_local4 = "-" + _local4;
}
if (duration && (video_seconds < 3600)) {
var _local6 = (_local1 + ":") + _local3;
} else if (duration && (video_seconds > 3600)) {
var _local6 = (((_local4 + ":") + _local1) + ":") + _local3;
}
if (duration && (other_txt)) {
other_txt.text = _local6;
} else if (duration && (!other_txt)) {
time_mc.duration_txt.text = _local6;
time_mc.duration_txt.autoSize = "left";
}
if ((!_local4) && (!duration)) {
time_mc.min_txt.text = _local1;
time_mc.sec_txt.text = _local3;
} else if (_local4 && (!duration)) {
time_mc.hour_txt.text = _local4;
time_mc.min_txt.text = _local1;
time_mc.sec_txt.text = _local3;
}
time_mc.hour_txt.autoSize = "right";
time_mc.min_txt.autoSize = "right";
time_mc.sec_txt.autoSize = "left";
}
function change_count_direction() {
if (countdown == false) {
countdown = true;
clearTimeout(_global.video_display_time_timeout);
display_time_listener(video_ns);
trace_to_facebook("TIMER_TOGGLE");
} else {
countdown = false;
clearTimeout(_global.video_display_time_timeout);
display_time_listener(video_ns);
trace_to_facebook("TIMER_TOGGLE");
}
toggle_hide_listener(true);
}
function display_time_listener(video_ns) {
if ((!time_mc._visible) && (video_ns.time)) {
if (((!controls_mc.title_mc) && (video_ns.time < 600000)) && (!time_x_reset)) {
time_mc._x = (timeline_mc._x + timeline_mc._width) + controls_x_padding;
time_x_reset = true;
} else if ((video_ns.time < 600000) && (!time_x_reset)) {
time_mc._x = Math.floor((timeline_mc._x + timeline_mc._width) - time_mc._width);
time_x_reset = true;
}
time_mc._visible = true;
var _local4 = new animation.mc_tween(time_mc, "_alpha", 0, 100, 0.35, 2);
_local4.Done = function () {
};
}
if (!countdown) {
display_time(Math.min(video_seconds, video_ns.time));
} else {
display_time(video_seconds - video_ns.time);
}
if (video_playing) {
_global.video_display_time_timeout = setTimeout(display_time_listener, 800, video_ns);
}
}
function video_playhead_listener(video_ns, playhead) {
var _local3 = video_ns.time;
if (playhead != false) {
timeline_mc.playhead_mc._x = (Math.min(1, _local3 / video_seconds) * (timeline_mc.gutter_mc._width - timeline_mc.playhead_mc._width)) + timeline_mc.gutter_mc._x;
}
if (video_playing) {
if (video_ns.framerate) {
var _local4 = (1 / video_ns.framerate) * 1000;
} else {
var _local4 = 66;
}
_global.video_playhead_timeout = setTimeout(video_playhead_listener, _local4, video_ns, true);
}
}
function video_deactivate_timeline() {
timeline_mc.playhead_mc.gotoAndStop("play");
stopDrag();
Mouse.removeListener(video_timeline_listener);
toggle_hide_listener(true);
if (video_timeline_resume == true) {
video_play();
} else {
video_ns.pause(true);
}
}
function video_activate_timeline() {
timeline_mc.playhead_mc.gotoAndStop("scrub");
clearTimeout(video_display_time_timeout);
clearTimeout(video_playhead_timeout);
toggle_hide_listener(false);
if (video_playing) {
video_timeline_resume = true;
} else {
video_timeline_resume = false;
}
video_playing = false;
video_ns.pause(true);
var _local1 = ((_xmouse - timeline_mc._x) - controls_mc._x) - video_mc._x;
if (_local1 > ((timeline_mc.gutter_mc._width - timeline_mc.load_mc._width) - (timeline_mc.playhead_mc._width / 2))) {
_local1 = (timeline_mc.gutter_mc._width - timeline_mc.load_mc._width) - timeline_mc.playhead_mc._width;
}
if (_local1 < (timeline_mc.playhead_mc._width / 2)) {
_local1 = timeline_mc.playhead_mc._width / 2;
}
timeline_mc.playhead_mc._x = _local1 - (timeline_mc.playhead_mc._width / 2);
var _local2 = Math.floor((timeline_mc.playhead_mc._x / (timeline_mc.gutter_mc._width - timeline_mc.playhead_mc._width)) * video_seconds);
video_ns.seek(_local2);
display_time_listener(video_ns);
timeline_mc.playhead_mc.startDrag(false, 0, timeline_mc.playhead_mc._y, (timeline_mc.gutter_mc._width - timeline_mc.load_mc._width) - timeline_mc.playhead_mc._width, timeline_mc.playhead_mc._y);
Mouse.addListener(video_timeline_listener);
trace_to_facebook("SCRUBBED");
}
function video_adjust_volume() {
var _local2 = (((_xmouse - video_mc._x) - controls_mc._x) - volume_mc._x) - volume_mc.level_mc._x;
volume_mc.slider_mc._width = _local2;
if ((volume_mc.slider_mc._width >= 0) && (volume_mc.slider_mc._width <= volume_mc.level_mc._width)) {
var _local1 = (100 * volume_mc.slider_mc._width) / volume_mc.level_mc._width;
volume_mc.speaker_mc.gotoAndStop(1);
}
if ((_local1 > 95) || (_local1 == undefined)) {
var _local1 = 100;
}
if (_local1 < 5) {
var _local1 = 0;
}
video_sound.setVolume(_local1);
trace_to_facebook("VOLUME");
}
function video_mute() {
volume_mc.speaker_mc.hit_mc._alpha = 0;
volume_mc.mute_mc.onPress = (volume_mc.mute_mc.onRelease = (volume_mc.level_mc.onPress = undefined));
if (volume_mc.slider_mc._width > 0) {
_global.volume_refresh = ((video_sound.getVolume() > 0) ? (video_sound.getVolume()) : (volume_refresh));
var _local2 = 0;
volume_mc.speaker_mc.gotoAndStop(2);
video_mute_listener(true, _local2);
} else {
var _local2 = volume_refresh;
volume_mc.speaker_mc.gotoAndStop(1);
video_mute_listener(false, _local2);
}
var _local3 = new animation.mc_tween(volume_mc.slider_mc, "_xscale", volume_mc.slider_mc._xscale, _local2, 0.6, 3);
_local3.Done = function () {
volume_mc.mute_mc.onPress = function () {
volume_mc.speaker_mc.hit_mc._alpha = 100;
toggle_hide_listener(false);
};
volume_mc.mute_mc.onRelease = video_mute;
toggle_hide_listener(true);
};
volume_mc.level_mc.onPress = function () {
video_adjust_volume();
Mouse.addListener(video_volume_listener);
toggle_hide_listener(false);
};
}
function video_mute_listener(mute, slider_width_num) {
video_sound.setVolume(Math.round(volume_mc.slider_mc._xscale));
if (mute && (volume_mc.slider_mc._width > slider_width_num)) {
_global.video_mute_timeout = setTimeout(video_mute_listener, 10, mute, slider_width_num);
trace_to_facebook("MUTE_TOGGLE");
return(undefined);
}
if ((!mute) && (volume_mc.slider_mc._width < slider_width_num)) {
_global.video_mute_timeout = setTimeout(video_mute_listener, 10, mute, slider_width_num);
trace_to_facebook("MUTE_TOGGLE");
}
}
function controls_slide_up() {
controls_mc._visible = true;
controls_mc._alpha = 100;
new animation.mc_tween(controls_mc, "_y", controls_mc._y, Math.round(controls_mc.reset_y - controls_mc.background_mc._height), 0.4, 2);
}
function controls_slide_down() {
new animation.mc_tween(controls_mc, "_y", controls_mc._y, controls_mc.reset_y, 0.4, 2);
}
function controls_fade_in() {
controls_mc._visible = true;
new animation.mc_tween(controls_mc, "_alpha", controls_mc._alpha, 100, 0.4, 2);
}
function controls_fade_out() {
var _local1 = new animation.mc_tween(controls_mc, "_alpha", controls_mc._alpha, 0, 0.4, 2);
_local1.Done = function () {
controls_mc._visible = false;
};
}
function show_extra_controls() {
for (var _local2 in extra_controls) {
var _local1 = extra_controls[_local2];
t(_local1);
if (_local1) {
_local1._visible = true;
new animation.mc_tween(_local1, "_alpha", _local1._alpha, 100, 0.4, 2);
}
}
}
function hide_extra_controls(show_close_button) {
t("hide_extra_controls " + show_close_button);
for (var _local2 in extra_controls) {
var _local1 = extra_controls[_local2];
if (_local1) {
_local1._visible = false;
}
}
if (show_close_button && (close_button_mc)) {
close_button_mc._visible = true;
}
}
function controls_show() {
timeline_mc.gutter_mc.onPress = video_activate_timeline;
Mouse.show();
ui_is_visible = true;
if (Stage.displayState == "fullScreen") {
controls_fade_in();
} else {
controls_slide_up();
}
show_extra_controls();
}
function controls_dont_show() {
delete timeline_mc.gutter_mc.onPress;
Mouse.hide();
ui_is_visible = false;
if (Stage.displayState == "fullScreen") {
controls_fade_out();
} else {
controls_slide_down();
}
hide_extra_controls();
}
function mouse_check() {
if (mouse_move) {
_root.tracer = _root.tracer + "\r Do not hide.";
mouse_move = false;
_global.controls_hide_check_timeout = setTimeout(mouse_check, controls_out);
} else if (!mouse_move) {
var _local4 = Math.round(controls_mc.reset_y - controls_mc.background_mc._height);
if ((((Stage.displayState != "fullScreen") && ((((_root._xmouse < 8) || (_root._xmouse > (stage_width - 8))) || (_root._ymouse < _local4)) || (_root._ymouse > (stage_height - 8)))) && (controls_mc._y == _local4)) && (controls_hide)) {
if (extra_controls) {
for (var _local3 in extra_controls) {
if ((((_root._xmouse < (extra_controls[_local3]._x + extra_controls[_local3]._width)) && (_root._xmouse > extra_controls[_local3]._x)) && (_root._ymouse < (extra_controls[_local3]._y + extra_controls[_local3]._height))) && (_root._ymouse > extra_controls[_local3]._y)) {
return(undefined);
}
}
}
controls_dont_show();
} else if ((((Stage.displayState == "fullScreen") && (controls_mc._alpha == 100)) && ((((_root._xmouse < controls_mc._x) || (_root._xmouse > (controls_mc._x + controls_mc._width))) || (_root._ymouse < controls_mc._y)) || (_root._ymouse > (controls_mc._y + controls_mc._height)))) && (controls_hide)) {
controls_dont_show();
}
}
}
function add_hide_listener() {
_global.mouse_move = true;
Mouse.addListener(controls_hide_listener);
}
function toggle_hide_listener(listening) {
if (listening) {
controls_hide_listener.onMouseMove();
Mouse.addListener(controls_hide_listener);
} else {
clearTimeout(controls_hide_check_timeout);
Mouse.removeListener(controls_hide_listener);
}
}
function trace_to_facebook(action_key, additional_data) {
if ((video_id || (v)) && (motion_log)) {
if (!_root.log_actions[action_key]) {
return(undefined);
}
if ((((action_key == "SCRUBBED") || (action_key == "VOLUME")) || (action_key == "ENTER_FS")) || (action_key == "EXIT_FS")) {
if (_root.logged_already[action_key]) {
return(undefined);
}
_root.logged_already[action_key] = true;
}
var _local3 = new LoadVars();
_local3.v = video_id || (v);
_local3.a = log_actions[action_key];
if (additional_data != undefined) {
_local3.d = additional_data;
}
_local3.sendAndLoad(motion_log, _local3);
}
}
function remove_video() {
delete _global.video_sound;
delete _global.video_video;
delete _global.video_nc;
delete _global.video_ns;
removeMovieClip(video_mc);
}
function swap_video() {
video_volume = video_sound.getVolume();
play_pause();
remove_video();
destroy_controls();
video_buffering = true;
video_build(undefined, false, video_volume);
}
function reset_video() {
controls_slide_down();
hide_extra_controls();
loading_mc.removeMovieClip();
delete _global.loading_mc;
video_fade = new animation.mc_tween(video_mc, "_alpha", video_mc._alpha, 0, 0.4, 2);
video_fade.Done = swap_video;
}
function play_video_again() {
if (controls_hide) {
var _local2 = setTimeout(_root.add_hide_listener, _root.controls_in);
} else {
controls_mc._visible = true;
_root.add_hide_listener();
}
hide_extra_controls();
video_ns.seek(0);
_root.video_play(true);
_root.trace_to_facebook("REPLAY");
Key.addListener(space_bar_listener);
}
function standard_video_terminus_function(hide_tail_slate) {
if (!hide_tail_slate) {
var _local3 = new animation.mc_tween(video_mc, "_alpha", 100, 10, 0.33, 5);
if (controls_hide) {
var _local4 = new animation.mc_tween(controls_mc, "_y", controls_mc._y, controls_mc.reset_y, 0.4, 2);
_local4.Done = function () {
};
} else {
_local3.Done = function () {
controls_mc._visible = false;
};
}
hide_extra_controls(true);
tail_slate_mc.swapDepths(_root.getNextHighestDepth());
tail_slate_mc._visible = true;
tail_slate_mc.show();
var _local5 = new animation.mc_tween(tail_slate_mc, "_alpha", 0, 100, 0.45, 2);
} else {
if (controls_hide) {
var _local4 = new animation.mc_tween(controls_mc, "_y", controls_mc._y, Math.round(controls_mc.reset_y - controls_mc.background_mc._height), 0.4, 2);
}
play_mc.onRelease = (play_mc.onReleaseOutside = function () {
this.hit_mc._alpha = 0;
Mouse.hide();
if (controls_hide) {
var _local2 = new animation.mc_tween(controls_mc, "_y", controls_mc._y, controls_mc.reset_y, 0.4, 2);
var _local3 = setTimeout(add_hide_listener, controls_in);
} else {
add_hide_listener();
}
if (Math.abs(video_terminus_time - video_ns.time) < 1) {
video_ns.seek(0);
}
video_play(true);
play_mc.gotoAndStop("play");
this.onRelease = (this.onReleaseOutside = function () {
this.hit_mc._alpha = 0;
play_pause();
});
Key.addListener(space_bar_listener);
});
}
}
function standard_video_inception_function() {
start_mc.removeMovieClip();
start_button_mc.removeMovieClip();
}
function video_load_error() {
var _local3 = new animation.mc_tween(loading_mc, "_alpha", loading_mc._alpha, 0, 0.35);
_local3.Done = function () {
loading_mc.removeMovieClip();
video_mc.removeMovieClip();
var _local2 = _root.attachMovie("error_mc", "error_mc", _root.getNextHighestDepth());
_local2._x = Math.round((stage_width / 2) - (_local2._width / 2));
_local2._y = Math.round((stage_height / 2) - (_local2._height / 2));
var _local3 = new animation.mc_tween(_local2, "_alpha", 0, 100, 0.35);
};
}
function report() {
video_histogram.report();
}
function loadConnectInfo() {
if (_root.connect_like_lv) {
return(undefined);
}
_root.connect_like_lv = new LoadVars();
var _local4 = "/ajax/video/mvp_connect.php?v=" + video_id;
if (!mvp_served_from_fb) {
_local4 = "http://www.facebook.com" + _local4;
}
connect_like_lv.onLoad = function (success) {
if (success) {
var _local4 = new serialization.JSON();
var _local3 = new Object();
try {
_local3 = _local4.parse(this.connect);
if (_local3.fan && (mvp_connect)) {
_root.connect_obj = _local3.fan;
if (emu_connect) {
get_emu_connect();
}
_root.connect_obj.status = _local3.fan.status;
_root.connect_obj.as_function = _root.toggle_connect;
render_connect_button();
}
if ((_local3.like && (_local3.unlike)) && (mvp_like)) {
_root.like_obj = _local3.like;
_root.like_obj.as_function = _root.toggle_like;
_root.unlike_obj = _local3.unlike;
_root.unlike_obj.as_function = _root.toggle_like;
render_like_button();
}
} catch(error) {
_root.t("!cannot parse connect JSON!");
}
} else {
_root.t("could not /ajax/video/mvp_connect.php");
}
};
connect_like_lv.load(_local4);
}
function get_emu_connect() {
var _local3 = new serialization.JSON();
var _local2 = new Object();
try {
_local2 = _local3.parse(emu_connect);
_root.connect_obj.title = _local2.title;
_root.connect_obj.method = _local2.method;
_root.connect_obj.params = _local2.params;
} catch(error) {
}
}
function greenlight_swf(path) {
path = path.split("?")[0];
var _local2 = path.split("/");
var _local1 = _local2[_local2.length - 1];
for (good_swfs in whitelist_array) {
if (whitelist_array[good_swfs] == _local1) {
return(true);
}
}
return(false);
}
function load_trusted_clip(src, id, error_fcn) {
var new_mc = _root.createEmptyMovieClip(id, _root.getNextHighestDepth());
var _local3 = new MovieClipLoader();
var _local2 = new Object();
_local2.onLoadError = function (a, b, c) {
error_fcn();
};
_local2.onLoadComplete = function () {
t("got load complete for url " + new_mc._url);
System.security.allowDomain(new_mc._url);
};
_local3.addListener(_local2);
_local3.loadClip(src, new_mc);
}
function decode_js_action(emu_action) {
var _local1 = new Object();
var _local4 = new serialization.JSON();
try {
_local1 = _local4.parse(emu_action);
} catch(ex) {
}
for (var _local3 in _local1) {
for (var _local2 in _local1[_local3]) {
_local1[_local2] = _local1[_local3][_local2];
}
}
return(_local1);
}
function build_standard_button(button_width, button_height, button_text, button_icon, icon_alignment, outline) {
var _local2 = this.motion_mc.attachMovie("button_wrapper_mc", "button_mc", this.motion_mc.getNextHighestDepth());
_local2.bg_mc._width = button_width;
_local2.bg_mc._height = button_height;
_local2.title_mc.title_txt.text = button_text;
_local2.title_mc.title_txt.autoSize = true;
var _local11 = 3;
if (button_icon && ((icon_alignment == ICON_LEFT) || (!icon_alignment))) {
var _local5 = _local2.title_mc.attachMovie(button_icon, "icon_mc", 1);
_local5._x = 0;
_local5._y = 1;
_local2.title_mc.title_txt._x = _local5._width + _local11;
_local2.title_mc.title_txt._y = _local2.title_mc.title_txt._y + 1;
_local2.title_mc._x = Math.floor((button_width / 2) - (_local2.title_mc._width / 2));
} else if (button_icon && (icon_alignment == ICON_RIGHT)) {
var _local8 = _local2.title_mc.attachMovie(button_icon, "icon_mc", 1);
_local8._y = 0;
_local8._x = Math.floor(_local2.title_mc.title_txt._width + _local11);
_local2.title_mc._x = Math.floor((button_width / 2) - (_local2.title_mc._width / 2));
} else if (!button_icon) {
_local2.title_mc._x = Math.floor((button_width / 2) - (_local2.title_mc._width / 2));
}
if (outline) {
_local2.title_mc.title_txt._x = _local2.title_mc.title_txt._x + 3;
_local2.title_mc.title_txt._y = _local2.title_mc.title_txt._y + 1;
_local2.title_mc.icon_mc._x = _local2.title_mc.icon_mc._x + 3;
var _local6 = 0;
var _local10 = (((icon_alignment == ICON_LEFT) || (!icon_alignment)) ? (Math.floor(_local2.title_mc.title_txt._x + _local2.title_mc.title_txt._width)) : (_local2.title_mc.icon_mc._x));
var _local9 = _local2.title_mc.icon_mc._height - 1;
var _local7 = (((icon_alignment == ICON_LEFT) || (!icon_alignment)) ? (_local2.title_mc.icon_mc._width) : 0);
_local2.title_mc.lineStyle(1, 16777215, 100);
_local2.title_mc.moveTo(_local7, _local6);
_local2.title_mc.lineTo(_local10, _local6);
_local2.title_mc.lineTo(_local10, _local9);
_local2.title_mc.lineTo(_local7, _local9);
_local2.title_mc.lineTo(_local7, _local6);
}
_local2.title_mc._y = Math.round((button_height / 2) - (_local2.title_mc._height / 2));
_local2.title_mc._y = (button_icon ? (_local2.title_mc._y) : (_local2.title_mc._y + 2));
return(_local2);
}
function fix_layout(actions, learn_more) {
var _local4 = new Number();
var _local5 = new Number();
var _local3 = new Number();
var _local1 = 9;
if ((!actions) && (!learn_more)) {
_local4 = 3;
_local5 = emu_stage_width - (_local1 * 2);
_local3 = (emu_stage_height - (_local1 * 4)) / 3;
} else {
_local4 = 4;
_local5 = (emu_stage_width - (_local1 * 3)) / 2;
_local3 = (emu_stage_height - (_local1 * 3)) / 2;
}
var _local2 = new Array();
_local2.buttons = _local4;
_local2.button_width = _local5;
_local2.button_height = _local3;
_local2.button_margin = _local1;
return(_local2);
}
function build_motion() {
var motion_mc = this.motion_mc;
var action = (emu_action ? (decode_js_action(emu_action)) : undefined);
var learn_more = (ad_target ? (decode_js_action(ad_target)) : undefined);
var _local10 = fix_layout(action, learn_more);
var _local7 = _local10.buttons;
var _local8 = _local10.button_width;
var _local5 = _local10.button_height;
var _local4 = _local10.button_margin;
motion_mc.bg_mc._width = emu_stage_width;
motion_mc.bg_mc._height = emu_stage_height;
motion_mc.hover_mc._width = _local8;
motion_mc.hover_mc._height = _local5;
motion_mc._x = Math.round((stage_width / 2) - (motion_mc._width / 2));
motion_mc._y = Math.round((stage_height / 2) - (motion_mc._height / 2));
_global.motion_hover_mc = motion_mc.hover_mc;
motion_mc.hover_mc._visible = 0;
motion_mc.play_mc = build_standard_button(_local8, _local5, fbt_play_again, PLAY_ICON, ICON_LEFT);
var play_mc = motion_mc.play_mc;
play_mc._x = ((_local7 == 3) ? (_local4) : (_local4));
play_mc._y = ((_local7 == 3) ? (_local4) : (_local4));
play_mc.bg_mc.onRelease = function () {
play_mc.gotoAndStop(1);
motion_hover_mc._visible = false;
motion_mc._visible = false;
Mouse.hide();
if (controls_hide) {
var _local3 = setTimeout(_root.add_hide_listener, _root.controls_in);
} else {
controls_mc._visible = true;
_root.add_hide_listener();
}
hide_extra_controls();
var _local2 = new animation.mc_tween(video_mc, "_alpha", 10, 100, 0.35, 5);
video_ns.seek(0);
_root.video_play(true);
trace_to_facebook("REPLAY");
Key.addListener(space_bar_listener);
};
play_mc.bg_mc.onRollOver = function () {
motion_hover_mc._x = this._parent._x;
motion_hover_mc._y = this._parent._y;
motion_hover_mc._visible = true;
};
play_mc.bg_mc.onRollOut = (play_mc.bg_mc.onReleaseOutside = function () {
motion_hover_mc._visible = false;
});
play_mc.hit_mc.onRollOver = play_mc.bg_mc.onRollOver;
play_mc.hit_mc.onRollOut = function () {
motion_hover_mc._visible = false;
};
play_mc.hit_mc.onPress = function () {
this._parent.gotoAndStop(2);
};
play_mc.hit_mc.onReleaseOutside = function () {
motion_hover_mc._visible = false;
this._parent.gotoAndStop(1);
};
play_mc.hit_mc.onRelease = play_mc.bg_mc.onRelease;
motion_mc.share_mc = build_standard_button(_local8, _local5, fbt_share, SHARE_ICON, ICON_RIGHT, true);
var _local6 = motion_mc.share_mc;
_local6._x = ((_local7 == 3) ? (_local4) : (Math.round(_local8 + (_local4 * 2))));
_local6._y = ((_local7 == 3) ? (Math.round(_local5 + (_local4 * 2))) : (_local4));
_local6.bg_mc.onRelease = function () {
flash.external.ExternalInterface.call("share_internal_config", share_id);
trace_to_facebook("SHARE");
};
_local6.bg_mc.onRollOver = function () {
motion_hover_mc._x = this._parent._x;
motion_hover_mc._y = this._parent._y;
motion_hover_mc._visible = true;
};
_local6.bg_mc.onRollOut = (_local6.bg_mc.onReleaseOutside = function () {
motion_hover_mc._visible = false;
});
_local6.hit_mc.onRollOver = _local6.bg_mc.onRollOver;
_local6.hit_mc.onRollOut = function () {
motion_hover_mc._visible = false;
};
_local6.hit_mc.onPress = function () {
this._parent.gotoAndStop(2);
};
_local6.hit_mc.onReleaseOutside = function () {
motion_hover_mc._visible = false;
this._parent.gotoAndStop(1);
};
_local6.hit_mc.onRelease = _local6.bg_mc.onRelease;
if (learn_more) {
motion_mc.learn_more = build_standard_button(_local8, _local5, fbt_learn_more);
motion_mc.learn_more._x = ((_local7 == 3) ? (_local4) : (Math.round(_local8 + (_local4 * 2))));
motion_mc.learn_more._y = ((_local7 == 3) ? (Math.round((_local5 * 2) + (_local4 * 3))) : (Math.round(_local5 + (_local4 * 2))));
motion_mc.learn_more.bg_mc.onRelease = function () {
flash.external.ExternalInterface.call(learn_more.method, learn_more.params);
trace_to_facebook("LEARN_MORE");
};
motion_mc.learn_more.bg_mc.onRollOver = function () {
motion_hover_mc._x = this._parent._x;
motion_hover_mc._y = this._parent._y;
motion_hover_mc._visible = true;
};
motion_mc.learn_more.bg_mc.onRollOut = (motion_mc.learn_more.bg_mc.onReleaseOutside = function () {
motion_hover_mc._visible = false;
});
}
if (action) {
var _local11 = new String();
switch (action.type) {
case FAN :
_local11 = FAN_ICON;
break;
default :
}
motion_mc.action_mc = build_standard_button(_local8, _local5, action.title, _local11);
var _local9 = motion_mc.action_mc;
_local9._x = ((_local7 == 3) ? (_local4) : (_local4));
_local9._y = ((_local7 == 3) ? (Math.round((_local5 * 2) + (_local4 * 3))) : (Math.round(_local5 + (_local4 * 2))));
_local9.bg_mc.onRelease = function () {
if (js_available) {
disable_emu_mc(this);
flash.external.ExternalInterface.call(action.method, action.param);
}
};
_local9.bg_mc.onRollOver = function () {
motion_hover_mc._x = this._parent._x;
motion_hover_mc._y = this._parent._y;
motion_hover_mc._visible = true;
};
_local9.bg_mc.onRollOut = (motion_mc.add_video_mc.bg_mc.onReleaseOutside = function () {
motion_hover_mc._visible = false;
});
} else if (!learn_more_href) {
motion_mc.go_to_video_mc = build_standard_button(_local8, _local5, fbt_go_to_video);
motion_mc.go_to_video_mc._x = ((_local7 == 3) ? (_local4) : (_local4));
motion_mc.go_to_video_mc._y = ((_local7 == 3) ? (Math.round((_local5 * 2) + (_local4 * 3))) : (Math.round(_local5 + (_local4 * 2))));
motion_mc.go_to_video_mc.bg_mc.onRelease = function () {
trace_to_facebook("GO_TO_VIDEO");
var _local2 = (new security.sanitize_url(unescape(_root.video_href), "php")).clean_url;
getURL (_local2);
};
motion_mc.go_to_video_mc.bg_mc.onRollOver = function () {
motion_hover_mc._x = this._parent._x;
motion_hover_mc._y = this._parent._y;
motion_hover_mc._visible = true;
};
motion_mc.go_to_video_mc.bg_mc.onRollOut = (motion_mc.go_to_video_mc.bg_mc.onReleaseOutside = function () {
motion_hover_mc._visible = false;
});
}
}
function disable_emu_mc(target_mc) {
target_mc.onRelease = null;
target_mc.onReleaseOutside = null;
target_mc.onRollOut = null;
target_mc.onRollOver = null;
delete target_mc.onRelease;
delete target_mc.onReleaseOutside;
delete target_mc.onRollOut;
delete target_mc.onRollOver;
target_mc._alpha = 40;
motion_hover_mc._visible = false;
}
function motion_tail_slate() {
var _local2 = _root.attachMovie("motion_mc", "motion_mc", _root.getNextHighestDepth());
_local2._visible = true;
build_motion();
}
function EMU_tail_slate() {
if (!motion_mc.built) {
motion_tail_slate();
motion_mc.built = true;
} else {
motion_mc._visible = true;
}
var _local3 = new animation.mc_tween(video_mc, "_alpha", 100, 10, 0.15, 5);
if (controls_hide) {
var _local2 = new animation.mc_tween(controls_mc, "_y", controls_mc._y, controls_mc.reset_y, 0.4, 2);
_local2.Done = function () {
};
} else {
_local3.Done = function () {
controls_mc._visible = false;
};
}
hide_extra_controls(true);
_root.motion_mc._visible = true;
_local3 = new animation.mc_tween(_root.motion_mc, "_alpha", 0, 100, 0.35, 2);
}
System.security.allowDomain("*");
Stage.align = "TL";
Stage.scaleMode = "noScale";
video_resize_listener = new Object();
video_resize_listener.onResize = video_resize_stage;
Stage.addListener(video_resize_listener);
var curtain_mc = _root.curtain_mc;
curtain_mc._width = (curtain_mc._height = 1);
var stage_width = ((curtain_mc._width = Stage.width || (stage_width)));
var stage_height = ((curtain_mc._height = Stage.height || (stage_height)));
var v = ((v != undefined) ? (v) : undefined);
var video_id = ((video_id != undefined) ? (video_id) : undefined);
var video_width = ((video_width != undefined) ? (Number(video_width)) : (stage_width));
var video_height = ((video_height != undefined) ? (Number(video_height)) : (stage_height));
var lowqual_src = video_src;
var lowqual_width = (lowqual_width || (video_width));
var lowqual_height = (lowqual_height || (video_height));
var highqual_width = (highqual_width || (video_width));
var highqual_height = (highqual_height || (video_height));
var highqual_src = ((highqual_src != undefined) ? (highqual_src) : undefined);
var video_seconds = ((video_seconds != undefined) ? (Number(video_seconds)) : undefined);
var video_rotation = ((video_rotation != undefined) ? (Number(video_rotation)) : 0);
if ((((video_rotation != 0) && (video_rotation != 90)) && (video_rotation != 180)) && (video_rotation != 270)) {
video_rotation = 0;
}
var controls_style = ((controls_style != undefined) ? (Number(controls_style)) : 5);
var deblocking = ((deblocking != undefined) ? (Number(deblocking)) : 4);
var controls_in = 700;
var controls_out = 900;
var minimum_video_seconds = 6;
var video_buffer = ((video_seconds <= minimum_video_seconds) ? 0.1 : 5);
var video_terminus_count = 0;
var video_terminus_time = 0;
var s = (new security.sanitize_url(s, "swf")).clean_url;
var s = ((s != undefined) ? (String(s)) : undefined);
var ts = (new security.sanitize_url(ts, "swf")).clean_url;
var ts = ((ts != undefined) ? (String(ts)) : undefined);
var slate_src = (new security.sanitize_url(slate_src, "swf")).clean_url;
var slate_src = ((slate_src != undefined) ? (String(slate_src)) : undefined);
var tail_slate_src = (new security.sanitize_url(tail_slate_src, "swf")).clean_url;
var tail_slate_src = ((tail_slate_src != undefined) ? (String(tail_slate_src)) : undefined);
var jpg_src = (new security.sanitize_url(jpg_src, "jpg")).clean_url;
var jpg_src = ((thumb_url != undefined) ? (String(thumb_url)) : undefined);
var video_href = (new security.sanitize_url(video_href, "php")).clean_url;
var video_href = ((video_href != undefined) ? (String(video_href)) : undefined);
var video_owner_href = (new security.sanitize_url(video_owner_href, "php")).clean_url;
var video_owner_href = ((video_owner_href != undefined) ? (String(video_owner_href)) : undefined);
var video_owner_pic = undefined;
var next_video_url = (new security.sanitize_url(next_video_url, "php")).clean_url;
var next_video_url = ((next_video_url != undefined) ? (String(next_video_url)) : undefined);
var add_video_url = (new security.sanitize_url(add_video_url, "php")).clean_url;
var add_video_url = ((add_video_url != undefined) ? (String(add_video_url)) : undefined);
var video_timestamp = ((video_timestamp != undefined) ? (String(video_timestamp)) : undefined);
var video_owner_name = ((video_owner_name != undefined) ? (String(video_owner_name)) : undefined);
var video_title = ((video_title != undefined) ? (String(video_title)) : undefined);
var video_player_type = ((video_player_type != undefined) ? (String(video_player_type)) : undefined);
var emu_connect = ((emu_connect != undefined) ? (String(emu_connect)) : undefined);
var platform = getVersion().split(" ")[0];
var fbt_lowqual = (_root.fbt_lowqual || "Switch to High Quality");
var fbt_highqual = (_root.fbt_highqual || "Switch to Higher Quality");
var fbt_play_again = (_root.fbt_play_again || "Play Again");
var fbt_share = (_root.fbt_share || "Share");
var fbt_go_to_video = (_root.fbt_go_to_video || "Go to Video");
var fbt_next_video = (_root.fbt_next_video || "Next Video");
var motion_log = (new security.sanitize_url(motion_log, "php")).clean_url;
motion_log = String(motion_log) || "http://www.facebook.com/video/motion_log.php";
var video_histogram;
var play_context = (_root.play_context || -1);
var mvp_close_button = ((mvp_close_button != undefined) ? (mvp_close_button) : undefined);
var ui_is_visible = false;
var show_banner = ((show_banner != undefined) ? (Number(show_banner)) : false);
var controls_hide = ((controls_hide != undefined) ? (Number(controls_hide)) : true);
var controls_yoked = ((controls_yoked != undefined) ? (Number(controls_yoked)) : false);
var video_autoplay = ((video_autoplay != undefined) ? (Number(video_autoplay)) : false);
var highqual_is_on = (highqual_is_on || false);
var video_is_offsite = (video_is_offsite ? (Boolean(video_is_offsite)) : ((v ? true : false)));
var video_has_high_def = (video_has_high_def ? (Boolean(video_has_high_def)) : false);
var video_is_EMU = (video_is_EMU ? (Boolean(video_is_EMU)) : false);
var histogram_is_on = (histogram_is_on ? (Boolean(histogram_is_on)) : false);
var mvp_connect = (mvp_connect ? (Boolean(mvp_connect)) : false);
var mvp_like = (mvp_like ? (Boolean(mvp_like)) : false);
var video_buffering = true;
var js_is_available = flash.external.ExternalInterface.addCallback("louis", null, check_js_available);
var log_actions = {BUFFER:1, ERROR:2, REQUESTED:3, STARTED:4, FINISHED:5, PAUSED:6, UNPAUSED:7, TIMER_TOGGLE:8, SCRUBBED:9, VOLUME:10, MUTE_TOGGLE:11, REPLAY:12, NEXT:13, GO_TO_VIDEO:14, ENTER_FS:15, EXIT_FS:16, ENTER_HD:17, EXIT_HD:18, REQUESTED_OFFSITE:19, HISTOGRAM:20, LEARN_MORE:21, SHARE:22, LIKE:23, UNLIKE:24, CONNECT:25, CLOSE:26};
var logged_already = new Array();
_global.space_bar_listener = new Object();
space_bar_listener.onKeyDown = function () {
if (Key.isDown(32)) {
play_pause();
}
};
if (js_is_available && (!video_is_offsite)) {
try {
t(flash.external.ExternalInterface.addCallback("toggleHQ", null, toggle_hd));
t(flash.external.ExternalInterface.addCallback("reportTime", null, report));
} catch(err) {
t("err hq adding callback " + err.message);
}
}
_global.countdown = false;
var video_timeline_listener = new Object();
video_timeline_listener.onMouseMove = function () {
var _local1 = ((timeline_mc.playhead_mc._x - timeline_mc.gutter_mc._x) / (timeline_mc.gutter_mc._width - timeline_mc.playhead_mc._width)) * video_seconds;
video_ns.seek(_local1);
display_time_listener(video_ns);
updateAfterEvent();
};
var video_volume_listener = new Object();
video_volume_listener.onMouseMove = function () {
video_adjust_volume();
updateAfterEvent();
};
var controls_hide_listener = new Object();
controls_hide_listener.onMouseMove = function () {
clearTimeout(controls_hide_check_timeout);
mouse_move = true;
mouse_check();
if (((controls_mc._y == controls_mc.reset_y) || ((controls_mc._alpha == 0) && (Stage.displayState == "fullScreen"))) && (controls_hide)) {
controls_show();
}
};
_global.video_terminus_function = standard_video_terminus_function;
var whitelist_array = new Array("emu_tail_slate.swf");
var emu_stage_width = ((stage_width > 340) ? 340 : (stage_width));
var emu_stage_height = ((stage_height > 220) ? 220 : (stage_height));
var ICON_LEFT = "left";
var ICON_RIGHT = "right";
var PLAY_ICON = "play_icon_mc";
var SHARE_ICON = "share_icon_mc";
var FAN_ICON = "fan_icon_mc";
var EVENT_ICON = "play_icon_mc";
var FAN = "fan";
var featured_array = new Array("video_player_profile", "video_player_dashboard", "video_player_share");
for (player_type in featured_array) {
if (_root.video_player_type == featured_array[player_type]) {
var is_featured_video = true;
}
}
if (_root.video_is_EMU) {
_global.video_terminus_function = EMU_tail_slate;
}
var slate_holder_mc = _root.createEmptyMovieClip("slate_holder_mc", _root.getNextHighestDepth());
var build_tail_slate = false;
var FACEBOOK = "facebook";
var hostname = flash.external.ExternalInterface.call("window.location.hostname.toString");
var split_hostname = hostname.split(".");
var superdomain = split_hostname[split_hostname.length - 2];
var co_superdomain = ((split_hostname.length >= 3) ? (split_hostname[split_hostname.length - 3]) : undefined);
var mvp_served_from_fb = ((superdomain == FACEBOOK) || ((co_superdomain == FACEBOOK) && ((superdomain == "co") || (superdomain == "com"))));
if (((!mvp_served_from_fb) && (!v)) || ((mvp_served_from_fb && (!v)) && (!video_src))) {
_root.curtain_mc._visible = false;
slate_mc = new video.EmbeddedVideo(slate_holder_mc, undefined);
} else if (video_src) {
if (!video_autoplay) {
if (show_banner) {
slate_mc = new video.DashboardSlate(slate_holder_mc, get_slate_variables());
} else {
slate_mc = new video.Slate(slate_holder_mc, get_slate_variables());
}
} else if (video_autoplay) {
slate_holder_mc.removeMovieClip();
Mouse.hide();
_root.video_build(standard_video_inception_function);
}
build_tail_slate = true;
} else if (v) {
trace_to_facebook("REQUESTED_OFFSITE");
new video.EmbeddedVideo(slate_holder_mc, v);
build_tail_slate = true;
}
if (build_tail_slate) {
if ((video_src && (tail_slate_src)) && (greenlight_swf(tail_slate_src))) {
load_trusted_clip(tail_slate_src, "tail_slate_mc", function () {
});
} else {
var tail_slate_holder_mc = _root.createEmptyMovieClip("tail_slate_holder_mc", _root.getNextHighestDepth());
tail_slate_mc = new video.TailSlate(tail_slate_holder_mc, get_tail_slate_variables());
tail_slate_mc.hide();
}
}
Symbol 18 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 1
stop();
Symbol 35 MovieClip [motion_mc] Frame 1
stop();
Symbol 38 MovieClip [button_wrapper_mc] Frame 1
stop();
Symbol 89 MovieClip [start_button_mc] Frame 1
stop();
Symbol 115 MovieClip Frame 30
gotoAndPlay (1);
Symbol 116 MovieClip [loading_bars_mc] Frame 1
stop();
Symbol 116 MovieClip [loading_bars_mc] Frame 17
gotoAndPlay (1);
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 5
stop();
Symbol 133 MovieClip Frame 9
stop();
Symbol 133 MovieClip Frame 12
stop();
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 20
stop();
Symbol 153 MovieClip Frame 40
stop();
Symbol 154 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 17
stop();
Symbol 154 MovieClip Frame 40
stop();
Symbol 157 MovieClip Frame 1
stop();
Symbol 159 MovieClip [play_mc] Frame 1
stop();
Symbol 164 MovieClip Frame 1
stop();
Symbol 178 MovieClip Frame 1
stop();
Symbol 197 MovieClip [controls_mc] Frame 1
stop();
Symbol 205 MovieClip [__Packages.display.PaddedObject] Frame 0
class display.PaddedObject extends MovieClip
{
var bg_mc, body_mc, this_mc, __get__top, __get__right, __get__bottom, __get__left, __get__bg, __get__body;
function PaddedObject (target_mc, top_val, right_val, bottom_val, left_val) {
super();
bg_mc = target_mc.createEmptyMovieClip("bg_mc", target_mc.getNextHighestDepth());
body_mc = target_mc.createEmptyMovieClip("body_mc", target_mc.getNextHighestDepth());
padding_top = top_val || (padding_top);
padding_right = right_val || (padding_right);
padding_bottom = bottom_val || (padding_bottom);
padding_left = left_val || (padding_left);
this_mc = target_mc;
}
function set top(padding_val) {
setTop(padding_val);
//return(__get__top());
}
function setTop(padding_val) {
padding_top = padding_val;
}
function set right(padding_val) {
setRight(padding_val);
//return(__get__right());
}
function setRight(padding_val) {
padding_right = padding_val;
}
function set bottom(padding_val) {
setBottom(padding_val);
//return(__get__bottom());
}
function setBottom(padding_val) {
padding_bottom = padding_val;
}
function set left(padding_val) {
setLeft(padding_val);
//return(__get__left());
}
function setLeft(padding_val) {
padding_left = padding_val;
}
function set bg(target_mc) {
setBG(target_mc);
//return(__get__bg());
}
function setBG(target_mc) {
this_mc.bg_mc = target_mc;
}
function set body(target_mc) {
setBody(target_mc);
//return(__get__body());
}
function setBody(target_mc) {
body_mc = target_mc;
}
function pad() {
positionObjects();
}
function positionObjects() {
body_mc._x = padding_left;
body_mc._y = padding_top;
bg_mc._width = Math.round((body_mc._x + body_mc._width) + padding_right);
bg_mc._height = Math.round((body_mc._y + body_mc._height) + padding_bottom);
}
var padding_top = 0;
var padding_right = 0;
var padding_bottom = 0;
var padding_left = 0;
}
Symbol 206 MovieClip [__Packages.video.Slate] Frame 0
class video.Slate extends display.PaddedObject
{
var jpg_mc, this_mc, bg_mc, body_mc, start_hit_mc, play_mc;
function Slate (target_mc, variables) {
super(target_mc, main_padding, main_padding, main_padding, main_padding);
vars = variables;
if (vars.thumb_url) {
loadThumb();
}
renderStartHit();
renderPlayUI();
}
function renderEmptyMC(target_mc, name_str) {
return(target_mc.createEmptyMovieClip(name_str, target_mc.getNextHighestDepth()));
}
function renderTextField(target_mc, content_str, font_size, font_color, font_bold, max_width, active, align) {
var _local1 = target_mc.createTextField("text_txt", 0, 0, 0, max_width || 10, 10);
_local1.wordWrap = max_width || false;
_local1.multiline = max_width || false;
_local1.autoSize = align || true;
_local1.selectable = false;
_local1.html = active || false;
var _local2 = new TextFormat();
_local2.color = font_color || 3355443;
_local2.bold = font_bold || false;
_local2.size = font_size || 11;
_local2.align = align || "left";
var _local4 = getVersion().split(" ")[0];
if (_local4 == "MAC") {
_local2.font = "Lucida Grande";
} else {
_local2.font = "_sans";
}
var _local3 = new TextField.StyleSheet();
_local3.setStyle("a:hover", {textDecoration:"underline"});
_local1.setNewTextFormat(_local2);
_local1.styleSheet = _local3;
if (active) {
_local1.htmlText = ("<a href=\"#\">" + content_str) + "</a>";
} else {
_local1.text = content_str;
}
}
function loadThumb() {
var _local3 = new Object();
_local3.vars = vars;
_local3.handler = this;
var _local5 = new MovieClipLoader();
_local5.addListener(_local3);
_local3.onLoadInit = function (target_mc) {
this.handler.fitThumb(target_mc);
target_mc._x = Math.round((_root.stage_width / 2) - (target_mc._width / 2));
target_mc._y = Math.round((_root.stage_height / 2) - (target_mc._height / 2));
if (this.vars.video_has_high_def) {
var _local4 = new MovieClip();
_local4 = target_mc._parent.attachMovie("hd_logo_mc", "hd_logo_mc", target_mc._parent.getNextHighestDepth());
_local4._x = ((target_mc._x + target_mc._width) - _local4._width) - 12;
_local4._y = target_mc._y + 10;
var _local6 = new animation.mc_tween(_local4, "_alpha", 0, 60, 0.35, 3);
}
var _local5 = new animation.mc_tween(this.jpg_mc, "_alpha", 0, 100, 0.35, 3);
this.handler.thumbLoaded();
};
_local3.onLoadError = function (target_mc) {
this.handler.thumbError();
};
jpg_mc = renderEmptyMC(this_mc, "jpg_mc");
bg_mc.swapDepths(this_mc.getNextHighestDepth());
body_mc.swapDepths(this_mc.getNextHighestDepth());
_local5.loadClip(vars.thumb_url, jpg_mc);
}
function fitThumb(target_mc) {
var _local3 = target_mc._width / target_mc._height;
var _local4 = _root.stage_width / _root.stage_height;
if (_local3 < _local4) {
target_mc._height = _root.stage_height;
target_mc._xscale = target_mc._yscale;
} else if (_local3 > _local4) {
target_mc._width = _root.stage_width;
target_mc._yscale = target_mc._xscale;
} else {
target_mc._width = _root.stage_width;
target_mc._height = _root.stage_height;
}
}
function thumbLoaded() {
}
function thumbError() {
}
function renderStartHit() {
start_hit_mc = body_mc.attachMovie("square_mc", "start_hit_mc", body_mc.getNextHighestDepth());
start_hit_mc._width = _root.stage_width;
start_hit_mc._height = _root.stage_height;
start_hit_mc._alpha = 0;
start_hit_mc.this_mc = this_mc;
start_hit_mc.onRelease = playTheDamnedMovie;
}
function renderPlayUI() {
play_mc = renderEmptyMC(body_mc, "play_mc");
var _local3 = new video.ClearPlay(play_mc);
_local3.left = 19;
_local3.pad();
play_mc._x = Math.round((_root.stage_width / 2) - (play_mc._width / 2));
play_mc._y = Math.round((_root.stage_height / 2) - (play_mc._height / 2));
play_mc.this_mc = this_mc;
play_mc.onRelease = playTheDamnedMovie;
}
function resize() {
resizeSlate();
}
function resizeSlate() {
if (jpg_mc) {
fitThumb(jpg_mc);
jpg_mc._x = Math.round((_root.stage_width / 2) - (jpg_mc._width / 2));
jpg_mc._y = Math.round((_root.stage_height / 2) - (jpg_mc._height / 2));
}
play_mc._x = Math.round((_root.stage_width / 2) - (play_mc._width / 2));
play_mc._y = Math.round((_root.stage_height / 2) - (play_mc._height / 2));
if (vars.video_has_high_def) {
this_mc.body_mc.hd_logo_mc._x = ((jpg_mc._x + jpg_mc._width) - this_mc.body_mc.hd_logo_mc._width) - 12;
this_mc.body_mc.hd_logo_mc._y = jpg_mc._y + 10;
}
}
function removeSlate() {
killMe();
}
function killMe() {
this_mc.removeMovieClip();
}
function play() {
start_hit_mc.onRelease();
}
function playTheDamnedMovie() {
var _local3 = this_mc.body_mc.play_mc;
var _local4 = this_mc.body_mc.start_hit_mc;
Mouse.hide();
_root.video_build(undefined);
_local3._visible = false;
delete _local4.onRelease;
delete _local3.onRelease;
}
var main_padding = 0;
var vars = new Object();
}
Symbol 207 MovieClip [__Packages.animation.mc_tween] Frame 0
class animation.mc_tween
{
var target_mc, prop, begin, end, accel;
function mc_tween (_mc, _prop, _begin, _end, _accel, _snap) {
target_mc = _mc;
prop = _prop;
begin = _begin;
end = _end;
accel = _accel;
if (_snap != undefined) {
snap = _snap;
}
D++;
GO(target_mc, prop, begin, end, accel, snap, this);
}
function GO(target_mc, prop, begin, end, accel, snap, mc_tween_Obj) {
target_mc.createEmptyMovieClip(prop + "_mc", D + 1000);
target_mc[prop + "_mc"].running = true;
target_mc[prop + "_mc"].prop = prop;
target_mc[prop + "_mc"].begin = begin;
target_mc[prop + "_mc"].end = end;
target_mc[prop + "_mc"].accel = accel;
target_mc[prop + "_mc"].snap = snap;
target_mc[prop] = begin;
target_mc[prop + "_mc"].onEnterFrame = function () {
if (this.running && (Math.abs(this._parent[prop] - this.end) < this.snap)) {
this.running = false;
this._parent[prop] = this.end;
mc_tween_Obj.Done();
this.removeMovieClip();
} else if (this.running) {
this._parent[prop] = this._parent[prop] - ((this._parent[prop] - this.end) * this.accel);
}
};
}
function Done() {
}
static var D = 0;
var snap = 1;
}
Symbol 208 MovieClip [__Packages.video.ClearPlay] Frame 0
class video.ClearPlay extends display.PaddedObject
{
var positionObjects, onPress, onReleaseOutside, body_mc;
function ClearPlay (target_mc, top_val, right_val, bottom_val, left_val) {
super(target_mc, padding_top, padding_right, padding_bottom, padding_left);
target_mc.attachMovie("adobe_ripoff_bg_mc", "bg_mc", 0);
target_mc.attachMovie("light_style_play_mc", "body_mc", 1);
setSize();
positionObjects();
setActions();
}
function setActions() {
onPress = function () {
this.body_mc.play_shadow_mc._visible = false;
};
onReleaseOutside = function () {
this.body_mc.play_shadow_mc._visible = true;
};
}
function setSize() {
var _local2 = Math.round((width - body_mc._width) / 2);
padding_left = _local2 + 1;
padding_right = _local2;
var _local3 = Math.round((height - body_mc._height) / 2);
padding_top = (padding_bottom = _local3);
}
var padding_top = 7;
var padding_right = 12;
var padding_bottom = 7;
var padding_left = 15;
var width = 51;
var height = 42;
}
Symbol 209 MovieClip [__Packages.video.DashboardSlate] Frame 0
class video.DashboardSlate extends video.Slate
{
var horizontal_alignment, vertical_alignment, main_width, main_height, js_is_available, play_mc, renderEmptyMC, body_mc, vars, playTheDamnedMovie, start_hit_mc;
function DashboardSlate (target_mc, variables, width, height) {
horizontal_alignment = video.EmbedSlateUI.LEFT;
vertical_alignment = video.EmbedSlateUI.BOTTOM;
main_width = width || (_root.stage_width);
main_height = height || (_root.stage_height);
js_is_available = _root.js_is_available;
super(target_mc, variables);
}
function renderPlayUI() {
play_mc = renderEmptyMC(body_mc, "play_mc");
var _local3 = new Array();
_local3.headline = vars.video_title;
var _local4 = new Object();
_local4.text = "";
_root.display_time(vars.video_seconds, true, _local4);
var _local5 = ("<b>" + _local4.text) + "</b> ";
_local3.byline = _local5 + vars.video_timestamp;
new video.EmbedSlateUI(play_mc, _local3, horizontal_alignment, vertical_alignment, _root.stage_width, _root.stage_height);
play_mc.body_mc.play_mc.onRelease = playTheDamnedMovie;
if (vertical_alignment == video.EmbedSlateUI.BOTTOM) {
start_hit_mc._height = play_mc._y;
}
}
var MIN_WIDTH = 180;
}
Symbol 210 MovieClip [__Packages.video.EmbedSlateUI] Frame 0
class video.EmbedSlateUI extends display.PaddedObject
{
var horizontal_alignment, vertical_alignment, main_width, main_height, text_is_bold, centering_mc, js_is_available, positionObjects, body_mc, setRight;
function EmbedSlateUI (target_mc, content, h_align, v_align, width, height, render_headline_in_bold, reference_mc) {
super(target_mc, 5, 5, 5, 5);
content_obj = content;
horizontal_alignment = h_align;
vertical_alignment = v_align;
main_width = width || (_root.stage_width);
main_height = height || (_root.stage_height);
text_is_bold = render_headline_in_bold || false;
centering_mc = reference_mc;
js_is_available = _root.js_is_available;
target_mc.attachMovie("adobe_ripoff_bg_mc", "bg_mc", 0);
renderSlate();
positionObjects();
setOnStage();
}
function renderEmptyMC(target_mc, name_str) {
return(target_mc.createEmptyMovieClip(name_str, target_mc.getNextHighestDepth()));
}
function renderTextField(target_mc, content_str, font_size, font_color, font_bold, max_width, active, align) {
var _local1 = target_mc.createTextField("text_txt", 0, 0, 0, max_width || 10, 10);
_local1.wordWrap = max_width || false;
_local1.multiline = max_width || false;
_local1.autoSize = align || true;
_local1.selectable = false;
_local1.html = active || false;
var _local2 = new TextFormat();
_local2.color = font_color || 3355443;
_local2.bold = font_bold || false;
_local2.size = font_size || 11;
_local2.align = align || "left";
var _local4 = getVersion().split(" ")[0];
if (_local4 == "MAC") {
_local2.font = "Lucida Grande";
} else {
_local2.font = "_sans";
}
var _local3 = new TextField.StyleSheet();
_local3.setStyle("a:hover", {textDecoration:"underline"});
_local1.setNewTextFormat(_local2);
_local1.styleSheet = _local3;
if (active) {
_local1.htmlText = ("<a href=\"#\">" + content_str) + "</a>";
} else {
_local1.text = content_str;
}
}
function renderSlate() {
renderPlayButton();
initializeInfoMC(content_obj.video_owner_pic);
if (content_obj.headline) {
renderHeadline(content_obj.headline);
}
if (content_obj.byline) {
renderByline(content_obj.byline);
}
alignSlate();
}
function renderPlayButton() {
var _local2 = body_mc.attachMovie("light_style_play_mc", "play_mc", body_mc.getNextHighestDepth());
_local2.this_mc = body_mc._parent._parent._parent;
}
function renderAuthorPic(video_owner_pic, video_owner_href) {
var _local3 = body_mc.createEmptyMovieClip("video_owner_pic_mc", body_mc.getNextHighestDepth());
_local3.target_url = video_owner_href;
var _local2 = new Object();
_local2.parent_obj = this;
_local2.onLoadInit = function (target_mc) {
this.parent_obj.alignSlate();
this.parent_obj.positionObjects();
this.setAuthorPicOnClick(target_mc);
};
_local2.onLoadError = function (target_mc) {
};
var _local4 = new MovieClipLoader();
_local4.addListener(_local2);
_local4.loadClip((new security.sanitize_url(video_owner_pic, "jpg")).clean_url, _local3);
}
function setAuthorPicOnClick(target_mc) {
var _local2 = target_mc._parent._parent.content_obj;
if (_local2.video_owner_href) {
target_mc.video_owner_href = _local2.video_owner_href;
target_mc.onRelease = function () {
this.getURL(this.video_owner_href);
};
}
}
function initializeInfoMC(video_owner_pic) {
if (body_mc.info_mc) {
return(undefined);
}
body_mc.createEmptyMovieClip("info_mc", body_mc.getNextHighestDepth());
}
function renderHeadline(headline) {
var _local2 = renderEmptyMC(body_mc.info_mc, "headline_mc");
var _local3 = main_width - ((body_mc.play_mc._x + body_mc.play_mc._width) + (10 * main_padding));
renderTextField(_local2, headline, 13, 16777215, text_is_bold, _local3, js_is_available);
if (js_is_available) {
_local2.text_txt.htmlText = headline;
}
}
function renderByline(byline) {
var _local2 = renderEmptyMC(body_mc.info_mc, "byline_mc");
var _local3 = main_width - ((body_mc.play_mc._x + body_mc.play_mc._width) + (10 * main_padding));
renderTextField(_local2, byline, 11, 16777215, false, _local3, js_is_available);
if (js_is_available) {
_local2.text_txt.htmlText = byline;
}
}
function prepTextField(target_txt) {
var _local1 = new TextField.StyleSheet();
_local1.setStyle("a:hover", {color:"#FFFFFF", textDecoration:"underline"});
target_txt.styleSheet = _local1;
}
function alignSlate() {
if (horizontal_alignment == RIGHT) {
rightAlign();
} else if (horizontal_alignment == CENTER) {
centerAlign();
} else {
leftAlign();
}
}
function rightAlign() {
}
function centerAlign() {
}
function leftAlign() {
var _local2 = body_mc.info_mc;
if ((body_mc.video_owner_pic_mc._width > 0) && (_local2)) {
var _local3 = body_mc.video_owner_pic_mc._width || (OWNER_PIC_MAX_WIDTH);
_local2._x = Math.round(_local3 + main_padding);
}
if (_local2.headline_mc && (_local2.byline_mc)) {
_local2.byline_mc._y = Math.round((_local2.headline_mc._y + _local2.headline_mc._height) - 2);
}
body_mc.play_mc._x = Math.round(((main_width - (main_padding * 6)) - body_mc.play_mc._width) - 1);
body_mc.play_mc._y = Math.round((body_mc._height / 2) - (body_mc.play_mc._height / 2));
setRight(main_padding * 3);
if (centering_mc) {
body_mc._parent._x = Math.floor(centering_mc._x + main_padding);
} else {
body_mc._parent._x = main_padding;
}
}
function setOnStage() {
if (vertical_alignment == TOP) {
topAlign();
} else if (vertical_alignment == CENTER) {
centerAlignVert();
} else {
bottomAlign();
}
}
function topAlign() {
}
function centerAlignVert() {
}
function bottomAlign() {
var _local2 = body_mc._parent;
if (centering_mc) {
_local2._y = Math.floor(((centering_mc._y + main_height) - _local2._height) - main_padding);
} else {
_local2._y = Math.floor((main_height - _local2._height) - main_padding);
}
}
var main_padding = 4;
var content_obj = new Object();
var OWNER_PIC_MAX_WIDTH = 100;
static var RIGHT = "right";
static var CENTER = "center";
static var LEFT = "left";
static var TOP = "top";
static var BOTTOM = "bottom";
}
Symbol 211 MovieClip [__Packages.video.EmbeddedVideo] Frame 0
class video.EmbeddedVideo extends MovieClip
{
var this_mc, video_id, notLoggedInHandler, contentHandler, cannotSeeHandler, getURL;
function EmbeddedVideo (target_mc, v) {
super();
this_mc = target_mc;
video_id = v;
if (video_id == "putnam") {
setContent(getTestData());
return;
}
if (video_id) {
var _local3 = new video.CanSeeVideo(this);
notLoggedInHandler = renderLoginStage;
contentHandler = setContent;
cannotSeeHandler = renderPrivateStage;
_local3.getVideo(video_id);
} else {
renderPrivateStage();
}
}
function setContent(data_obj, handlerParent) {
for (var _local4 in data_obj) {
_root[_local4] = data_obj[_local4];
}
renderEmbedSlate(data_obj);
}
function renderEmbedSlate(data_obj) {
new video.EmbedSlate(this_mc, data_obj, video.EmbedSlateUI.LEFT, video.EmbedSlateUI.BOTTOM);
}
function renderLoginStage(data_obj) {
renderLogin(data_obj);
}
function renderLogin(data_obj) {
_root.curtain_mc._visible = false;
new video.EmbedLogin(this_mc, data_obj, getLogin, getSignup);
}
function getLogin() {
var _local3 = escape("http://www.facebook.com/video/video.php?v=" + _root.v);
getURL("http://www.facebook.com/login.php?next=" + _local3, "_top");
}
function getSignup() {
getURL("http://www.facebook.com/r.php", "_top");
}
function renderPrivateStage(data_obj) {
renderPrivate(data_obj);
}
function renderPrivate(data_obj) {
_root.t("render private stage called");
_root.curtain_mc._visible = false;
new video.EmbedPrivate(this_mc, data_obj);
}
function getTestData() {
var _local2 = new Array();
_local2.video_id = 15943367753;
_local2.video_length = 123800 /* 0x01E398 */;
_local2.video_seconds = 123;
_local2.video_category = 0;
_local2.video_rotation = 0;
_local2.video_href = "/video/video.php?v=15943367753";
_local2.video_player_type = "video_player_offsite";
_local2.video_width = 448;
_local2.video_height = 336;
_local2.video_owner_pic = "http://profile.ak.facebook.com/object2/1347/94/s6169193238_8541.jpg";
_local2.video_owner_name = "The War";
_local2.video_owner_href = "http://www.facebook.com/pages/The-War/6169193238";
_local2.video_src = "http://video-sf2p.facebook.com/v163/67/62/15943367753_17013.flv";
_local2.video_timestamp = "Added about 7 months ago";
_local2.video_title = "MJ would be proud";
_local2.thumb_url = "http://vthumb.ak.facebook.com/vthumb-ak-sf2p/v221/240/46/683602753/b683602753_15943367753_1330.jpg";
_local2.video_is_offsite = true;
_root.video_obj = _local2;
return(_local2);
}
}
Symbol 212 MovieClip [__Packages.video.CanSeeVideo] Frame 0
class video.CanSeeVideo
{
var handlerParent, notLoggedInHandler, cannotSeeHandler, contentHandler, loadVars;
function CanSeeVideo (ref_obj) {
handlerParent = ref_obj || this;
}
function External() {
notLoggedInHandler = function () {
};
cannotSeeHandler = function () {
};
contentHandler = function () {
};
}
function getVideo(v) {
if (loadVars) {
delete loadVars;
}
loadVars = new LoadVars();
var _local2 = "http://www.facebook.com/video/external_video.php?v=" + v;
var vid_lv = this;
loadVars.onHTTPStatus = function (httpStatus) {
if (httpStatus < 600) {
this.handlerParent.cannotSeeHandler();
}
};
loadVars.onLoad = function (success) {
if (success) {
vid_lv.parseData(this.video);
} else {
this.handlerParent.cannotSeeHandler();
}
};
if (v) {
loadVars.load(_local2);
}
}
function parseData(data) {
if (data) {
var _local5 = new serialization.JSON();
var _local3 = new Object();
try {
_local3 = _local5.parse(data);
for (var _local4 in _local3.content) {
_root.tracer = _root.tracer + (((_local4 + ": ") + _local3.content[_local4]) + newline);
}
} catch(error) {
handlerParent.cannotSeeHandler();
}
if (_local3.status == "login") {
handlerParent.notLoggedInHandler(_local3.content);
} else if (_local3.status == "invalid") {
handlerParent.cannotSeeHandler(_local3.content);
} else if (_local3.status == "ok") {
handlerParent.contentHandler(_local3.content);
}
} else {
handlerParent.cannotSeeHandler();
}
}
}
Symbol 213 MovieClip [__Packages.serialization.JSON] Frame 0
class serialization.JSON
{
var text;
function JSON () {
}
function stringify(arg) {
var _local4;
var _local3;
var _local7;
var _local2 = "";
var _local5;
switch (typeof(arg)) {
case "object" :
if (arg) {
if (arg instanceof Array) {
_local3 = 0;
while (_local3 < arg.length) {
_local5 = stringify(arg[_local3]);
if (_local2) {
_local2 = _local2 + ",";
}
_local2 = _local2 + _local5;
_local3++;
}
return(("[" + _local2) + "]");
}
if (typeof(arg.toString) != "undefined") {
for (_local3 in arg) {
_local5 = arg[_local3];
if ((typeof(_local5) != "undefined") && (typeof(_local5) != "function")) {
_local5 = stringify(_local5);
if (_local2) {
_local2 = _local2 + ",";
}
_local2 = _local2 + ((stringify(_local3) + ":") + _local5);
}
}
return(("{" + _local2) + "}");
}
}
return("null");
case "number" :
return((isFinite(arg) ? (String(arg)) : "null"));
case "string" :
_local7 = arg.length;
_local2 = "\"";
_local3 = 0;
while (_local3 < _local7) {
_local4 = arg.charAt(_local3);
if (_local4 >= " ") {
if ((_local4 == "\\") || (_local4 == "\"")) {
_local2 = _local2 + "\\";
}
_local2 = _local2 + _local4;
} else {
switch (_local4) {
case "\b" :
_local2 = _local2 + "\\b";
break;
case "\f" :
_local2 = _local2 + "\\f";
break;
case newline :
_local2 = _local2 + "\\n";
break;
case "\r" :
_local2 = _local2 + "\\r";
break;
case "\t" :
_local2 = _local2 + "\\t";
break;
default :
_local4 = _local4.charCodeAt();
_local2 = _local2 + (("\\u00" + Math.floor(_local4 / 16).toString(16)) + (_local4 % 16).toString(16));
}
}
_local3 = _local3 + 1;
}
return(_local2 + "\"");
case "boolean" :
return(String(arg));
}
return("null");
}
function white() {
while (ch) {
if (ch <= " ") {
next();
} else if (ch == "/") {
switch (next()) {
case "/" :
while ((next() && (ch != newline)) && (ch != "\r")) {
}
break;
case "*" :
next();
for(;;){
if (ch) {
if (ch == "*") {
if (next() == "/") {
next();
// unexpected jump
}
} else {
next();
}
} else {
error("Unterminated comment");
}
};
break;
default :
error("Syntax error");
}
} else {
break;
}
}
}
function error(m) {
throw {name:"JSONError", message:m, at:at - 1, text:text};
}
function next() {
ch = text.charAt(at);
at = at + 1;
return(ch);
}
function str() {
var _local5;
var _local2 = "";
var _local4;
var _local3;
var _local6 = false;
if (ch == "\"") {
while (next()) {
if (ch == "\"") {
next();
return(_local2);
}
if (ch == "\\") {
switch (next()) {
case "b" :
_local2 = _local2 + "\b";
break;
case "f" :
_local2 = _local2 + "\f";
break;
case "n" :
_local2 = _local2 + newline;
break;
case "r" :
_local2 = _local2 + "\r";
break;
case "t" :
_local2 = _local2 + "\t";
break;
case "u" :
_local3 = 0;
_local5 = 0;
while (_local5 < 4) {
_local4 = parseInt(next(), 16);
if (!isFinite(_local4)) {
_local6 = true;
break;
}
_local3 = (_local3 * 16) + _local4;
_local5 = _local5 + 1;
}
if (_local6) {
_local6 = false;
break;
}
_local2 = _local2 + String.fromCharCode(_local3);
break;
default :
_local2 = _local2 + ch;
}
} else {
_local2 = _local2 + ch;
}
}
}
error("Bad string");
}
function arr() {
var _local2 = [];
if (ch == "[") {
next();
white();
if (ch == "]") {
next();
return(_local2);
}
while (ch) {
_local2.push(value());
white();
if (ch == "]") {
next();
return(_local2);
}
if (ch != ",") {
break;
}
next();
white();
}
}
error("Bad array");
}
function obj() {
var _local3;
var _local2 = {};
if (ch == "{") {
next();
white();
if (ch == "}") {
next();
return(_local2);
}
while (ch) {
_local3 = str();
white();
if (ch != ":") {
break;
}
next();
_local2[_local3] = value();
white();
if (ch == "}") {
next();
return(_local2);
}
if (ch != ",") {
break;
}
next();
white();
}
}
error("Bad object");
}
function num() {
var _local2 = "";
var _local3;
if (ch == "-") {
_local2 = "-";
next();
}
while ((ch >= "0") && (ch <= "9")) {
_local2 = _local2 + ch;
next();
}
if (ch == ".") {
_local2 = _local2 + ".";
next();
while ((ch >= "0") && (ch <= "9")) {
_local2 = _local2 + ch;
next();
}
}
if ((ch == "e") || (ch == "E")) {
_local2 = _local2 + ch;
next();
if ((ch == "-") || (ch == "+")) {
_local2 = _local2 + ch;
next();
}
while ((ch >= "0") && (ch <= "9")) {
_local2 = _local2 + ch;
next();
}
}
_local3 = Number(_local2);
if (!isFinite(_local3)) {
error("Bad number");
}
return(_local3);
}
function word() {
switch (ch) {
case "t" :
if (((next() == "r") && (next() == "u")) && (next() == "e")) {
next();
return(true);
}
break;
case "f" :
if ((((next() == "a") && (next() == "l")) && (next() == "s")) && (next() == "e")) {
next();
return(false);
}
break;
case "n" :
if (!(((next() == "u") && (next() == "l")) && (next() == "l"))) {
break;
}
next();
return(null);
}
error("Syntax error");
}
function value() {
white();
switch (ch) {
case "{" :
return(obj());
case "[" :
return(arr());
case "\"" :
return(str());
case "-" :
return(num());
}
return((((ch >= "0") && (ch <= "9")) ? (num()) : (word())));
}
function parse(_text) {
text = _text;
at = 0;
ch = " ";
return(value());
}
var ch = "";
var at = 0;
}
Symbol 214 MovieClip [__Packages.video.EmbedSlate] Frame 0
class video.EmbedSlate extends video.Slate
{
var horizontal_alignment, vertical_alignment, main_width, main_height, js_is_available, this_mc, play_mc, renderEmptyMC, body_mc, playTheDamnedMovie, vars, start_hit_mc;
function EmbedSlate (target_mc, variables, h_align, v_align, width, height) {
horizontal_alignment = h_align;
vertical_alignment = v_align;
main_width = width || (_root.stage_width);
main_height = height || (_root.stage_height);
js_is_available = _root.js_is_available;
super(target_mc, variables);
}
function renderPlayUI() {
}
function renderUI() {
if (main_width < MIN_WIDTH) {
renderClearPlay();
} else {
renderBanner();
}
}
function thumbLoaded() {
main_width = this_mc.jpg_mc._width;
main_height = this_mc.jpg_mc._height;
renderUI();
}
function thumbError() {
renderUI();
}
function renderClearPlay() {
play_mc = renderEmptyMC(body_mc, "play_mc");
var _local3 = new video.ClearPlay(play_mc);
_local3.left = 19;
_local3.pad();
play_mc._x = Math.round((_root.stage_width / 2) - (play_mc._width / 2));
play_mc._y = Math.round((_root.stage_height / 2) - (play_mc._height / 2));
play_mc.this_mc = this_mc;
play_mc.onRelease = playTheDamnedMovie;
}
function renderBanner() {
play_mc = renderEmptyMC(body_mc, "play_mc");
var _local2 = new Array();
_local2.headline = (js_is_available ? (((("<a href=\"" + vars.video_href) + "\">") + vars.video_title) + "</a>") : (vars.video_title));
_local2.byline = (js_is_available ? (((("<a href=\"" + vars.video_owner_href) + "\">") + vars.video_owner_name) + "</a>") : (vars.video_owner_name));
_local2.video_owner_pic = vars.video_owner_pic;
_local2.video_owner_href = vars.video_owner_href;
new video.EmbedSlateUI(play_mc, _local2, horizontal_alignment, vertical_alignment, main_width, main_height, true, this_mc.jpg_mc);
play_mc.body_mc.play_mc.onRelease = playTheDamnedMovie;
if (vertical_alignment == video.EmbedSlateUI.BOTTOM) {
start_hit_mc._height = play_mc._y;
}
}
var MIN_WIDTH = 180;
}
Symbol 215 MovieClip [__Packages.video.EmbedLogin] Frame 0
class video.EmbedLogin extends MovieClip
{
var main_mc, onLogin, onSignup, login_mc, padded_login_mc, signup_mc, padded_signup_mc, main_width, js_is_available;
function EmbedLogin (target_mc, fbt_obj, on_login, on_signup) {
super();
main_mc = target_mc;
if (fbt_obj) {
fbt = fbt_obj;
} else {
fbt.privacy_header = "Private Video";
fbt.privacy_message = "Due to Privacy Settings, not everyone can see this video. Login to Facebook if you have permission.";
fbt.login = "Login";
fbt.or = "or";
fbt.signup = "Signup";
}
onLogin = on_login;
onSignup = on_signup;
login_mc = main_mc.createEmptyMovieClip("login_mc", 0);
padded_login_mc = new display.PaddedObject(login_mc);
signup_mc = main_mc.createEmptyMovieClip("signup_mc", 1);
padded_signup_mc = new display.PaddedObject(signup_mc);
main_width = _root.stage_width - (main_padding * 2);
js_is_available = _root.js_is_available;
if ((_root.stage_width < min_size) || (_root.stage_height < min_size)) {
renderMini();
} else {
renderFull();
}
}
function renderTextField(target_mc, content_str, font_size, font_color, font_bold, max_width, active, align) {
var _local1 = target_mc.createTextField("text_txt", 0, 0, 0, max_width || 10, 10);
_local1.wordWrap = max_width || false;
_local1.multiline = max_width || false;
_local1.autoSize = align || true;
_local1.selectable = false;
_local1.html = active || false;
var _local2 = new TextFormat();
_local2.color = font_color || 3355443;
_local2.bold = font_bold || false;
_local2.size = font_size || 11;
_local2.align = align || "left";
var _local4 = getVersion().split(" ")[0];
if (_local4 == "MAC") {
_local2.font = "Lucida Grande";
} else {
_local2.font = "_sans";
}
var _local3 = new TextField.StyleSheet();
_local3.setStyle("a:hover", {textDecoration:"underline"});
_local1.setNewTextFormat(_local2);
_local1.styleSheet = _local3;
if (active) {
_local1.htmlText = ("<a href=\"#\">" + content_str) + "</a>";
} else {
_local1.text = content_str;
}
}
function renderEmptyMC(target_mc, name_str) {
return(target_mc.createEmptyMovieClip(name_str, target_mc.getNextHighestDepth()));
}
function renderMini() {
var _local3 = renderLoginMain(true);
var _local4 = login_mc.login_body_mc;
var _local5 = _local4.attachMovie("favicon_mc", "favicon_mc", _local4.getNextHighestDepth());
_local5._y = 4;
var _local6 = renderLoginButton(login_mc.login_body_mc);
_local6._x = _local5._width + 4;
_local3._width = main_width;
_local3._height = Math.round((_root.stage_height / 2) - (main_padding * 3));
_local3._x = main_padding;
_local3._y = main_padding;
_local4._x = Math.round((_local3._width / 2) - (_local4._width / 2)) + _local3._x;
_local4._y = Math.round((_local3._height / 2) - (_local4._height / 2)) + _local3._y;
}
function renderFull() {
var _local5 = 10;
var _local8 = _root.stage_width - (_local5 * 2);
var _local4 = renderLoginMain();
var _local3 = login_mc.login_body_mc;
var _local6 = renderEmptyMC(_local3, "prompt_mc");
new video.PrivateVideoMessage(_local6, fbt.privacy_header, fbt.privacy_message, _local8);
if (js_is_available) {
var _local7 = renderLoginSignup(_local3);
_local7._x = Math.round((_local6._width / 2) - (_local7._width / 2));
}
_local7._y = (_local6._y + _local6._height) + _local5;
if ((_local3._width > (_root.stage_width - (_local5 * 2))) || (_local3._height > (_root.stage_height - (_local5 * 2)))) {
_local3.removeMovieClip();
renderMiniBody(_local4._parent, _local4);
return(undefined);
}
signup_mc._y = (_root.stage_height - signup_mc._height) - (_local5 * 2);
if (js_is_available) {
renderClickableLogo();
}
_local4._width = _root.stage_width;
_local4._height = _root.stage_height;
_local3._x = Math.round((_local4._width / 2) - (_local3._width / 2)) + _local4._x;
_local3._y = Math.round(((_root.stage_height - 40) / 2) - (_local3._height / 2)) + 40;
}
function renderMiniBody(target_mc, bg_mc) {
var _local5 = renderEmptyMC(target_mc, "mini_body_mc");
var _local3 = renderEmptyMC(_local5, "header_mc");
var _local8 = _local3.attachMovie("favicon_mc", "favicon_mc", _local3.getNextHighestDepth());
_local8._y = 2;
var _local7 = renderEmptyMC(_local3, "title_mc");
renderTextField(_local7, fbt.login, 11, 3889560, true);
_local7._x = _local8._width;
var _local4 = renderLoginButton(_local5);
_local4._y = _local3._height + 6;
if (_local3._width > _local4._width) {
_local4._x = Math.round((_local3._width / 2) - (_local4._width / 2));
} else if (_local3._width < _local4._width) {
_local3._x = Math.round((_local4._width / 2) - (_local3._width / 2));
}
bg_mc._width = _root.stage_width;
bg_mc._height = _root.stage_height;
_local5._x = Math.round((bg_mc._width / 2) - (_local5._width / 2)) + bg_mc._x;
_local5._y = Math.round((bg_mc._height / 2) - (_local5._height / 2)) + bg_mc._y;
}
function renderLoginMain(mini) {
var _local3 = (mini ? "rounded_white" : "rounded_logo_mc");
var _local2 = login_mc.attachMovie(_local3, "login_bg_mc", login_mc.getNextHighestDepth());
login_mc.createEmptyMovieClip("login_body_mc", login_mc.getNextHighestDepth());
return(_local2);
}
function renderLoginButton(target_mc) {
var _local2 = new MovieClip();
_local2 = target_mc.createEmptyMovieClip("login_button_mc", target_mc.getNextHighestDepth());
var _local3 = new MovieClip();
_local3 = new video.FBButton(_local2, fbt.login, null, onLogin);
return(_local2);
}
function renderSignupButton(target_mc) {
var _local2 = new MovieClip();
_local2 = target_mc.createEmptyMovieClip("signup_button_mc", target_mc.getNextHighestDepth());
var _local3 = new MovieClip();
_local3 = new video.FBButton(_local2, fbt.signup, null, onSignup, "green");
return(_local2);
}
function renderLoginSignup(target_mc) {
var _local3 = renderEmptyMC(target_mc, "ls_mc");
var _local5 = renderLoginButton(_local3);
var _local2 = renderEmptyMC(_local3, "or_mc");
renderTextField(_local2, fbt.or, 11, 3355443, true);
_local2._x = _local5._width + 2;
_local2._y = 2;
var _local4 = renderSignupButton(_local3);
_local4._x = Math.round(_local2._x + _local2._width) + 2;
return(_local3);
}
function renderClickableLogo() {
var _local2 = main_mc.attachMovie("square_mc", "logo_hit_mc", main_mc.getNextHighestDepth());
_local2._width = 120;
_local2._height = 40;
_local2._alpha = 0;
_local2.onRelease = function () {
this.getURL("http://www.facebook.com", "_top");
};
}
var main_padding = 4;
var min_size = 180;
var fbt = new Array();
}
Symbol 216 MovieClip [__Packages.video.PrivateVideoMessage] Frame 0
class video.PrivateVideoMessage extends MovieClip
{
function PrivateVideoMessage (target_mc, fbt_private_title, fbt_private_message, max_width) {
super();
width = ((width < max_width) ? (width) : (max_width));
var _local3 = renderEmptyMC(target_mc, "header_mc");
var _local8 = _local3.attachMovie("lock_icon_mc", "icon_mc", _local3.getNextHighestDepth());
var _local6 = renderEmptyMC(_local3, "title_mc");
renderTextField(_local6, fbt_private_title, 14, 3355443, true);
_local6._x = _local8._width + 2;
_local6._y = -2;
_local3._x = Math.round((width / 2) - (_local3._width / 2));
var _local4 = target_mc.attachMovie("square_mc", "line_mc", target_mc.getNextHighestDepth());
_local4._width = width;
_local4._height = 1;
_local4._alpha = 30;
_local4._y = _local3._height + 4;
var _local5 = renderEmptyMC(target_mc, "body_mc");
renderTextField(_local5, fbt_private_message, 11, 10066329, false, width, false, "center");
_local5._x = Math.round((width / 2) - (_local5._width / 2));
_local5._y = _local4._y + 10;
}
function renderTextField(target_mc, content_str, font_size, font_color, font_bold, max_width, active, align) {
var _local1 = target_mc.createTextField("text_txt", 0, 0, 0, max_width || 10, 10);
_local1.wordWrap = max_width || false;
_local1.multiline = max_width || false;
_local1.autoSize = align || true;
_local1.selectable = false;
_local1.html = active || false;
var _local2 = new TextFormat();
_local2.color = font_color || 3355443;
_local2.bold = font_bold || false;
_local2.size = font_size || 11;
_local2.align = align || "left";
var _local4 = getVersion().split(" ")[0];
if (_local4 == "MAC") {
_local2.font = "Lucida Grande";
} else {
_local2.font = "_sans";
}
var _local3 = new TextField.StyleSheet();
_local3.setStyle("a:hover", {textDecoration:"underline"});
_local1.setNewTextFormat(_local2);
_local1.styleSheet = _local3;
if (active) {
_local1.htmlText = ("<a href=\"#\">" + content_str) + "</a>";
} else {
_local1.text = content_str;
}
}
function renderEmptyMC(target_mc, name_str) {
return(target_mc.createEmptyMovieClip(name_str, target_mc.getNextHighestDepth()));
}
var width = 300;
}
Symbol 217 MovieClip [__Packages.video.FBButton] Frame 0
class video.FBButton extends display.PaddedObject
{
var positionObjects;
function FBButton (target_mc, content_str, href, onClick, color) {
super(target_mc, padding_top, padding_right, padding_bottom, padding_left);
var _local3 = new String();
switch (color) {
case CLEAR :
_local3 = "adobe_ripoff_bg_mc";
text_color = 16777215 /* 0xFFFFFF */;
break;
case GREEN :
_local3 = "rounded_green";
text_color = 16777215 /* 0xFFFFFF */;
bold_text = true;
break;
case BLUE :
default :
_local3 = "rounded_blue";
text_color = 16777215 /* 0xFFFFFF */;
bold_text = true;
}
target_mc.attachMovie(_local3, "bg_mc", 0);
renderTextField(target_mc, content_str);
setActions(target_mc, href, onClick);
positionObjects();
}
function renderTextField(target_mc, content_str) {
var _local2 = target_mc.body_mc.createTextField("text_txt", 0, 0, 0, 10, 10);
_local2.wordWrap = false;
_local2.multiline = false;
_local2.autoSize = true;
_local2.html = true;
_local2.selectable = false;
var _local3 = new TextFormat();
_local3.color = text_color;
_local3.bold = bold_text;
var _local5 = getVersion().split(" ")[0];
if (_local5 == "MAC") {
_local3.font = "Lucida Grande";
_local3.size = 11;
} else {
_local3.font = "_sans";
_local3.size = 11;
}
var _local4 = new TextField.StyleSheet();
_local4.setStyle("a:hover", {textDecoration:"underline"});
_local2.setNewTextFormat(_local3);
_local2.styleSheet = _local4;
_local2.htmlText = ("<a href=\"#\">" + content_str) + "</a>";
}
function setActions(target_mc, href, onClick) {
if (href) {
target_mc.onRelease = function () {
this.getURL(href);
};
} else {
target_mc.onRelease = onClick;
}
target_mc.onReleaseOutside = function () {
};
}
var padding_top = 3;
var padding_right = 7;
var padding_bottom = 4;
var padding_left = 6;
var text_color = 16777215;
var bold_text = false;
var CLEAR = "clear";
var GREEN = "green";
var BLUE = "blue";
}
Symbol 218 MovieClip [__Packages.video.EmbedPrivate] Frame 0
class video.EmbedPrivate extends MovieClip
{
var main_width, main_height, js_is_available;
function EmbedPrivate (target_mc, fbt_obj) {
super();
if (fbt_obj) {
fbt = fbt_obj;
} else {
fbt.privacy_header = "Video Unavailable";
fbt.privacy_message = "This video has either has been removed from Facebook or is not visible due to privacy settings.";
}
main_width = _root.stage_width - (main_padding * 2);
main_height = _root.stage_height - (main_padding * 2);
js_is_available = _root.js_is_available;
var _local7 = Boolean((_root.stage_width > min_size) && (_root.stage_height > min_size));
var _local9 = (_local7 ? "rounded_logo_mc" : "rounded_white");
var _local5 = target_mc.attachMovie(_local9, "login_bg_mc", target_mc.getNextHighestDepth());
var _local4 = (_local7 ? (renderFull(target_mc)) : (renderMini(target_mc)));
if (js_is_available) {
renderClickableLogo(target_mc);
}
_local5._width = _root.stage_width;
_local5._height = _root.stage_height;
_local4._x = Math.round((_local5._width / 2) - (_local4._width / 2));
var _local8 = (_local7 ? (Math.round(((_root.stage_height - 40) / 2) - (_local4._height / 2)) + 40) : (Math.round((_local5._height / 2) - (_local4._height / 2))));
_local4._y = _local8;
}
function renderTextField(target_mc, content_str, font_size, font_color, font_bold, max_width, active, align) {
var _local1 = target_mc.createTextField("text_txt", 0, 0, 0, max_width || 10, 10);
_local1.wordWrap = max_width || false;
_local1.multiline = max_width || false;
_local1.autoSize = align || true;
_local1.selectable = false;
_local1.html = active || false;
var _local2 = new TextFormat();
_local2.color = font_color || 3355443;
_local2.bold = font_bold || false;
_local2.size = font_size || 11;
_local2.align = align || "left";
var _local4 = getVersion().split(" ")[0];
if (_local4 == "MAC") {
_local2.font = "Lucida Grande";
} else {
_local2.font = "_sans";
}
var _local3 = new TextField.StyleSheet();
_local3.setStyle("a:hover", {textDecoration:"underline"});
_local1.setNewTextFormat(_local2);
_local1.styleSheet = _local3;
if (active) {
_local1.htmlText = ("<a href=\"#\">" + content_str) + "</a>";
} else {
_local1.text = content_str;
}
}
function renderEmptyMC(target_mc, name_str) {
return(target_mc.createEmptyMovieClip(name_str, target_mc.getNextHighestDepth()));
}
function renderFull(target_mc) {
var _local2 = renderEmptyMC(target_mc, "private_mc");
new video.PrivateVideoMessage(_local2, fbt.privacy_header, fbt.privacy_message, main_width);
return(_local2);
}
function renderMini(target_mc) {
var _local4 = renderEmptyMC(target_mc, "private_mc");
var _local5 = _local4.attachMovie("lock_icon_mc", "icon_mc", _local4.getNextHighestDepth());
var _local3 = renderEmptyMC(_local4, "text_mc");
renderTextField(_local3, fbt.privacy_header, 11, 10066329);
var _local6 = _local5._width + 1;
var _local7 = _local5._height;
if ((_local6 + _local3._width) < main_width) {
_local3._x = _local6;
} else if (((_local7 + _local3._height) < main_height) && (_local3._width < _root.stage_width)) {
_local5._x = Math.round((_local3._width / 2) - (_local5._width / 2));
_local3._y = _local7;
} else {
_local3.removeMovieClip();
}
return(_local4);
}
function renderClickableLogo(target_mc) {
var _local2 = target_mc.attachMovie("square_mc", "logo_hit_mc", target_mc.getNextHighestDepth());
_local2._width = 120;
_local2._height = 40;
_local2._alpha = 0;
_local2.onRelease = function () {
this.getURL("http://www.facebook.com", "_top");
};
}
var main_padding = 4;
var fbt = new Array();
var min_size = 180;
}
Symbol 219 MovieClip [__Packages.video.CloseButton] Frame 0
class video.CloseButton extends display.PaddedObject
{
var button_mc, handlerParent, positionObjects, js_method;
function CloseButton (target_mc, close_json) {
super(target_mc, padding_top, padding_right, padding_bottom, padding_bottom);
button_mc = target_mc;
handlerParent = this;
parseData(close_json);
renderButton();
positionObjects();
}
function parseData(json_data) {
var _local4 = new serialization.JSON();
var _local3 = new Object();
try {
_local3 = _local4.parse(json_data);
js_method = _local3.method;
enableToggle();
} catch(error) {
_root.t("cannot parse: " + json_data);
}
}
function renderButton() {
button_mc.attachMovie("adobe_ripoff_bg_mc", "bg_mc", 0);
var _local2 = button_mc.body_mc.createEmptyMovieClip("x_mc", 10);
_local2.attachMovie("white_x_mc", "img_mc", 0);
}
function enableToggle() {
button_mc.js_method = js_method;
button_mc.onRelease = function () {
flash.external.ExternalInterface.call(this.js_method);
_root.trace_to_facebook("CLOSE");
};
}
function disableToggle() {
delete button_mc.onRelease;
}
var padding_top = 8;
var padding_right = 8;
var padding_bottom = 8;
var padding_left = 8;
}
Symbol 220 MovieClip [__Packages.video.VideoHistogram] Frame 0
class video.VideoHistogram
{
var video_seconds_watched_so, video_id, swf_id, video_ns, video_seconds, video_finished, video_update_interval;
function VideoHistogram (__swf_id, __video_id, __video_ns, __video_seconds, __use_shared_objects) {
use_shared_objects = __use_shared_objects;
if (use_shared_objects) {
video_seconds_watched_so = SharedObject.getLocal(VIDEO_SO);
video_seconds_watched_so.data.video_id = __video_id;
} else {
video_id = __video_id;
}
swf_id = __swf_id;
video_ns = __video_ns;
video_seconds = __video_seconds;
}
function update(time) {
updateSO(time);
}
function updateSO(time) {
var _local2 = (time ? (((time > max_seconds_watched) ? (time) : (max_seconds_watched))) : (((video_ns.time > max_seconds_watched) ? (video_ns.time) : (max_seconds_watched))));
if (use_shared_objects) {
video_seconds_watched_so.data.end = _local2;
}
max_seconds_watched = ((_local2 > video_seconds) ? (video_seconds) : (_local2));
}
function report() {
if (video_finished) {
return(undefined);
}
reportJS();
}
function reportJS() {
flash.external.ExternalInterface.call("video_histogram.setPayload", swf_id, reportEndTime());
}
function reportEndTime() {
updateSO();
var _local3 = new Object();
_local3.v = video_id;
_local3.a = _root.log_actions.HISTOGRAM;
_local3.w = Math.round(max_seconds_watched);
_local3.l = video_seconds;
return(_local3);
}
function enable() {
enableJS();
}
function enableJS() {
flash.external.ExternalInterface.call("video_histogram.start", swf_id);
}
function finished() {
video_finished = true;
finishedJS();
}
function finishedJS() {
flash.external.ExternalInterface.call("video_histogram.videoFinished", swf_id, reportEndTime());
}
function clear() {
clearSO();
}
function clearSO() {
video_seconds_watched_so.clear();
clearInterval(video_update_interval);
}
function flush() {
flushSO();
}
function flushSO() {
updateSO();
video_seconds_watched_so.flush();
}
function pause() {
stopInterval();
}
function stopInterval() {
clearInterval(video_update_interval);
}
function record() {
startInterval();
}
function startInterval() {
video_update_interval = setInterval(this, "updateSO", interval_length);
}
var VIDEO_SO = "video_seconds_watched_so";
var SO_PATH = "../www.facebook.com/";
var interval_length = 3000;
var use_shared_objects = false;
var max_seconds_watched = 0;
var async_payload = new Array();
}
Symbol 221 MovieClip [__Packages.display.JSButton] Frame 0
class display.JSButton extends display.PaddedObject
{
var button_mc, default_state, positionObjects, current_state;
function JSButton (target_mc, default_obj) {
super(target_mc, padding_top, padding_right, padding_bottom, padding_bottom);
button_mc = target_mc;
default_state = default_obj;
setState(default_state);
renderButton();
positionObjects();
enableToggle();
}
function setState(go) {
current_state = go;
}
function renderButton() {
button_mc.attachMovie("adobe_ripoff_bg_mc", "bg_mc", 0);
renderTextField();
renderText(true);
}
function renderTextField() {
var _local2 = button_mc.body_mc.createTextField("toggle_txt", 0, 0, 0, 10, 10);
_local2.wordWrap = false;
_local2.multiline = false;
_local2.autoSize = true;
_local2.html = true;
_local2.selectable = false;
var _local3 = new TextFormat();
_local3.color = 16777215 /* 0xFFFFFF */;
var _local5 = getVersion().split(" ")[0];
if (_local5 == "MAC") {
_local3.font = "Lucida Grande";
_local3.size = 11;
} else {
_local3.font = "_sans";
_local3.size = 11;
}
var _local4 = new TextField.StyleSheet();
_local4.setStyle("a:hover", {textDecoration:"underline"});
_local2.setNewTextFormat(_local3);
_local2.styleSheet = _local4;
}
function renderText(active) {
if (active) {
button_mc.body_mc.toggle_txt.htmlText = ("<a href=\"#\">" + current_state.title) + "</a>";
} else {
button_mc.body_mc.toggle_txt.htmlText = current_state.title;
}
}
function enableToggle() {
button_mc.js = new Array();
button_mc.js.push(current_state.method);
var _local2 = 0;
while (_local2 < current_state.params.length) {
button_mc.js.push(current_state.params[_local2]);
_local2++;
}
if (current_state.as_function) {
button_mc.onclick = current_state.as_function;
}
button_mc.onRelease = function () {
flash.external.ExternalInterface.call.apply(null, this.js);
if (this.onclick) {
this.onclick();
}
};
}
function disableToggle() {
delete button_mc.onRelease;
}
var padding_top = 3;
var padding_right = 5;
var padding_bottom = 4;
var padding_left = 6;
}
Symbol 222 MovieClip [__Packages.video.HQToggle] Frame 0
class video.HQToggle extends display.PaddedObject
{
var toggle_mc, highqual_str, lowqual_str, positionObjects;
function HQToggle (target_mc, fbt_highqual, fbt_lowqual, hq_is_on) {
super(target_mc, padding_top, padding_right, padding_bottom, padding_bottom);
toggle_mc = target_mc;
toggle_mc.toggle = this;
HQ = hq_is_on;
highqual_str = fbt_highqual;
lowqual_str = fbt_lowqual;
renderButton();
positionObjects();
enableToggle();
}
function renderButton() {
toggle_mc.attachMovie("adobe_ripoff_bg_mc", "bg_mc", 0);
renderTextField();
renderText(HQ, true);
}
function renderTextField() {
var _local2 = toggle_mc.body_mc.createTextField("toggle_txt", 0, 0, 0, 10, 10);
_local2.wordWrap = false;
_local2.multiline = false;
_local2.autoSize = true;
_local2.html = true;
_local2.selectable = false;
var _local3 = new TextFormat();
_local3.color = 16777215 /* 0xFFFFFF */;
var _local5 = getVersion().split(" ")[0];
if (_local5 == "MAC") {
_local3.font = "Lucida Grande";
_local3.size = 11;
} else {
_local3.font = "_sans";
_local3.size = 11;
}
var _local4 = new TextField.StyleSheet();
_local4.setStyle("a:hover", {textDecoration:"underline"});
_local2.setNewTextFormat(_local3);
_local2.styleSheet = _local4;
}
function renderText(HQ, active) {
var _local2 = (HQ ? (lowqual_str) : (highqual_str));
if (active) {
toggle_mc.body_mc.toggle_txt.htmlText = ("<a href=\"#\">" + _local2) + "</a>";
} else {
toggle_mc.body_mc.toggle_txt.htmlText = _local2;
}
}
function enableToggle() {
toggle_mc.onRelease = _root.toggle_hd;
}
function disableToggle() {
delete toggle_mc.onRelease;
}
var padding_top = 3;
var padding_right = 5;
var padding_bottom = 4;
var padding_left = 6;
var HQ = false;
}
Symbol 223 MovieClip [__Packages.shape.create_rectangle] Frame 0
class shape.create_rectangle extends MovieClip
{
var rec_name_str, rec_parent_mc, rec_w_num, rec_h_num, rec_color_num, rec_bg_alpha_num, return_mc;
function create_rectangle (rec_name, parent_mc, w, h, bg_color, bg_alpha) {
super();
rec_name_str = rec_name;
rec_parent_mc = parent_mc;
rec_w_num = w;
rec_h_num = h;
rec_color_num = bg_color;
rec_bg_alpha_num = (bg_alpha ? (bg_alpha) : 100);
return_mc = draw_rectangle(rec_name_str, rec_parent_mc, rec_w_num, rec_h_num, rec_color_num, rec_bg_alpha_num);
}
function draw_rectangle(rec_name_str, rec_parent_mc, rec_w_num, rec_h_num, rec_color_num, rec_bg_alpha_num) {
var _local1 = rec_parent_mc.createEmptyMovieClip(rec_name_str, rec_parent_mc.getNextHighestDepth());
_local1.beginFill(rec_color_num, rec_bg_alpha_num);
_local1.lineTo(rec_w_num, 0);
_local1.lineTo(rec_w_num, rec_h_num);
_local1.lineTo(0, rec_h_num);
_local1.lineTo(0, 0);
return(_local1);
}
}
Symbol 224 MovieClip [__Packages.video.TailSlate] Frame 0
class video.TailSlate extends display.PaddedObject
{
var this_mc, bg_mc, vars, positionObjects, _parent, getURL, body_mc;
function TailSlate (target_mc, variables) {
super(target_mc, padding_top, padding_right, padding_bottom, padding_left);
this_mc.attachMovie("adobe_ripoff_bg_mc", "bg_mc", 0);
bg_mc._alpha = 30;
vars = variables;
var _local4 = getTailSlate();
renderTailSlate(_local4);
positionObjects();
this_mc._x = Math.round((_root.stage_width / 2) - (this_mc._width / 2));
this_mc._y = Math.round((_root.stage_height / 2) - (this_mc._height / 2));
}
function renderEmptyMC(target_mc, name_str) {
return(target_mc.createEmptyMovieClip(name_str, target_mc.getNextHighestDepth()));
}
function renderTextField(target_mc, content_str, font_size, font_color, font_bold, max_width, active, align) {
var _local1 = target_mc.createTextField("text_txt", 0, 0, 0, max_width || 10, 10);
_local1.wordWrap = max_width || false;
_local1.multiline = max_width || false;
_local1.autoSize = align || true;
_local1.selectable = false;
_local1.html = active || false;
var _local2 = new TextFormat();
_local2.color = font_color || 3355443;
_local2.bold = font_bold || false;
_local2.size = font_size || 11;
_local2.align = align || "left";
var _local4 = getVersion().split(" ")[0];
if (_local4 == "MAC") {
_local2.font = "Lucida Grande";
} else {
_local2.font = "_sans";
}
var _local3 = new TextField.StyleSheet();
_local3.setStyle("a:hover", {textDecoration:"underline"});
_local1.setNewTextFormat(_local2);
_local1.styleSheet = _local3;
if (active) {
_local1.htmlText = ("<a href=\"#\">" + content_str) + "</a>";
} else {
_local1.text = content_str;
}
}
function getTailSlate() {
if ((!vars.next_video_url) && (!vars.go_to_video)) {
return(new Array(getPlayButton()));
}
if (vars.next_video_url) {
return(new Array(getNextButton(), getPlayButton()));
}
if (vars.go_to_video) {
return(new Array(getGoButton(), getPlayButton()));
}
}
function playOnRelease() {
_parent._parent._visible = false;
var _local3 = new animation.mc_tween(_root.video_mc, "_alpha", 10, 100, 0.35, 5);
_root.play_video_again();
Mouse.hide();
}
function getPlayButton() {
var _local2 = new Object();
_local2.button_type = PLAY;
_local2.button_string = vars.fbt_play_again;
_local2.button_fnc = playOnRelease;
return(_local2);
}
function nextOnRelease() {
getURL(_root.next_video_url, "_top");
}
function getNextButton() {
var _local2 = new Object();
_local2.button_type = NEXT;
_local2.button_string = vars.fbt_next_video;
_local2.button_fnc = nextOnRelease;
return(_local2);
}
function goOnRelease() {
getURL(_root.video_href, "_top");
}
function getGoButton() {
var _local2 = new Object();
_local2.button_type = GO;
_local2.button_string = vars.fbt_go_to_video;
_local2.button_fnc = goOnRelease;
return(_local2);
}
function renderTailSlate(button_arr) {
for (var _local6 in button_arr) {
var _local3 = button_arr[_local6].button_type;
var _local5 = button_arr[_local6].button_string;
var _local4 = button_arr[_local6].button_fnc;
var _local6 = renderTailSlateButton(_local3, _local5, _local4);
}
}
function renderTailSlateButton(button_type, button_string, button_fnc) {
var _local2 = renderEmptyMC(body_mc, button_type + "_mc");
_local2._y = body_mc._height + button_margin;
new video.TailSlateButton(_local2, button_type, button_string, button_fnc);
return(_local2);
}
function resize() {
this_mc._x = Math.round((_root.stage_width / 2) - (this_mc._width / 2));
this_mc._y = Math.round((_root.stage_height / 2) - (this_mc._height / 2));
}
function hide() {
this_mc._visible = false;
}
function show() {
this_mc._visible = true;
}
var padding_top = 10;
var padding_right = 10;
var padding_bottom = 10;
var padding_left = 10;
var button_margin = 0;
var text_color = 16777215;
var bold_text = false;
var PLAY = "play";
var NEXT = "next";
var GO = "go";
}
Symbol 225 MovieClip [__Packages.video.ClearNext] Frame 0
class video.ClearNext extends display.PaddedObject
{
var positionObjects, onPress, onReleaseOutside, body_mc;
function ClearNext (target_mc, top_val, right_val, bottom_val, left_val) {
super(target_mc, padding_top, padding_right, padding_bottom, padding_left);
target_mc.attachMovie("adobe_ripoff_bg_mc", "bg_mc", 0);
target_mc.attachMovie("light_style_next_mc", "body_mc", 1);
setSize();
positionObjects();
setActions();
}
function setActions() {
onPress = function () {
this.body_mc.play_shadow_mc._visible = false;
};
onReleaseOutside = function () {
this.body_mc.play_shadow_mc._visible = true;
};
}
function setSize() {
var _local2 = Math.round((width - body_mc._width) / 2);
padding_left = _local2 + 2;
padding_right = _local2 - 2;
var _local3 = Math.round((height - body_mc._height) / 2);
padding_top = (padding_bottom = _local3);
}
var padding_top = 12;
var padding_right = 11;
var padding_bottom = 12;
var padding_left = 15;
var width = 51;
var height = 42;
}
Symbol 226 MovieClip [__Packages.video.TailSlateButton] Frame 0
class video.TailSlateButton extends display.PaddedObject
{
var bg_mc, positionObjects, body_mc, this_mc, onReleaseOutside;
function TailSlateButton (target_mc, type, content_str, on_click) {
super(target_mc, padding_top, padding_right, padding_bottom, padding_left);
var _local3 = new String();
switch (type) {
case PLAY :
_local3 = PLAY_GRAPHIC;
break;
case NEXT :
_local3 = NEXT_GRAPHIC;
break;
default :
_local3 = null;
}
target_mc.attachMovie("rounded_moody_blue", "bg_mc", 0);
bg_mc._alpha = 0;
renderBody(_local3, content_str);
setButtonActions(on_click);
positionObjects();
}
function renderEmptyMC(target_mc, name_str) {
return(target_mc.createEmptyMovieClip(name_str, target_mc.getNextHighestDepth()));
}
function renderTextField(target_mc, content_str, font_size, font_color, font_bold, max_width, active, align) {
var _local1 = target_mc.createTextField("text_txt", 0, 0, 0, max_width || 10, 10);
_local1.wordWrap = max_width || false;
_local1.multiline = max_width || false;
_local1.autoSize = align || true;
_local1.selectable = false;
_local1.html = active || false;
var _local2 = new TextFormat();
_local2.color = font_color || 3355443;
_local2.bold = font_bold || false;
_local2.size = font_size || 11;
_local2.align = align || "left";
var _local4 = getVersion().split(" ")[0];
if (_local4 == "MAC") {
_local2.font = "Lucida Grande";
} else {
_local2.font = "_sans";
}
var _local3 = new TextField.StyleSheet();
_local3.setStyle("a:hover", {textDecoration:"underline"});
_local1.setNewTextFormat(_local2);
_local1.styleSheet = _local3;
if (active) {
_local1.htmlText = ("<a href=\"#\">" + content_str) + "</a>";
} else {
_local1.text = content_str;
}
}
function renderBody(graphic, content_str) {
if (graphic) {
renderBodyWGraphic(graphic, content_str);
return(undefined);
}
padding_top = padding_top + 1;
var _local2 = (width - padding_left) - padding_right;
renderButtonText(body_mc, content_str, _local2);
}
function renderBodyWGraphic(renderGraphic, content_str) {
var _local2 = renderEmptyMC(body_mc, "graphic_mc");
new renderGraphic[undefined](_local2, 9, 14, 9, 17);
var _local4 = (((width - padding_left) - padding_right) - _local2._width) - main_padding;
var _local3 = renderButtonText(body_mc, content_str, _local4);
_local3._x = _local2._width + main_padding;
if (_local3._height > _local2._height) {
_local3._y = -2;
} else {
_local3._y = Math.round((_local2._height / 2) - (_local3._height / 2));
}
}
function renderButtonText(target_mc, content_str, text_width) {
var _local2 = renderEmptyMC(target_mc, "title_mc");
renderTextField(_local2, content_str, text_size, text_color, text_bold, text_width);
return(_local2);
}
function setButtonActions(on_click) {
this_mc.onRollOver = function () {
this.bg_mc._alpha = 100;
};
this_mc.onRollOut = (onReleaseOutside = function () {
this.bg_mc._alpha = 0;
});
this_mc.onRelease = on_click;
}
var padding_top = 6;
var padding_right = 6;
var padding_bottom = 6;
var padding_left = 6;
var main_padding = 6;
var width = 140;
var text_size = 11;
var text_color = 16777215;
var text_bold = false;
var PLAY = "play";
var NEXT = "next";
var GO = "go";
var PLAY_GRAPHIC = video.ClearPlay;
var NEXT_GRAPHIC = video.ClearNext;
}
Symbol 227 MovieClip [__Packages.security.sanitize_url] Frame 0
class security.sanitize_url
{
var target_url_str, target_file_type, clean_url;
function sanitize_url (url_str, file_type) {
target_url_str = url_str;
target_file_type = file_type;
clean_url = do_sanitize_url(target_url_str, target_file_type);
}
function do_sanitize_url(target_url_str, target_file_type) {
var _local5 = target_url_str.indexOf("asfunction");
var _local4 = target_url_str.indexOf("javascript");
var _local6 = target_url_str.slice(target_url_str.lastIndexOf(".") + 1, (target_url_str.lastIndexOf(".") + 1) + target_file_type.length);
if (((_local5 >= 0) || (_local4 >= 0)) || ((_local6 != target_file_type) && (target_file_type))) {
clean_url = undefined;
} else {
clean_url = target_url_str;
}
return(clean_url);
}
}