Frame 1
TemplateMaxi.main(this);
Symbol 20480 MovieClip [__Packages.ATemplate] Frame 0
class ATemplate
{
var _swfWidth, _swfHeight, _shortcuts, _player, controller;
function ATemplate () {
_initFlash();
_initVars();
_initKey();
_initVideo();
_initPlayer();
}
function _initFlash() {
Stage.scaleMode = "noScale";
Stage.align = "TL";
if (_root.width != undefined) {
_swfWidth = Number(_root.width);
} else {
_swfWidth = Stage.width;
}
if (_swfWidth < SWF_MINWIDTH) {
_swfWidth = SWF_MINWIDTH;
}
if (_root.height != undefined) {
_swfHeight = Number(_root.height);
} else {
_swfHeight = Stage.height;
}
if (_swfHeight < SWF_MINHEIGHT) {
_swfHeight = SWF_MINHEIGHT;
}
}
function _initVars() {
}
function _initKey() {
_shortcuts = new Array();
var _local2 = new Object();
_local2.onKeyDown = delegate(this, function () {
var _local2 = Selection.getFocus();
switch (Key.getCode()) {
case Key.LEFT :
case Key.RIGHT :
case Key.UP :
case Key.DOWN :
if (!_local2) {
break;
}
this._lastFocus = _local2;
Selection.setFocus(null);
return(undefined);
}
this._lastFocus = null;
});
_local2.onKeyUp = delegate(this, function () {
if (this._lastFocus) {
Selection.setFocus(this._lastFocus);
}
if (Key.getCode() == Key.ESCAPE) {
Selection.setFocus(null);
} else if (this._shortcuts[Key.getCode()]) {
this._shortcuts[Key.getCode()]();
}
});
Key.addListener(_local2);
}
function _addShortcut(pKeyCode, pFunction) {
_shortcuts[pKeyCode] = pFunction;
}
function _initVideo() {
video.beginFill(0);
video.lineTo(0, _swfHeight);
video.lineTo(_swfWidth, _swfHeight);
video.lineTo(_swfWidth, 0);
video.endFill();
video.video._width = _swfWidth;
video.video._height = _swfHeight;
video.video._x = 0;
video.video._y = 0;
}
function _initPlayer() {
_player = _root.createEmptyMovieClip("player_mc", _root.getNextHighestDepth());
}
function delegate(pTarget, pFunc) {
var _local4 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
var _local4 = arguments.callee.args.concat(arguments);
return(_local3.apply(_local2, _local4));
};
_local4.target = arguments.shift();
_local4.func = arguments.shift();
_local4.args = arguments;
return(_local4);
}
function resizeVideo(pWidth, pHeight) {
var _local4 = ((!(pWidth === undefined)) ? (pWidth) : (video.video.width));
var _local5 = ((!(pHeight === undefined)) ? (pHeight) : (video.video.height));
var _local6 = _swfWidth;
var _local7 = (_local6 * _local5) / _local4;
if (_local7 > _swfHeight) {
_local7 = _swfHeight;
_local6 = (_local7 * _local4) / _local5;
}
video.video._width = _local6;
video.video._height = _local7;
video.video._x = (_swfWidth - _local6) / 2;
video.video._y = (_swfHeight - _local7) / 2;
}
function playRelease() {
controller.play();
if (controller.getLoading().percent != 100) {
startLoading();
}
resizeVideo();
}
function pauseRelease() {
controller.pause();
}
function stopRelease() {
controller.stop();
}
function startLoading() {
}
//ASSetPropFlags(_local1, null, 1);
static var SWF_MINWIDTH = 20;
static var SWF_MINHEIGHT = 20;
var _background = _root.background_mc;
var video = _root.video_mc;
}
Symbol 20481 MovieClip [__Packages.TemplateMaxiBase] Frame 0
#initclip
if (!TemplateMaxiBase) {
//(_global.TemplateMaxiBase = function () {
this._topContainers = new Array();
super();
}) extends ATemplate
var _local1 = (_global.TemplateMaxiBase /* register */).prototype;
_local1._setVar = function (pVarName, pList, pType) {
var _local5 = 0;
for ( ; _local5 < pList.length ; _local5++) {
if (pList[_local5] != undefined) {
switch (pType) {
case "Number" :
this[pVarName] = _global.parseInt(pList[_local5], 10);
break;
case "Color" :
this[pVarName] = _global.parseInt(pList[_local5], 16);
break;
case "Boolean" :
this[pVarName] = (((pList[_local5] == "false") || (pList[_local5] == false)) ? false : true);
break;
default :
this[pVarName] = pList[_local5];
}
return(true);
}
}
return(false);
};
_local1._initVars = function (pConfig) {
};
ASSetPropFlags(_local1, null, 1);
_local1.PLAYER_HEIGHT = 20;
_local1.BUTTON_WIDTH = 26;
_local1.SLIDER_WIDTH = 20;
_local1.SLIDER_HEIGHT = 10;
_local1.VOLUME_WIDTH = 60;
_local1.VOLUME_HEIGHT = 6;
_local1._videoMargin = 5;
_local1._subtitleColor = 16777215 /* 0xFFFFFF */;
_local1._subtitleSize = 11;
_local1._playerColor = 1118481 /* 0x111111 */;
_local1._buttonColor = 16777215 /* 0xFFFFFF */;
_local1._buttonOverColor = 16776960 /* 0xFFFF00 */;
_local1._sliderColor1 = 13421772 /* 0xCCCCCC */;
_local1._sliderColor2 = 8947848 /* 0x888888 */;
_local1._sliderOverColor = 16776960 /* 0xFFFF00 */;
_local1._loadingColor = 16776960 /* 0xFFFF00 */;
_local1._title = "";
_local1._showStop = false;
_local1._showVolume = true;
_local1._showTime = 0;
_local1._backgroundColor1 = 8158332 /* 0x7C7C7C */;
_local1._backgroundColor2 = 3355443 /* 0x333333 */;
_local1._volume = 60;
_local1._volumeMax = 100;
_local1._onClickInterval = -1;
_local1._onClick = "playpause";
_local1._onClickTarget = "_self";
_local1._onDoubleClick = "none";
_local1._onDoubleClickTarget = "_self";
_local1._titleSize = 20;
_local1._showPlayer = "autohide";
_local1._playerTimeout = 1500;
_local1._bufferMessage = "Buffering _n_";
_local1._forceSize = false;
_local1._showLoading = "autohide";
_local1._bufferShowBackground = true;
_local1._bufferBackgroundColor = 0;
_local1._bufferColor = 16777215 /* 0xFFFFFF */;
_local1._videoBackgroundColor = 0;
_local1._shortcut = true;
_local1._showFullscreen = false;
_local1._isFullscreen = false;
_local1._marginSlider = 0;
_local1._showSwitchSubtitles = false;
_local1._titleColor = 16777215 /* 0xFFFFFF */;
_local1._lastBuffer = 0;
_local1._stopped = true;
_local1._showMouse = "always";
_local1._playerAlpha = 100;
_local1._showTitleAndStartimage = false;
_local1._showIconPlay = false;
_local1._iconPlayColor = 16777215 /* 0xFFFFFF */;
_local1._iconPlayBackgroundColor = 0;
_local1._iconPlayBackgroundAlpha = 75;
}
#endinitclip
Symbol 20482 MovieClip [__Packages.PlayerBasic] Frame 0
class PlayerBasic
{
var _template, _videoUrl, _nc, _ns, _sound, _timeTemp, _videoDuration, _times, _positions;
function PlayerBasic (pTemplate) {
_template = pTemplate;
_template.controller = this;
_initVars();
_initVideo();
if (_root.phpstream == "1") {
_isPhpStream = true;
}
if (_root.autoplay == "1") {
_template.playRelease();
} else {
if (_root.autoload == "1") {
_template.playRelease();
}
_template.stopRelease();
}
var _local3 = _root.createEmptyMovieClip("time_mc", _root.getNextHighestDepth());
_local3.onEnterFrame = _template.delegate(this, _enterFrame);
}
function _initVars() {
if (_root.flv != undefined) {
_videoUrl = _root.flv;
}
if (_root.buffer != undefined) {
_bufferTime = Number(_root.buffer);
}
if (_root.loop == "1") {
_loop = true;
}
}
function _initVideo() {
_nc = new NetConnection();
if (_root.netconnection != undefined) {
_nc.connect(_root.netconnection);
} else {
_nc.connect(null);
}
_ns = new NetStream(_nc);
_ns.setBufferTime(_bufferTime);
_ns.parent = this;
_ns.onStatus = function (info) {
switch (info.code) {
case "NetStream.Buffer.Empty" :
if (Math.abs(Math.floor(this.time) - Math.floor(this.parent._videoDuration)) < 2) {
this.parent._template.stopRelease();
if (this.parent._loop) {
this.parent._template.playRelease();
}
}
break;
case "NetStream.Buffer.Full" :
this.parent._template.resizeVideo();
break;
case "NetConnection.Connect.Success" :
var _local2 = {};
_local2.parent = this;
_local2.onResult = function (streamLength) {
this.parent.parent._videoDuration = ((info.duration < 0) ? 0 : (info.duration));
};
this.call("getLength", _local2, "theVideo");
}
};
_ns.onMetaData = function (info) {
this.parent._videoDuration = ((info.duration < 0) ? 0 : (info.duration));
this.parent._template.resizeVideo(info.width, info.height);
this.parent._times = info.keyframes.times;
this.parent._positions = info.keyframes.filepositions;
};
_template.video.video.attachVideo(_ns);
_template.video.video.smoothing = true;
_sound = new Sound();
_sound.attachSound(_template.video.video);
}
function _enterFrame() {
var _local2 = getPosition();
if (!(_local2 === _timeTemp)) {
streamStarted = true;
} else {
streamStarted = false;
}
_timeTemp = _local2;
}
function play() {
if ((!_nc) && (!_ns)) {
_firstPlay = false;
_initVideo();
}
if (!_firstPlay) {
_ns.play(_videoUrl);
_firstPlay = true;
} else {
_ns.pause();
}
isPlaying = true;
}
function pause() {
_ns.pause();
isPlaying = false;
}
function stop() {
if (_isPhpStream) {
_ns.play(_videoUrl + "0");
_ns.seek(0);
_ns.pause();
} else {
_ns.seek(0);
if (isPlaying) {
_ns.pause();
}
}
isPlaying = false;
if (_root.loadonstop == 0) {
delete _ns;
delete _nc;
}
}
function setPosition(pPosition) {
if (pPosition < 0) {
pPosition = 0;
}
if (pPosition > _videoDuration) {
pPosition = _videoDuration;
}
if (_isPhpStream) {
var _local3 = 0;
var _local4 = _times.length;
if (pPosition <= _times[0]) {
_local3 = _positions[0];
} else if (pPosition >= _times[_local4 - 1]) {
_local3 = _positions[0];
} else {
var _local5 = 40;
var _local6 = 0;
var _local7 = _local4;
var _local8 = 0;
var _local9 = 0;
while ((_local7 - _local6) > _local5) {
var _local10 = _local7 - _local6;
var _local11 = _local10 >> 1;
_local11 = _local6 + _local11;
var _local12 = _times[_local11];
_local8 = _local6;
_local9 = _local11;
if (pPosition >= _local12) {
_local8 = _local11;
_local9 = _local7;
}
_local6 = _local8;
_local7 = _local9;
}
var _local13 = _local6;
for ( ; _local13 < _local7 ; _local13++) {
if ((_times[_local13] <= pPosition) && (pPosition < _times[_local13 + 1])) {
_local3 = _positions[_local13];
break;
}
}
}
_local3 = ((_local3 < 0) ? 0 : (_local3));
_ns.play(_videoUrl + _local3);
if (!isPlaying) {
_ns.pause();
}
} else {
_ns.seek(pPosition);
}
}
function getPosition() {
if (_ns.time > _videoDuration) {
var _local2 = _videoDuration;
} else if (_ns.time < 0) {
var _local2 = 0;
} else {
var _local2 = _ns.time;
}
return(_local2);
}
function getDuration() {
return(_videoDuration);
}
function getBufferLength() {
return(_ns.bufferLength);
}
function getBufferTime() {
return(_ns.bufferTime);
}
function getLoading() {
var _local2 = _ns.bytesLoaded;
var _local3 = _ns.bytesTotal;
var _local4 = Math.round((_local2 / _local3) * 100);
if (_root.netconnection != undefined) {
_local2 = 100;
_local3 = 100;
_local4 = 100;
}
return({loaded:_local2, total:_local3, percent:_local4});
}
//ASSetPropFlags(_local1, null, 1);
var _bufferTime = 5;
var _loop = false;
var _isPhpStream = false;
var _firstPlay = false;
var streamStarted = false;
var isPlaying = false;
}
Symbol 20483 MovieClip [__Packages.TemplateMaxi] Frame 0
#initclip
if (!TemplateMaxi) {
//(_global.TemplateMaxi = function () {
super();
TemplateMaxi.superinit();
this._initBackground();
this._initFont();
this._marginSlider = this.BUTTON_WIDTH;
var _local3 = [this.BUTTON_WIDTH];
if (this._showStop) {
this._marginSlider = this._marginSlider + this.BUTTON_WIDTH;
_local3.push(this.BUTTON_WIDTH);
}
if (this._showVolume) {
this._marginSlider = this._marginSlider + this.VOLUME_WIDTH;
_local3.push(this.VOLUME_WIDTH);
}
if (this._showSwitchSubtitles) {
this._marginSlider = this._marginSlider + this.BUTTON_WIDTH;
_local3.push(this.BUTTON_WIDTH);
}
if (this._showFullscreen) {
this._marginSlider = this._marginSlider + this.BUTTON_WIDTH;
_local3.push(this.BUTTON_WIDTH);
}
this._initPlayerTime();
if (this._showTime > 0) {
this._marginSlider = this._marginSlider + (this._playerTime._width + 10);
_local3.push(this._playerTime._width + 10);
}
this._initPlayerSlider(this._marginSlider);
this._createSeparators(_local3);
_root.createEmptyMovieClip("top", _root.getNextHighestDepth());
var _local4 = 0;
for ( ; _local4 < this._topContainers.length ; _local4++) {
this.loadUrl(this._topContainers[_local4].depth, this._topContainers[_local4].url, this._topContainers[_local4].verticalAlign, this._topContainers[_local4].horizontalAlign);
}
this._initBuffering();
}) extends TemplateMaxiBase
var _local1 = (_global.TemplateMaxi /* register */).prototype;
(_global.TemplateMaxi /* register */).superinit = function () {
_root.autoload = "0";
_root.autoplay = "0";
_root.width = 640;
_root.height = 480;
_root.flv = "http://www.rayverak.com/media/mature/serpentis/RAY_slinky_vore_final.mp4";
_root.showvolume = "1";
_root.showloading = "always";
_root.loop = "1";
_root.oncebuffer = false;
};
(_global.TemplateMaxi /* register */).main = function () {
TemplateMaxi.superinit();
_root.player = new TemplateMaxi();
TemplateMaxi.superinit();
var _local2 = new PlayerDefault(_root.player);
};
_local1._initKey = function () {
super._initKey();
var _local3 = this.delegate(this, function () {
if (this.controller.isPlaying) {
this.pauseRelease();
} else {
this.playRelease();
}
});
var _local4 = this.delegate(this, function () {
var _local2 = Selection.getFocus();
if ((!_local2) || (_local2.indexOf("volume_btn") > 0)) {
var _local3 = this._volume;
_local3 = _local3 + 10;
if (_local3 > this._volumeMax) {
_local3 = this._volumeMax;
}
this._volume = _local3;
this.controller.setVolume(_local3);
this._updateVolume();
}
});
var _local5 = this.delegate(this, function () {
var _local2 = Selection.getFocus();
if ((!_local2) || (_local2.indexOf("volume_btn") > 0)) {
var _local3 = this._volume;
_local3 = _local3 - 10;
if (_local3 < 0) {
_local3 = 0;
}
this._volume = _local3;
this.controller.setVolume(_local3);
this._updateVolume();
}
});
if (this._shortcut) {
this._addShortcut(32, _local3);
this._addShortcut(80, _local3);
this._addShortcut(83, this.delegate(this, function () {
this.stopRelease();
}));
this._addShortcut(Key.LEFT, this.delegate(this, function () {
var _local2 = Selection.getFocus();
if ((!_local2) || (_local2.indexOf("slider_mc.bar_mc") > 0)) {
this.controller.setPosition(this.controller.getPosition() - 5);
}
if (_local2.indexOf("volume_btn") > 0) {
var _local3 = this._volume;
_local3 = _local3 - 10;
if (_local3 < 0) {
_local3 = 0;
}
this._volume = _local3;
this.controller.setVolume(_local3);
this._updateVolume();
}
}));
this._addShortcut(Key.RIGHT, this.delegate(this, function () {
var _local2 = Selection.getFocus();
if ((!_local2) || (_local2.indexOf("slider_mc.bar_mc") > 0)) {
this.controller.setPosition(this.controller.getPosition() + 5);
}
if (_local2.indexOf("volume_btn") > 0) {
var _local3 = this._volume;
_local3 = _local3 + 10;
if (_local3 > this._volumeMax) {
_local3 = this._volumeMax;
}
this._volume = _local3;
this.controller.setVolume(_local3);
this._updateVolume();
}
}));
this._addShortcut(Key.DOWN, _local5);
this._addShortcut(109, _local5);
this._addShortcut(189, _local5);
this._addShortcut(Key.UP, _local4);
this._addShortcut(107, _local4);
this._addShortcut(187, _local4);
this._addShortcut(67, this.delegate(this, function () {
this.showSubtitlesRelease();
}));
this._addShortcut(70, this.delegate(this, function () {
this.fullscreenRelease();
}));
}
};
_local1._initBuffering = function () {
if (!this.video.buffering_mc) {
this._buffering = this.video.createEmptyMovieClip("buffering_mc", this.video.getNextHighestDepth());
this._buffering.createTextField("message_txt", this._buffering.getNextHighestDepth(), 0, 0, 0, 0);
this._buffering.message_txt.selectable = false;
this._buffering.message_txt.textColor = this._bufferColor;
this._buffering.message_txt.background = this._bufferShowBackground;
this._buffering.message_txt.backgroundColor = this._bufferBackgroundColor;
this._buffering.message_txt.text = "Initializing ...";
this._buffering.message_txt.autoSize = "left";
}
this._buffering._visible = true;
};
_local1._initBackground = function () {
if (this._backgroundSkin != undefined) {
this._background.loadMovie(this._backgroundSkin);
} else {
var _local2 = this._swfWidth;
var _local3 = this._swfHeight;
this._background.clear();
if (this._backgroundColor != undefined) {
this._background.beginFill(this._backgroundColor);
this._background.lineTo(0, _local3);
this._background.lineTo(_local2, _local3);
this._background.lineTo(_local2, 0);
this._background.endFill();
}
this._background.beginGradientFill("linear", [this._backgroundColor1, this._backgroundColor2], [100, 100], [0, 255], {matrixType:"box", x:0, y:0, w:_local2, h:_local3, r:Math.PI / 2});
this._background.moveTo(0, 5);
this._background.lineTo(0, _local3 - 5);
this._background.curveTo(0, _local3, 5, _local3);
this._background.lineTo(_local2 - 5, _local3);
this._background.curveTo(_local2, _local3, _local2, _local3 - 5);
this._background.lineTo(_local2, 5);
this._background.curveTo(_local2, 0, _local2 - 5, 0);
this._background.lineTo(5, 0);
this._background.curveTo(0, 0, 0, 5);
this._background.endFill();
}
};
_local1._initVideo = function () {
this.video.clear();
this.video.beginFill(this._videoBackgroundColor);
this.video.lineTo(0, this._swfHeight - (this._videoMargin * 2));
this.video.lineTo(this._swfWidth - (this._videoMargin * 2), this._swfHeight - (this._videoMargin * 2));
this.video.lineTo(this._swfWidth - (this._videoMargin * 2), 0);
this.video.endFill();
this.video.video._width = this._swfWidth - (this._videoMargin * 2);
this.video.video._height = this._swfHeight - (this._videoMargin * 2);
this.video.video._x = 0;
this.video.video._y = 0;
if (!this.video.button_mc) {
var _local2 = this.video.createEmptyMovieClip("button_mc", this.video.getNextHighestDepth());
} else {
var _local2 = this.video.button_mc;
}
_local2.clear();
_local2.beginFill(0, 0);
_local2.lineTo(0, this._swfHeight - (this._videoMargin * 2));
_local2.lineTo(this._swfWidth - (this._videoMargin * 2), this._swfHeight - (this._videoMargin * 2));
_local2.lineTo(this._swfWidth - (this._videoMargin * 2), 0);
_local2.endFill();
_local2.tabEnabled = false;
_local2.useHandCursor = false;
_local2.onRelease = this.delegate(this, function () {
if (this._onClickInterval != -1) {
_global.clearInterval(this._onClickInterval);
this._onClickInterval = -1;
this._videoOnDoubleClick();
} else {
_global.clearInterval(this._onClickInterval);
this._onClickInterval = _global.setInterval(this, "_videoOnClick", 180);
}
});
if (!this.video._parent.mask_mc) {
var _local3 = this.video._parent.createEmptyMovieClip("mask_mc", this.video._parent.getNextHighestDepth());
} else {
var _local3 = this.video._parent.mask_mc;
}
_local3._x = this._videoMargin;
_local3._y = this._videoMargin;
_local3.clear();
_local3.beginFill(0, 0);
_local3.lineTo(0, this._swfHeight - (this._videoMargin * 2));
_local3.lineTo(this._swfWidth - (this._videoMargin * 2), this._swfHeight - (this._videoMargin * 2));
_local3.lineTo(this._swfWidth - (this._videoMargin * 2), 0);
_local3.endFill();
this.video.setMask(_local3);
this.video._xscale = 100;
this.video._yscale = 100;
this.video._x = this._videoMargin;
this.video._y = this._videoMargin;
this._initBuffering();
};
_local1._videoOnClick = function () {
_global.clearInterval(this._onClickInterval);
this._onClickInterval = -1;
switch (this._onClick) {
case "playpause" :
if (this.controller.isPlaying) {
this.pauseRelease();
} else {
this.playRelease();
}
break;
case "none" :
break;
default :
getURL (this._onClick, this._onClickTarget);
}
};
_local1._videoOnDoubleClick = function () {
switch (this._onDoubleClick) {
case "fullscreen" :
this.fullscreenRelease();
break;
case "playpause" :
if (this.controller.isPlaying) {
this.pauseRelease();
} else {
this.playRelease();
}
break;
case "none" :
break;
default :
getURL (this._onDoubleClick, this._onDoubleClickTarget);
}
};
_local1._initFont = function () {
var _local2 = TextField.getFontList();
var _local3 = ("|" + _local2.join("|")) + "|";
var _local4 = "_sans";
if (_local3.indexOf("|Verdana|") != -1) {
_local4 = "Verdana";
}
this._subtitleFormat = new TextFormat();
this._subtitleFormat.size = this._subtitleSize;
this._subtitleFormat.bold = true;
this._subtitleFormat.align = "center";
this._subtitleFormat.font = _local4;
this._titleFormat = new TextFormat();
this._titleFormat.size = this._titleSize;
this._titleFormat.bold = true;
this._titleFormat.align = "center";
this._titleFormat.font = _local4;
this._timeFormat = new TextFormat();
this._timeFormat.size = 11;
this._timeFormat.align = "left";
this._timeFormat.font = _local4;
};
_local1._initSubtitles = function () {
if (this._subtitles) {
var _local2 = this._subtitles.getDepth();
this._subtitles.removeMovieClip();
} else {
var _local2 = this.video.getNextHighestDepth();
}
this._subtitles = this.video.createEmptyMovieClip("subtitles_mc", _local2);
this._subtitles.createTextField("message_txt", this._subtitles.getNextHighestDepth(), 0, 0, this._swfWidth - (this._videoMargin * 2), 0);
this._subtitles.message_txt.selectable = false;
this._subtitles.message_txt.multiline = true;
this._subtitles.message_txt.wordWrap = true;
this._subtitles.message_txt.textColor = this._subtitleColor;
if (this._subtitleBackgroundColor != undefined) {
this._subtitles.message_txt.background = true;
this._subtitles.message_txt.backgroundColor = this._subtitleBackgroundColor;
}
this._subtitles.message_txt.text = "";
this._subtitles.message_txt.autoSize = "center";
this._subtitles.message_txt.setNewTextFormat(this._subtitleFormat);
};
_local1._initTitle = function () {
this._title = this._title.split("\\n").join(newline);
this._title = this._title.split("/n").join(newline);
if (this.video.freeze_mc) {
this.video.freeze_mc._width = this._swfWidth - (this._videoMargin * 2);
this.video.freeze_mc._height = this._swfHeight - (this._videoMargin * 2);
} else {
var _local2 = this.video.createEmptyMovieClip("freeze_mc", this.video.getNextHighestDepth());
_local2.beginFill(0, 75);
_local2.lineTo(0, this._swfHeight - (this._videoMargin * 2));
_local2.lineTo(this._swfWidth - (this._videoMargin * 2), this._swfHeight - (this._videoMargin * 2));
_local2.lineTo(this._swfWidth - (this._videoMargin * 2), 0);
_local2.endFill();
}
var _local4 = true;
if (this.video.image_mc) {
var _local3 = this.video.image_mc.getDepth();
_local4 = this.video.image_mc._visible;
this.video.image_mc.removeMovieClip();
} else {
var _local3 = this.video.getNextHighestDepth();
}
this.video.createEmptyMovieClip("image_mc", _local3);
this._initStartImage();
this.video.image_mc._visible = _local4;
this.video.title_txt.removeMovieClip();
if (this._showTitleAndStartimage || (this._startImage == undefined)) {
this.video.createEmptyMovieClip("title_txt", this.video.getNextHighestDepth());
this.video.title_txt.createTextField("field", this.video.getNextHighestDepth(), 0, 0, this._swfWidth - (this._videoMargin * 2), 0);
this.video.title_txt.field.multiline = true;
this.video.title_txt.field.wordWrap = true;
this.video.title_txt.field.selectable = false;
this.video.title_txt.field.textColor = this._titleColor;
this.video.title_txt.field.text = this._title;
this.video.title_txt.field.autoSize = "center";
this.video.title_txt.field.setTextFormat(this._titleFormat);
this.video.title_txt.field._width = this._swfWidth;
this.video.title_txt._x = -this._videoMargin;
this.video.title_txt._y = ((this._swfHeight - (this._videoMargin * 2)) / 2) - (this.video.title_txt._height / 2);
}
if (this._showIconPlay) {
this.video.iconplay_mc.removeMovieClip();
if (!this.video.iconplay_mc) {
var _local5 = this.video.createEmptyMovieClip("iconplay_mc", this.video.getNextHighestDepth());
var _local6 = 50;
var _local7 = 50;
var _local8 = 10;
var _local9 = 14;
_local5.moveTo(_local8, 0);
_local5.beginFill(this._iconPlayBackgroundColor, this._iconPlayBackgroundAlpha);
_local5.lineTo(_local6 - _local8, 0);
_local5.curveTo(_local6, 0, _local6, _local8);
_local5.lineTo(_local6, _local7 - _local8);
_local5.curveTo(_local6, _local7, _local6 - _local8, _local7);
_local5.lineTo(_local8, _local7);
_local5.curveTo(0, _local7, 0, _local7 - _local8);
_local5.lineTo(0, _local8);
_local5.curveTo(0, 0, _local8, 0);
_local5.endFill();
_local5.moveTo(_local9, _local9);
_local5.beginFill(this._iconPlayColor);
_local5.lineTo(_local9, _local7 - _local9);
_local5.lineTo(_local6 - _local9, _local7 / 2);
_local5.endFill();
}
this.video.iconplay_mc._x = ((this._swfWidth - (this._videoMargin * 2)) - this.video.iconplay_mc._width) / 2;
this.video.iconplay_mc._y = ((this._swfHeight - (this._videoMargin * 2)) - this.video.iconplay_mc._height) / 2;
}
};
_local1._initStartImage = function () {
if (this._startImage != undefined) {
this.video.image_mc.loadMovie(this._startImage);
this.video.image_mc._xscale = 100;
this.video.image_mc._yscale = 100;
this.video.onEnterFrame = this.delegate(this, function () {
if (this.video.image_mc._width > 0) {
var _local2 = this.video.image_mc._width;
var _local3 = this.video.image_mc._height;
this.video.image_mc._width = this._swfWidth - (this._videoMargin * 2);
this.video.image_mc._height = this._swfHeight - (this._videoMargin * 2);
if (this._showPlayer == "always") {
this.video.image_mc._height = this.video.image_mc._height - this.PLAYER_HEIGHT;
}
if (this.video.image_mc._yscale > this.video.image_mc._xscale) {
this.video.image_mc._yscale = this.video.image_mc._xscale;
} else {
this.video.image_mc._xscale = this.video.image_mc._yscale;
}
this.video.image_mc._x = Math.floor(((this._swfWidth - (this._videoMargin * 2)) - this.video.image_mc._width) / 2);
if (this._showPlayer == "always") {
this.video.image_mc._y = Math.floor((((this._swfHeight - (this._videoMargin * 2)) - this.video.image_mc._height) - this.PLAYER_HEIGHT) / 2);
} else {
this.video.image_mc._y = Math.floor(((this._swfHeight - (this._videoMargin * 2)) - this.video.image_mc._height) / 2);
}
this.video.image_mc._visible = this._stopped;
delete this.video.onEnterFrame;
}
});
}
};
_local1._initPlayer = function () {
if (this._player) {
this._player.removeMovieClip();
}
super._initPlayer();
if (this._showMouse == "never") {
Mouse.hide();
}
if (!(this._showPlayer === "never")) {
this._player._y = (this._swfHeight - this.PLAYER_HEIGHT) - this._videoMargin;
this._player._x = this._videoMargin;
this._initPlayerBackground();
this._initPlayerPlay();
this._initPlayerPause();
this._initPlayerStop();
this._initPlayerVolume();
this._initPlayerSwitchSubtitles();
var _local3 = function () {
if (this._showMouse != "never") {
Mouse.show();
}
this._player._visible = true;
if ((!this._stopped) && (this._showPlayer != "always")) {
_global.clearInterval(this._playerItv);
this._playerItv = _global.setInterval(this, "_playerInterval", this._playerTimeout);
}
};
this._mouse = new Object();
this._mouse.onMouseMove = this.delegate(this, _local3);
var _local4 = new Object();
_local4.onKeyDown = this.delegate(this, _local3);
Key.addListener(_local4);
} else {
this._player._visible = false;
}
};
_local1._playerInterval = function () {
if (this._showMouse == "autohide") {
Mouse.hide();
}
this._player._visible = false;
_global.clearInterval(this._playerItv);
};
_local1._initPlayerBackground = function () {
if (!this._playerBackground) {
this._playerBackground = this._player.createEmptyMovieClip("background_mc", this._player.getNextHighestDepth());
}
this._playerBackground.clear();
this._playerBackground.beginFill(this._playerColor, this._playerAlpha);
this._playerBackground.lineTo(0, this.PLAYER_HEIGHT);
this._playerBackground.lineTo(this.video.video._width, this.PLAYER_HEIGHT);
this._playerBackground.lineTo(this.video.video._width, 0);
this._playerBackground.endFill();
};
_local1._createSeparators = function (pList) {
this._playerSeparators = this._player.createEmptyMovieClip("separators_mc", this._player.getNextHighestDepth());
var _local3 = 0;
var _local4 = 0;
for ( ; _local4 <= pList.length ; _local4++) {
_local3 = _local3 + pList[_local4];
this._playerSeparators.beginFill(13421772, 50);
this._playerSeparators.moveTo(_local3, 2);
this._playerSeparators.lineTo(_local3, this.PLAYER_HEIGHT - 2);
this._playerSeparators.lineTo(_local3 + 1, this.PLAYER_HEIGHT - 2);
this._playerSeparators.lineTo(_local3 + 1, 2);
this._playerSeparators.endFill();
this._playerSeparators.beginFill(6710886, 50);
this._playerSeparators.lineTo(_local3 - 1, 2);
this._playerSeparators.lineTo(_local3 - 1, this.PLAYER_HEIGHT - 2);
this._playerSeparators.lineTo(_local3, this.PLAYER_HEIGHT - 2);
this._playerSeparators.endFill();
}
};
_local1._initButton = function (pTarget, pWidth) {
if (pWidth == undefined) {
pWidth = this.BUTTON_WIDTH;
}
var _local4 = pTarget.createEmptyMovieClip("area_mc", pTarget.getNextHighestDepth());
var _local5 = pTarget.createEmptyMovieClip("icon_mc", pTarget.getNextHighestDepth());
_local4.beginFill(0, 0);
_local4.lineTo(0, this.PLAYER_HEIGHT);
_local4.lineTo(pWidth, this.PLAYER_HEIGHT);
_local4.lineTo(pWidth, 0);
_local4.endFill();
_local4.parent = this;
_local4.color = new Color(_local5);
_local4.onRollOver = function () {
this.color.setRGB(this.parent._buttonOverColor);
};
_local4.onRollOut = (_local4.onDragOut = (_local4.onPress = function () {
this.color.setRGB(this.parent._buttonColor);
}));
};
_local1._enableButton = function (pButton, pStatus, pMask) {
pButton.area_mc.enabled = pStatus;
pButton.area_mc.tabEnabled = pStatus;
pButton._visible = !pMask;
if (!pStatus) {
pButton.icon_mc._alpha = 30;
} else {
pButton.icon_mc._alpha = 100;
}
};
_local1._initPlayerPlay = function () {
this._playerPlay = this._player.createEmptyMovieClip("play_btn", this._player.getNextHighestDepth());
this._initButton(this._playerPlay);
this._playerPlay.area_mc.onRelease = this.delegate(this, this.playRelease);
this._playerPlay.icon_mc.beginFill(this._buttonColor);
this._playerPlay.icon_mc.lineTo(0, 8);
this._playerPlay.icon_mc.lineTo(6, 4);
this._playerPlay.icon_mc.endFill();
this._playerPlay.icon_mc._y = (this.PLAYER_HEIGHT / 2) - (this._playerPlay.icon_mc._height / 2);
this._playerPlay.icon_mc._x = (this.BUTTON_WIDTH / 2) - (this._playerPlay.icon_mc._width / 2);
};
_local1._initPlayerPause = function () {
this._playerPause = this._player.createEmptyMovieClip("pause_btn", this._player.getNextHighestDepth());
this._initButton(this._playerPause);
this._playerPause.area_mc.onRelease = this.delegate(this, this.pauseRelease);
this._playerPause.icon_mc.beginFill(this._buttonColor);
this._playerPause.icon_mc.lineTo(0, 8);
this._playerPause.icon_mc.lineTo(3, 8);
this._playerPause.icon_mc.lineTo(3, 0);
this._playerPause.icon_mc.endFill();
this._playerPause.icon_mc.beginFill(this._buttonColor);
this._playerPause.icon_mc.moveTo(5, 0);
this._playerPause.icon_mc.lineTo(5, 8);
this._playerPause.icon_mc.lineTo(8, 8);
this._playerPause.icon_mc.lineTo(8, 0);
this._playerPause.icon_mc.endFill();
this._playerPause.icon_mc._y = (this.PLAYER_HEIGHT / 2) - (this._playerPause.icon_mc._height / 2);
this._playerPause.icon_mc._x = (this.BUTTON_WIDTH / 2) - (this._playerPause.icon_mc._width / 2);
};
_local1._initPlayerStop = function () {
if (this._showStop) {
this._playerStop = this._player.createEmptyMovieClip("stop_btn", this._player.getNextHighestDepth());
this._initButton(this._playerStop);
this._playerStop._x = this.BUTTON_WIDTH;
this._playerStop.area_mc.onRelease = this.delegate(this, this.stopRelease);
this._playerStop.icon_mc.beginFill(this._buttonColor);
this._playerStop.icon_mc.lineTo(0, 8);
this._playerStop.icon_mc.lineTo(8, 8);
this._playerStop.icon_mc.lineTo(8, 0);
this._playerStop.icon_mc.endFill();
this._playerStop.icon_mc._y = (this.PLAYER_HEIGHT / 2) - (this._playerStop.icon_mc._height / 2);
this._playerStop.icon_mc._x = (this.BUTTON_WIDTH / 2) - (this._playerStop.icon_mc._width / 2);
}
};
_local1._initPlayerVolume = function () {
if (this._showVolume) {
this._playerVolume = this._player.createEmptyMovieClip("volume_btn", this._player.getNextHighestDepth());
this._initButton(this._playerVolume, this.VOLUME_WIDTH);
this._playerVolume._x = this.BUTTON_WIDTH;
if (this._showStop) {
this._playerVolume._x = this._playerVolume._x + this.BUTTON_WIDTH;
}
this._playerVolume.area_mc.onPress = this.delegate(this, this._volumePress);
this._playerVolume.area_mc.onRelease = this.delegate(this, this._volumeRelease);
this._playerVolume.area_mc.onReleaseOutside = this.delegate(this, this._volumeRelease);
var _local2 = this._playerVolume.icon_mc.createEmptyMovieClip("background_mc", 1);
_local2.beginFill(this._buttonColor, 25);
_local2.moveTo(0, this.VOLUME_HEIGHT);
_local2.lineTo(this.VOLUME_WIDTH - 8, this.VOLUME_HEIGHT);
_local2.lineTo(this.VOLUME_WIDTH - 8, 0);
_local2.endFill();
_local2._y = (this.PLAYER_HEIGHT / 2) - (_local2._height / 2);
_local2._x = (this.VOLUME_WIDTH / 2) - (_local2._width / 2);
this._updateVolume();
}
};
_local1._updateVolume = function () {
if (this._playerVolume.icon_mc.current_mc == undefined) {
var _local2 = this._playerVolume.icon_mc.createEmptyMovieClip("current_mc", 2);
} else {
var _local2 = this._playerVolume.icon_mc.current_mc;
}
_local2.clear();
if (this._volume > this._volumeMax) {
this._volume = this._volumeMax;
}
var _local3 = ((this.VOLUME_WIDTH - 8) * this._volume) / this._volumeMax;
var _local4 = this._volume / this._volumeMax;
_local2.beginFill(this._buttonColor);
_local2.moveTo(0, this.VOLUME_HEIGHT);
_local2.lineTo(_local3, this.VOLUME_HEIGHT);
_local2.lineTo(_local3, this.VOLUME_HEIGHT - (this.VOLUME_HEIGHT * _local4));
_local2.endFill();
_local2._y = _local2._parent.background_mc._y;
_local2._x = _local2._parent.background_mc._x;
};
_local1._volumeEnterFrame = function () {
var _local2 = this._playerVolume.icon_mc.current_mc._xmouse;
var _local3 = this._playerVolume.icon_mc.background_mc._width;
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > _local3) {
_local2 = _local3;
}
var _local4 = (_local2 * this._volumeMax) / _local3;
this.controller.setVolume(_local4);
this._volume = _local4;
this._updateVolume();
};
_local1._volumePress = function () {
this._playerVolume.onEnterFrame = this.delegate(this, this._volumeEnterFrame);
};
_local1._volumeRelease = function () {
delete this._playerVolume.onEnterFrame;
};
_local1._initPlayerSwitchSubtitles = function () {
if (this._showSwitchSubtitles) {
this._playerShowSubtitles = this._player.createEmptyMovieClip("showSubtitles_btn", this._player.getNextHighestDepth());
this._initButton(this._playerShowSubtitles);
this._playerShowSubtitles._x = this.BUTTON_WIDTH;
if (this._showStop) {
this._playerShowSubtitles._x = this._playerShowSubtitles._x + this.BUTTON_WIDTH;
}
if (this._showVolume) {
this._playerShowSubtitles._x = this._playerShowSubtitles._x + this.VOLUME_WIDTH;
}
this._playerShowSubtitles.area_mc.onRelease = this.delegate(this, this.showSubtitlesRelease);
this._playerShowSubtitles.icon_mc.lineStyle(1, this._buttonColor, 100);
this._playerShowSubtitles.icon_mc.lineTo(0, 10);
this._playerShowSubtitles.icon_mc.lineTo(14, 10);
this._playerShowSubtitles.icon_mc.lineTo(14, 0);
this._playerShowSubtitles.icon_mc.lineTo(0, 0);
this._playerShowSubtitles.icon_mc.moveTo(7, 3);
this._playerShowSubtitles.icon_mc.lineTo(6, 2);
this._playerShowSubtitles.icon_mc.curveTo(0, 5, 6, 8);
this._playerShowSubtitles.icon_mc.lineTo(7, 7);
this._playerShowSubtitles.icon_mc.moveTo(12, 3);
this._playerShowSubtitles.icon_mc.lineTo(11, 2);
this._playerShowSubtitles.icon_mc.curveTo(5, 5, 11, 8);
this._playerShowSubtitles.icon_mc.lineTo(12, 7);
this._playerShowSubtitles.icon_mc._y = ((this.PLAYER_HEIGHT / 2) - (this._playerShowSubtitles.icon_mc._height / 2)) + 1;
this._playerShowSubtitles.icon_mc._x = ((this.BUTTON_WIDTH / 2) - (this._playerShowSubtitles.icon_mc._width / 2)) + 1;
}
};
_local1._initPlayerFullscreen = function () {
if (this._showFullscreen) {
this._playerFullscreen = this._player.createEmptyMovieClip("fullscren_btn", this._player.getNextHighestDepth());
this._initButton(this._playerFullscreen);
this._playerFullscreen._x = this.BUTTON_WIDTH;
if (this._showStop) {
this._playerFullscreen._x = this._playerFullscreen._x + this.BUTTON_WIDTH;
}
if (this._showVolume) {
this._playerFullscreen._x = this._playerFullscreen._x + this.VOLUME_WIDTH;
}
if (this._showSwitchSubtitles) {
this._playerFullscreen._x = this._playerFullscreen._x + this.BUTTON_WIDTH;
}
this._playerFullscreen.area_mc.onRelease = this.delegate(this, this.fullscreenRelease);
this._playerFullscreen.icon_mc.lineStyle(1, this._buttonColor, 100);
this._playerFullscreen.icon_mc.lineTo(0, 12);
this._playerFullscreen.icon_mc.lineTo(12, 12);
this._playerFullscreen.icon_mc.lineTo(12, 0);
this._playerFullscreen.icon_mc.lineTo(0, 0);
this._playerFullscreen.icon_mc.lineStyle(2, this._buttonColor, 100);
this._playerFullscreen.icon_mc.moveTo(6, 4);
this._playerFullscreen.icon_mc.lineTo(9, 4);
this._playerFullscreen.icon_mc.lineTo(9, 7);
this._playerFullscreen.icon_mc.moveTo(9, 4);
this._playerFullscreen.icon_mc.lineTo(4, 9);
this._playerFullscreen.icon_mc._y = ((this.PLAYER_HEIGHT / 2) - (this._playerFullscreen.icon_mc._height / 2)) + 1;
this._playerFullscreen.icon_mc._x = ((this.BUTTON_WIDTH / 2) - (this._playerFullscreen.icon_mc._width / 2)) + 1;
}
};
_local1._initPlayerTime = function () {
if (this._showTime > 0) {
this._playerTime = this._player.createEmptyMovieClip("time_btn", this._player.getNextHighestDepth());
this._playerTime._x = this.BUTTON_WIDTH;
if (this._showStop) {
this._playerTime._x = this._playerTime._x + this.BUTTON_WIDTH;
}
if (this._showVolume) {
this._playerTime._x = this._playerTime._x + this.VOLUME_WIDTH;
}
if (this._showSwitchSubtitles) {
this._playerTime._x = this._playerTime._x + this.BUTTON_WIDTH;
}
if (this._showFullscreen) {
this._playerTime._x = this._playerTime._x + this.BUTTON_WIDTH;
}
this._playerTime.createTextField("time_txt", this._playerTime.getNextHighestDepth(), 0, 0, 0, 0);
this._playerTime.time_txt.selectable = false;
this._playerTime.time_txt.textColor = this._buttonColor;
this._playerTime.time_txt.setNewTextFormat(this._timeFormat);
this._playerTime.time_txt.text = "00:00:00";
this._playerTime.time_txt.autoSize = "left";
this._playerTime.time_txt._y = (this.PLAYER_HEIGHT / 2) - (this._playerTime.time_txt._height / 2);
this._playerTime.time_txt._x = 6;
this._playerTime.type = ((this._showTime == 2) ? "duration" : "position");
this._playerTime.onEnterFrame = this.delegate(this, function () {
if (this._playerTime.type == "position") {
var _local2 = this.controller.getPosition();
} else {
var _local2 = this.controller.getDuration() - this.controller.getPosition();
}
if (_global.isNaN(_local2)) {
var _local2 = 0;
}
var _local3 = Math.floor(_local2) % 60;
var _local4 = Math.floor(_local2 / 60) % 60;
var _local5 = Math.floor(_local2 / (60 * 60)) % 24;
this._playerTime.time_txt.text = (((((_local5 < 10) ? ("0" + _local5) : (_local5)) + ":") + ((_local4 < 10) ? ("0" + _local4) : (_local4))) + ":") + ((_local3 < 10) ? ("0" + _local3) : (_local3));
});
var _local2 = this._playerTime.createEmptyMovieClip("area_mc", this._playerTime.getNextHighestDepth());
_local2.beginFill(0, 0);
_local2.moveTo(2, 2);
_local2.lineTo(2, this.PLAYER_HEIGHT - 4);
_local2.lineTo((this._playerTime.time_txt._width + 10) - 4, this.PLAYER_HEIGHT - 4);
_local2.lineTo((this._playerTime.time_txt._width + 10) - 4, 2);
_local2.endFill();
_local2.onRelease = this.delegate(this, function () {
if (this._playerTime.type == "position") {
this._playerTime.type = "duration";
} else {
this._playerTime.type = "position";
}
});
}
};
_local1._initPlayerSlider = function (pMargin) {
if (this._playerSlider) {
var _local3 = this._playerSlider.getDepth();
this._playerSlider.removeMovieClip();
} else {
var _local3 = this._player.getNextHighestDepth();
}
this._playerSlider = this._player.createEmptyMovieClip("slider_mc", _local3);
var _local4 = pMargin;
_local4 = _local4 + 10;
this._playerSlider._x = _local4;
this._playerSlider.width = ((this._swfWidth - _local4) - 10) - (this._videoMargin * 2);
var _local5 = this._playerSlider.createEmptyMovieClip("barButton_mc", this._playerSlider.getNextHighestDepth());
_local5.beginFill(16711680, 0);
_local5.moveTo(-10, 0);
_local5.lineTo(this._playerSlider.width + 20, 0);
_local5.lineTo(this._playerSlider.width + 20, this.PLAYER_HEIGHT);
_local5.lineTo(-10, this.PLAYER_HEIGHT);
_local5.endFill();
_local5.tabEnabled = false;
_local5.onRelease = this.delegate(this, function () {
var _local2 = this._playerSlider._xmouse;
if (_local2 < 0) {
_local2 = 0;
}
if (_local2 > (this._playerSlider.width - this._playerSlider.bar_mc._width)) {
_local2 = this._playerSlider.width - this._playerSlider.bar_mc._width;
}
this._playerSlider.bar_mc._x = _local2;
var _local3 = (this._playerSlider.bar_mc._x / (this._playerSlider.width - this.SLIDER_WIDTH)) * this.controller.getDuration();
this.controller.setPosition(_local3);
});
var _local6 = this._playerSlider.createEmptyMovieClip("barBg_mc", this._playerSlider.getNextHighestDepth());
_local6.beginFill(13421772, 25);
_local6.lineTo(this._playerSlider.width, 0);
_local6.lineTo(this._playerSlider.width, 1);
_local6.lineTo(0, 1);
_local6.endFill();
_local6.beginFill(6710886, 25);
_local6.moveTo(0, 0);
_local6.lineTo(0, -1);
_local6.lineTo(this._playerSlider.width, -1);
_local6.lineTo(this._playerSlider.width, 0);
_local6.endFill();
_local6._y = this.PLAYER_HEIGHT / 2;
this._loadingBar = this._playerSlider.createEmptyMovieClip("loading_mc", this._playerSlider.getNextHighestDepth());
this._loadingBar.beginFill(this._loadingColor, 75);
this._loadingBar.lineTo(this._playerSlider.width, 0);
this._loadingBar.lineTo(this._playerSlider.width, 2);
this._loadingBar.lineTo(0, 2);
this._loadingBar.endFill();
this._loadingBar._y = this.PLAYER_HEIGHT / 2;
this._loadingBar._xscale = 0;
this._loadingBar._visible = false;
var _local7 = this._playerSlider.createEmptyMovieClip("bar_mc", this._playerSlider.getNextHighestDepth());
_local7.parent = this;
_local7.margin = _local4;
_local7.width = this.SLIDER_WIDTH;
_local7.barWidth = this._playerSlider.width;
_local7.color = new Color(_local7);
_local7.onRollOver = function () {
this.color.setRGB(this.parent._sliderOverColor);
};
_local7.onRollOut = function () {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
this.color.setTransform(_local2);
};
_local7.onPress = this.delegate(this, function () {
this._playerSlider.bar_mc.startDrag(false, 0, this._playerSlider.bar_mc._y, this._playerSlider.width - this._playerSlider.bar_mc._width, this._playerSlider.bar_mc._y);
this._playerSlider.bar_mc.onEnterFrame = this.delegate(this, this._sliderMoving);
});
_local7.onRelease = (_local7.onReleaseOutside = this.delegate(this, function () {
this._playerSlider.bar_mc.stopDrag();
this._playerSlider.bar_mc.onEnterFrame = this.delegate(this, this._sliderEnterFrame);
}));
_local7.beginGradientFill("linear", [this._sliderColor1, this._sliderColor2], [100, 100], [50, 150], {matrixType:"box", x:0, y:0, w:this.SLIDER_WIDTH, h:this.SLIDER_HEIGHT, r:Math.PI / 2});
_local7.moveTo(0, 4);
_local7.lineTo(0, this.SLIDER_HEIGHT - 4);
_local7.curveTo(0, this.SLIDER_HEIGHT, 4, this.SLIDER_HEIGHT);
_local7.lineTo(this.SLIDER_WIDTH - 4, this.SLIDER_HEIGHT);
_local7.curveTo(this.SLIDER_WIDTH, this.SLIDER_HEIGHT, this.SLIDER_WIDTH, this.SLIDER_HEIGHT - 4);
_local7.lineTo(this.SLIDER_WIDTH, 4);
_local7.curveTo(this.SLIDER_WIDTH, 0, this.SLIDER_WIDTH - 4, 0);
_local7.lineTo(4, 0);
_local7.curveTo(0, 0, 0, 4);
_local7.endFill();
_local7._y = (this.PLAYER_HEIGHT / 2) - (this.SLIDER_HEIGHT / 2);
_local7.onEnterFrame = this.delegate(this, this._sliderEnterFrame);
};
_local1._sliderEnterFrame = function () {
if (this._loadingBar._visible) {
var _local2 = this._loadingBar._width - this.SLIDER_WIDTH;
} else {
var _local2 = this._playerSlider.width - this.SLIDER_WIDTH;
}
if (_local2 < 0) {
var _local2 = 0;
} else if (_local2 > this._playerSlider.width) {
var _local2 = this._playerSlider.width;
}
var _local3 = this.controller.getPosition();
var _local4 = Math.round((_local3 / this.controller.getDuration()) * _local2);
if (_global.isNaN(_local4)) {
_local4 = 0;
}
this._playerSlider.bar_mc._x = _local4;
if (this._stopped) {
this._playerSlider.bar_mc._x = 0;
}
var _local5 = Math.min(Math.round((this.controller.getBufferLength() / this.controller.getBufferTime()) * 100), 100);
if (_local5 == 100) {
_root.oncebuffer = true;
}
if ((!_global.isNaN(_local5)) && ((!this.controller.streamStarted) && ((_local5 >= this._lastBuffer) && ((this.controller.getDuration() != undefined) && (_local5 != 100))))) {
var _local6 = this._bufferMessage;
_local6 = _local6.split("_n_").join(String(_local5) + "%");
this._buffering.message_txt.text = _local6;
_root.oncebuffer = true;
this._buffering._visible = true;
} else if (_root.oncebuffer) {
this._buffering._visible = false;
}
this._lastBuffer = _local5;
if (this.controller.isPlaying) {
this.video.title_txt._visible = false;
this.video.image_mc._visible = false;
this.video.iconplay_mc._visible = false;
}
};
_local1._sliderMoving = function () {
var _local2 = (this._playerSlider.bar_mc._x / (this._playerSlider.width - this.SLIDER_WIDTH)) * this.controller.getDuration();
this.controller.setPosition(_local2);
};
_local1._loading = function () {
var _local2 = this.controller.getLoading();
this._loadingBar._xscale = ((_local2.percent >= 1) ? (_local2.percent) : 0);
if (_local2.percent == 100) {
if (this._showLoading != "always") {
this._loadingBar._visible = false;
}
delete this._loadingBar.onEnterFrame;
}
};
_local1._onStageFullscreen = function () {
this._isFullscreen = true;
this._stageNormalParams = new Object();
this._stageNormalParams.player_x = this._player._x;
this._player._x = 0;
this._stageNormalParams.player_y = this._player._y;
this._player._y = Stage.height - this.PLAYER_HEIGHT;
this._stageNormalParams.root_width = _root.width;
_root.width = Stage.width;
this._stageNormalParams.root_height = _root.height;
_root.height = Stage.height;
this._stageNormalParams.swfWidth = this._swfWidth;
this._swfWidth = Stage.width;
this._stageNormalParams.swfHeight = this._swfHeight;
this._swfHeight = Stage.height;
this._stageNormalParams.videoMargin = this._videoMargin;
this._videoMargin = 0;
this._initFlash();
this._initVideo();
this._initTitle();
this._initSubtitles();
this._initPlayerBackground();
this._initPlayerSlider(this._marginSlider);
this.resizeVideo();
};
_local1._onStageNormal = function () {
this._isFullscreen = false;
this._videoMargin = ((_root.margin === undefined) ? 5 : (_global.parseInt(_root.margin, 10)));
this._player._x = this._videoMargin;
this._player._y = (Stage.height - this.PLAYER_HEIGHT) - this._videoMargin;
_root.width = Stage.width;
_root.height = Stage.height;
this._swfWidth = Stage.width;
this._swfHeight = Stage.height;
this._initFlash();
this._initBackground();
this._initTitle();
this._initSubtitles();
this._initVideo();
this._initPlayerBackground();
this._initPlayerSlider(this._marginSlider);
this.resizeVideo();
};
_local1.resizeVideo = function (pWidth, pHeight) {
var _local4 = ((!(pWidth === undefined)) ? (pWidth) : (this.video.video.width));
var _local5 = ((!(pHeight === undefined)) ? (pHeight) : (this.video.video.height));
var _local6 = this._swfWidth - (this._videoMargin * 2);
var _local7 = (_local6 * _local5) / _local4;
var _local8 = this._swfWidth - (this._videoMargin * 2);
var _local9 = this._swfHeight - (this._videoMargin * 2);
if (this._showPlayer === "always") {
_local9 = _local9 - this.PLAYER_HEIGHT;
}
if (_local7 > _local9) {
_local7 = _local9;
_local6 = (_local7 * _local4) / _local5;
}
if (this._forceSize) {
_local6 = _local8;
_local7 = _local9;
}
this.video.video._width = _local6;
this.video.video._height = _local7;
this.video.video._x = (_local8 - _local6) / 2;
this.video.video._y = (_local9 - _local7) / 2;
};
_local1.playRelease = function () {
super.playRelease();
this._stopped = false;
this.video.freeze_mc._visible = false;
this.video.title_txt._visible = false;
this.video.image_mc._visible = false;
this.video.iconplay_mc._visible = false;
this._enableButton(this._playerPlay, false, true);
this._enableButton(this._playerPause, true);
this._enableButton(this._playerStop, true);
if (this._showPlayer === "autohide") {
this._player._visible = false;
Mouse.removeListener(this._mouse);
Mouse.addListener(this._mouse);
}
this.controller.setVolume(this._volume);
};
_local1.pauseRelease = function () {
super.pauseRelease();
this._enableButton(this._playerPause, false, true);
this._enableButton(this._playerPlay, true);
};
_local1.stopRelease = function () {
Mouse.removeListener(this._mouse);
_global.clearInterval(this._playerItv);
super.stopRelease();
this._stopped = true;
this.video.freeze_mc._visible = true;
this.video.title_txt._visible = true;
this.video.image_mc._visible = true;
this.video.iconplay_mc._visible = true;
this._enableButton(this._playerStop, false);
this._enableButton(this._playerPause, false, true);
this._enableButton(this._playerPlay, true);
if (!(this._showPlayer === "never")) {
this._player._visible = true;
}
};
_local1.fullscreenRelease = function () {
Stage.displayState = ((!this._isFullscreen) ? "fullscreen" : "normal");
};
_local1.showSubtitlesRelease = function () {
this._subtitles.hide = (this._subtitles.hide ? false : true);
this._subtitles._visible = this._subtitles.hide;
};
_local1.hideSubtitlesRelease = function () {
};
_local1.startLoading = function () {
super.startLoading();
this._loadingBar.onEnterFrame = this.delegate(this, this._loading);
if (this._showLoading != "never") {
this._loadingBar._visible = true;
}
};
_local1.loadUrl = function (pDepth, pUrl, pVerticalAlign, pHorizontalAlign) {
var _local6 = _root.top;
var _local7 = _local6.createEmptyMovieClip("movie_" + pDepth, pDepth);
var _local8 = _local7.createEmptyMovieClip("mc", 1);
_local7.stageListener = new Object();
_local7.stageListener.verticalAlign = pVerticalAlign;
_local7.stageListener.horizontalAlign = pHorizontalAlign;
_local7.stageListener.mc = _local7;
_local7.stageListener.onResize = function () {
if (this.horizontalAlign == "") {
this.mc._x = (Stage.width - this.mc._width) / 2;
} else if (this.horizontalAlign.charAt(0) == "-") {
this.mc._x = (Stage.width - this.mc._width) + Number(this.horizontalAlign);
} else {
this.mc._x = Number(this.horizontalAlign);
}
if (this.verticalAlign == "") {
this.mc._y = (Stage.height - this.mc._height) / 2;
} else if (this.verticalAlign.charAt(0) == "-") {
this.mc._y = (Stage.height - this.mc._height) + Number(this.verticalAlign);
} else {
this.mc._y = Number(this.verticalAlign);
}
};
Stage.addListener(_local7.stageListener);
_local7.onEnterFrame = this.delegate(_local7, function () {
if (this._width > 0) {
this.stageListener.onResize();
delete this.onEnterFrame;
}
});
_local8.loadMovie(pUrl);
};
_local1.__set__jsPlay = function (n) {
if (!this.controller.isPlaying) {
this.playRelease();
}
return(this.__get__jsPlay());
};
_local1.__set__jsPause = function (n) {
if (this.controller.isPlaying) {
this.pauseRelease();
}
return(this.__get__jsPause());
};
_local1.__set__jsStop = function (n) {
this.stopRelease();
return(this.__get__jsStop());
};
_local1.__set__jsVolume = function (n) {
this.controller.setVolume(Number(n));
this._volume = Number(n);
this._updateVolume();
return(this.__get__jsVolume());
};
_local1.__set__jsUrl = function (n) {
this.controller.setUrl(n);
return(this.__get__jsUrl());
};
_local1.__set__jsStartImage = function (n) {
this._startImage = n;
this._initStartImage();
return(this.__get__jsStartImage());
};
_local1.__set__jsSetPosition = function (n) {
this.controller.setPosition(Number(n));
return(this.__get__jsSetPosition());
};
_local1.__set__jsLoadMovieOnTop = function (pParams) {
var _local3 = pParams.split("|");
var _local4 = ((_local3[2] === undefined) ? "" : (_local3[2]));
var _local5 = ((_local3[3] === undefined) ? "" : (_local3[3]));
this.loadUrl(Number(_local3[1]), _local3[0], _local4, _local5);
return(this.__get__jsLoadMovieOnTop());
};
_local1.addProperty("jsSetPosition", function () {
}, _local1.__set__jsSetPosition);
_local1.addProperty("jsUrl", function () {
}, _local1.__set__jsUrl);
_local1.addProperty("jsStop", function () {
}, _local1.__set__jsStop);
_local1.addProperty("jsPlay", function () {
}, _local1.__set__jsPlay);
_local1.addProperty("jsPause", function () {
}, _local1.__set__jsPause);
_local1.addProperty("jsLoadMovieOnTop", function () {
}, _local1.__set__jsLoadMovieOnTop);
_local1.addProperty("jsStartImage", function () {
}, _local1.__set__jsStartImage);
_local1.addProperty("jsVolume", function () {
}, _local1.__set__jsVolume);
ASSetPropFlags(_local1, null, 1);
}
#endinitclip
Symbol 20484 MovieClip [__Packages.PlayerDefault] Frame 0
#initclip
if (!PlayerDefault) {
//(_global.PlayerDefault = function (pTemplate) {
super(pTemplate);
this._initSubtitles();
}) extends PlayerBasic
var _local1 = (_global.PlayerDefault /* register */).prototype;
_local1._initVars = function () {
super._initVars();
if (_root.srt == "1") {
this._useSrt = true;
}
if (_root.srturl != undefined) {
this._srtUrl = _root.srturl;
}
};
_local1._initSubtitles = function () {
this._subtitles = new Array();
if (this._useSrt) {
var _local2 = new LoadVars();
_local2.parent = this;
_local2.onData = function (data) {
if (data != undefined) {
data = data.split("\r\n").join(newline);
this.parent._subtitles = data.split("\n\n");
var _local3 = 0;
for ( ; _local3 < this.parent._subtitles.length ; _local3++) {
var _local4 = this.parent._subtitles[_local3].split(newline);
var _local5 = Number(_local4.shift());
var _local6 = String(_local4.shift());
var _local7 = _local6.split(" --> ");
var _local8 = _local7[0].split(",")[0].split(":").concat(_local7[0].split(",")[1]);
var _local9 = Number(_local8[0]);
var _local10 = Number(_local8[1]);
var _local11 = Number(_local8[2]);
var _local12 = Number(_local8[3]);
var _local13 = _local7[1].split(",")[0].split(":").concat(_local7[1].split(",")[1]);
var _local14 = Number(_local13[0]);
var _local15 = Number(_local13[1]);
var _local16 = Number(_local13[2]);
var _local17 = Number(_local13[3]);
var _local18 = _local4.join(newline);
this.parent._subtitles[_local3] = {id:_local5, message:_local18, timeStart:(((((_local9 * 60) * 60) * 1000) + ((_local10 * 60) * 1000)) + (_local11 * 1000)) + _local12, timeEnd:(((((_local14 * 60) * 60) * 1000) + ((_local15 * 60) * 1000)) + (_local16 * 1000)) + _local17};
}
}
};
if (this._srtUrl != undefined) {
_local2.load(this._srtUrl, _local2, "GET");
} else {
_local2.load(this._videoUrl.substr(0, this._videoUrl.length - 3) + "srt", _local2, "GET");
}
}
};
_local1.setVolume = function (pVolume) {
this._sound.setVolume(pVolume);
};
_local1.getVolume = function () {
return(this._sound.getVolume());
};
_local1.getSubtitles = function () {
return(this._subtitles);
};
_local1.getSubtitle = function () {
var _local2 = 0;
for ( ; _local2 < this._subtitles.length ; _local2++) {
if (((this._ns.time * 1000) >= this._subtitles[_local2].timeStart) && ((this._ns.time * 1000) <= this._subtitles[_local2].timeEnd)) {
return(this._subtitles[_local2].message);
}
}
return("");
};
_local1.setUrl = function (pUrl) {
this._videoUrl = pUrl;
this._initSubtitles();
this._firstPlay = false;
};
ASSetPropFlags(_local1, null, 1);
_local1._useSrt = false;
}
#endinitclip