Frame 1
function playFLV() {
return((g_flvVariable != undefined) || (g_flvURL != undefined));
}
function initPlayer() {
if (g_initilized == undefined) {
g_flvLoaded = false;
g_isPlaying = false;
g_isEnd = false;
g_soundObj = new Sound();
g_soundVolume = g_soundObj.getVolume();
g_soundMute = false;
if (g_flvVariable != undefined) {
g_flvURL = eval (g_flvVariable);
}
if (!playFLV()) {
g_currentFrame = _currentframe;
g_seekStep = int(_totalframes / 20);
if (g_seekStep < 50) {
g_seekStep = 50;
}
_root.onEnterFrame = function () {
if (!control.vt.isDragging) {
g_isPlaying = g_currentFrame != _currentframe;
g_currentFrame = _currentframe;
}
var _loc1 = g_isEnd;
g_isEnd = _currentframe == _totalframes;
if (g_isEnd) {
if (((g_endURL != undefined) && (!_loc1)) && (g_isEnd)) {
getURL (g_endURL, ((_root.g_endURLTarget == undefined) ? "" : (_root.g_endURLTarget)));
}
}
if (g_isEnd && (!control.vt.isDragging)) {
if (g_isPlaying) {
if (!(g_autoRewind || (g_repeat))) {
g_isPlaying = false;
stop();
} else {
changeCurrentFrame(1);
if (!g_repeat) {
g_isPlaying = false;
stop();
} else {
play();
}
}
}
}
updateControls();
};
if (!g_autoPlay) {
g_autoPlay = true;
stop();
}
} else {
if (g_flvURL != undefined) {
control.vt.time.text = "Streaming...";
g_currentTime = 0;
g_netConnection = new NetConnection();
g_netConnection.connect(null);
g_netStream = new NetStream(g_netConnection);
g_videoObj.attachVideo(g_netStream);
g_netStream.setBufferTime(5);
g_netStream.play(g_flvURL);
g_netStream.onStatus = function (infoObj) {
switch (infoObj.code) {
case "NetStream.Play.Start" :
g_flvLoaded = true;
g_videoObj._width = g_videoWidth;
g_videoObj._height = g_videoHeight;
if (!g_autoPlay) {
g_netStream.pause(true);
g_netStream.seek(0);
g_isPlaying = false;
} else {
g_isPlaying = true;
}
return;
case "NetStream.Buffer.Full" :
return;
case "NetStream.Play.Stop" :
return;
case "NetStream.Seek.InvalidTime" :
g_netStream.seek(infoObj.details);
return;
case "NetStream.Play.StreamNotFound" :
control.vt.time.text = "Stream not found.";
var _loc1 = new TextFormat();
_loc1.color = 16711680 /* 0xFF0000 */;
control.vt.time.setTextFormat(_loc1);
}
};
g_netStream.onMetaData = function (infoObj) {
g_totalTime = Math.floor(infoObj.duration);
g_seekStep = g_totalTime / 20;
if (g_seekStep < 5) {
g_seekStep = 5;
}
};
} else {
control.vt.time.text = ("\"" + g_flvVariable) + "\" not defined.";
var fmt = new TextFormat();
fmt.color = 16711680 /* 0xFF0000 */;
control.vt.time.setTextFormat(fmt);
}
_root.onEnterFrame = function () {
if (g_totalTime != undefined) {
var _loc2 = g_isEnd;
g_isEnd = g_netStream.time >= g_totalTime;
if (((g_endURL != undefined) && (!_loc2)) && (g_isEnd)) {
getURL (g_endURL, ((_root.g_endURLTarget == undefined) ? "" : (_root.g_endURLTarget)));
}
}
if (g_isEnd && (!control.vt.isDragging)) {
if (g_isPlaying) {
if (!(g_autoRewind || (g_repeat))) {
g_isPlaying = false;
g_netStream.pause(true);
} else {
changeCurrentFrame(0);
if (!g_repeat) {
g_isPlaying = false;
g_netStream.pause(true);
} else {
g_netStream.pause(false);
}
}
}
}
updateControls();
};
}
g_initilized = true;
}
}
function changeCurrentFrame(pos) {
if (!playFLV()) {
if (!((g_isPlaying && (!control.vt.isDragging)) && (pos < _totalframes))) {
g_currentFrame = pos;
gotoAndStop(pos +0);
} else {
g_currentFrame = 0;
gotoAndPlay(pos);
}
} else {
g_netStream.seek(pos);
}
}
function updateControls() {
control.b_play.gotoAndStop((g_isPlaying ? 2 : 1));
control.vt.syncIndicatorWithVideo();
}
var g_fps = 30;
var g_autoPlay = true;
var g_autoRewind = true;
var g_repeat = true;
var g_skinColor = 13421772;
var g_skinColorSaturation = 30;
var g_videoWidth = 320;
var g_videoHeight = 240;
var g_initilized;
var g_flvLoaded;
var g_netConnection;
var g_netStream;
var g_videoObj;
var g_totalTime;
var g_seekStep;
var g_soundObj;
var g_soundVolume;
var g_soundMute;
var g_currentFrame;
var g_isPlaying;
var g_isEnd;
initPlayer();
Symbol 2 MovieClip Frame 1
_x = 0;
setProperty("", _x, 0);
_y = 0;
setProperty("", _y, 0);
var w = Stage.width;
var marginBottom = (_root.control._y - (vb_b._y + vb_b._height));
var h = ((Stage.height - _root.control._height) - marginBottom);
vb_tl._x = 0;
vb_tl._y = 0;
vb_bl._x = 0;
vb_bl._y = h - vb_bl._height;
vb_l._x = 0;
vb_l._y = vb_tl._y + vb_tl._height;
vb_l._height = (h - vb_tl._height) - vb_bl._height;
vb_t._x = vb_tl._x + vb_tl._width;
vb_t.y = 0;
vb_t._width = (Stage.width - vb_tl._width) - vb_tr._width;
vb_tr._x = Stage.width - vb_tr._width;
vb_tr._y = 0;
vb_br._x = Stage.width - vb_br._width;
vb_br._y = h - vb_br._height;
vb_r._x = Stage.width - vb_r._width;
vb_r._y = vb_tr._y + vb_tr._height;
vb_r._height = (h - vb_tr._height) - vb_br._height;
vb_b._x = vb_bl._x + vb_bl._width;
vb_b._y = (vb_bl._y + vb_bl._height) - vb_b._height;
vb_b._width = (Stage.width - vb_bl._width) - vb_br._width;
if (_root.g_clickURL != undefined) {
var vb_dummy = createEmptyMovieClip("vb_dummy", getNextHighestDepth());
var width = (vb_r._x - (vb_l._x + vb_l._width));
var height = (vb_b._y - (vb_t._y + vb_t._height));
vb_dummy._x = vb_l._x + vb_l._width;
vb_dummy._y = vb_t._y + vb_t._height;
vb_dummy.beginFill(16711680, 0);
vb_dummy.moveTo(0, 0);
vb_dummy.lineTo(width, 0);
vb_dummy.lineTo(width, height);
vb_dummy.lineTo(0, height);
vb_dummy.lineTo(0, 0);
vb_dummy.endFill();
vb_dummy.onRelease = function () {
getURL (_root.g_clickURL, ((_root.g_clickURLTarget == undefined) ? "" : (_root.g_clickURLTarget)));
};
}
Symbol 23 MovieClip Frame 1
function syncIndicatorWithVideo() {
if (isDragging) {
return(undefined);
}
var _loc3 = (((vt_right._x + vt_right._width) - vt_left._x) - vt_ind._width);
var _loc2;
if (!_root.playFLV()) {
_loc2 = (vt_ind._width / 2) + ((_loc3 * (_root._currentframe - 1)) / Math.max(1, _root._totalframes - 1));
} else if (_root.g_totalTime != undefined) {
var _loc4 = Math.min(_root.g_netStream.time, _root.g_totalTime);
_loc2 = (vt_ind._width / 2) + (_loc3 * (_loc4 / _root.g_totalTime));
} else {
_loc2 = vt_ind._width / 2;
}
vt_ind._x = vt_left._x + _loc2;
vt_progress._x = vt_left._x;
vt_progress._width = _loc2 + (vt_ind._width / 2);
syncTimeWithVidio();
}
function formatTimeElement(e) {
var _loc1 = String(e);
if (e < 10) {
_loc1 = "0" + _loc1;
}
return(_loc1);
}
function formatTime(time) {
h = int(time / 3600);
m = int((time / 60) % 60);
s = int(time % 60);
var _loc1 = ((formatTimeElement(m) + ":") + formatTimeElement(s));
if (h > 0) {
_loc1 = (formatTimeElement(h) + ":") + _loc1;
}
return(_loc1);
}
function syncTimeWithVidio() {
if (_root.playFLV() && (_root.g_totalTime == undefined)) {
return(undefined);
}
var _loc3;
var _loc2;
if (!_root.playFLV()) {
if (_root.g_fps != undefined) {
_loc2 = Math.ceil(_root._currentframe / _root.g_fps);
_loc3 = Math.ceil(_root._totalframes / _root.g_fps);
}
} else if (_root.g_totalTime != undefined) {
_loc2 = Math.min(_root.g_totalTime, Math.round(_root.g_netStream.time));
_loc3 = _root.g_totalTime;
}
if ((_loc3 != undefined) && (_loc2 != undefined)) {
text = (formatTime(_loc2) + " / ") + formatTime(_loc3);
}
time.text = text;
}
function seekToMousePos(x) {
var _loc3 = (((vt_right._x + vt_right._width) - vt_left._x) - vt_ind._width);
var _loc2 = ((x - vt_left._x) - (vt_ind._width / 2));
if (_loc2 < 0) {
_loc2 = 0;
}
if (!_root.playFLV()) {
var _loc5 = Math.min(_root._totalframes, Math.round((_loc2 * (_root._totalframes + 1)) / _loc3) + 1);
_root.changeCurrentFrame(_loc5);
syncTimeWithVidio();
} else {
var _loc4 = ((_loc2 * _root.g_totalTime) / _loc3);
_root.changeCurrentFrame(_loc4);
syncTimeWithVidio();
}
}
var isDragging = false;
var vt_dummy = createEmptyMovieClip("vt_dummy", getNextHighestDepth());
var width = ((vt_right._x + vt_right._width) - vt_left._x);
var height = vt_center._height;
vt_dummy._x = vt_left._x;
vt_dummy._y = vt_left._y;
vt_dummy.beginFill(16711680, 0);
vt_dummy.moveTo(0, 0);
vt_dummy.lineTo(width, 0);
vt_dummy.lineTo(width, height);
vt_dummy.lineTo(0, height);
vt_dummy.lineTo(0, 0);
vt_dummy.endFill();
vt_ind.swapDepths(1);
vt_ind.onPress = function () {
if (_root.playFLV() && (!_root.g_flvLoaded)) {
return(undefined);
}
isDragging = true;
if (_root.g_isPlaying) {
if (!_root.playFLV()) {
_root.stop();
} else {
_root.g_netStream.pause(true);
}
}
startDrag (this, false, vt_left._x + (vt_ind._width / 2), vt_ind._y, ((vt_right._x + vt_right._width) - (vt_ind._width / 2)) + 1, vt_ind._y);
};
vt_ind.onRelease = (vt_ind.onReleaseOutside = function () {
isDragging = false;
stopDrag();
if (_root.g_isPlaying) {
if (!_root.playFLV()) {
_root.play();
} else {
_root.g_netStream.pause(false);
}
}
});
vt_ind.onMouseMove = function () {
if (!isDragging) {
return(undefined);
}
seekToMousePos(vt_ind._x);
};
vt_dummy.onPress = function () {
if (_root.playFLV() && (!_root.g_flvLoaded)) {
return(undefined);
}
var _loc2 = _xmouse;
seekToMousePos(_loc2);
};
Symbol 37 MovieClip Frame 1
stop();
onRollOver = function () {
gotoAndPlay (2);
};
onReleaseOutside = (onRollOut = function () {
this.gotoAndPlay(7);
});
Symbol 37 MovieClip Frame 6
stop();
Symbol 37 MovieClip Frame 12
stop();
Symbol 44 MovieClip Frame 1
stop();
onRollOver = function () {
this.gotoAndPlay(2);
};
onReleaseOutside = (onRollOut = function () {
this.gotoAndPlay(7);
});
Symbol 44 MovieClip Frame 6
stop();
Symbol 44 MovieClip Frame 12
stop();
Symbol 36 MovieClip Frame 1
stop();
onRollOver = function () {
s1.gotoAndPlay(2);
};
onReleaseOutside = (onRollOut = function () {
s1.gotoAndPlay(6);
});
Symbol 36 MovieClip Frame 2
stop();
onRollOver = function () {
s2.gotoAndPlay(2);
};
onReleaseOutside = (onRollOut = function () {
s2.gotoAndPlay(6);
});
Symbol 48 MovieClip Frame 1
stop();
onRollOver = function () {
gotoAndPlay (2);
};
onReleaseOutside = (onRollOut = function () {
this.gotoAndPlay(7);
});
Symbol 48 MovieClip Frame 6
stop();
Symbol 48 MovieClip Frame 12
stop();
Symbol 52 MovieClip Frame 1
stop();
onRollOver = function () {
gotoAndPlay (2);
};
onReleaseOutside = (onRollOut = function () {
this.gotoAndPlay(7);
});
Symbol 52 MovieClip Frame 6
stop();
Symbol 52 MovieClip Frame 12
stop();
Symbol 56 MovieClip Frame 1
stop();
onRollOver = function () {
gotoAndPlay (2);
};
onReleaseOutside = (onRollOut = function () {
this.gotoAndPlay(7);
});
Symbol 56 MovieClip Frame 6
stop();
Symbol 56 MovieClip Frame 12
stop();
Symbol 60 MovieClip Frame 1
function syncIndicator() {
var _loc4 = (track._width - ind._width);
var _loc3 = ((ind._x - track._x) - (ind._width / 2));
if (_loc3 < 0) {
_loc3 = 0;
}
var _loc2 = Math.min(100, Math.max(0, (_loc3 / _loc4) * 100));
progress._x = 0;
progress._width = (track._width * _loc2) / 100;
_root.g_soundVolume = _loc2;
if (!_root.g_soundMute) {
_root.g_soundObj.setVolume(_loc2);
}
}
var isDragging = false;
ind._x = (track._x + track._width) - (ind._width / 2);
syncIndicator();
var dummy = createEmptyMovieClip("dummy", getNextHighestDepth());
var width = track._width;
var height = track._height;
dummy._x = track._x;
dummy._y = track._y;
dummy.beginFill(16711680, 0);
dummy.moveTo(0, 0);
dummy.lineTo(width, 0);
dummy.lineTo(width, height);
dummy.lineTo(0, height);
dummy.lineTo(0, 0);
dummy.endFill();
ind.swapDepths(1);
ind.onPress = function () {
isDragging = true;
startDrag (this, false, ind._width / 2, ind._y, track._width - (ind._width / 2), ind._y);
};
ind.onRelease = (ind.onReleaseOutside = function () {
isDragging = false;
stopDrag();
});
ind.onMouseMove = function () {
if (!isDragging) {
return(undefined);
}
syncIndicator();
};
dummy.onPress = function () {
ind._x = Math.max(track._x + (ind._width / 2), Math.min((track._x + track._width) - (ind._width / 2), _xmouse));
syncIndicator();
};
Symbol 66 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 6
stop();
Symbol 66 MovieClip Frame 11
stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 73 MovieClip Frame 6
stop();
Symbol 73 MovieClip Frame 11
stop();
Symbol 65 MovieClip Frame 1
stop();
onRollOver = function () {
p1.gotoAndPlay(2);
};
onReleaseOutside = (onRollOut = function () {
p1.gotoAndPlay(6);
});
Symbol 65 MovieClip Frame 2
stop();
onRollOver = function () {
p2.gotoAndPlay(2);
};
onReleaseOutside = (onRollOut = function () {
p2.gotoAndPlay(6);
});
Symbol 16 MovieClip Frame 1
_x = 0;
setProperty("", _x, 0);
_y = (Stage.height - _height);
setProperty("", _y, Stage.height - _height);
var atMarginRight = (cb_right._x - at._x);
var bSoundMarginRight = (cb_right._x - b_sound._x);
var vtRightMarginRight = (cb_right._x - vt.vt_right._x);
cb_left._x = 0;
cb_right._x = Stage.width - cb_right._width;
cb_center._x = (cb_left._x + cb_left._width) - 1;
cb_center._width = (cb_right._x - cb_center._x) + 2;
at._x = cb_right._x - atMarginRight;
b_sound._x = cb_right._x - bSoundMarginRight;
vt.vt_right._x = cb_right._x - vtRightMarginRight;
vt.vt_center._x = (vt.vt_left._x + vt.vt_left._width) - 1;
vt.vt_center._width = (vt.vt_right._x - vt.vt_center._x) + 2;
vt.vt_ind._x = vt.vt_left._x + (vt.vt_ind._width / 2);
b_play.onRelease = function () {
if (!_root.playFLV()) {
if (!_root.g_isPlaying) {
_root.play();
} else {
_root.stop();
}
} else {
if (!_root.g_flvLoaded) {
return(undefined);
}
if (!_root.g_isPlaying) {
if (!_root.g_autoPlay) {
_root.g_autoPlay = true;
_root.g_netStream.pause(false);
}
if (_root.g_isEnd) {
_root.changeCurrentFrame(0);
}
_root.g_netStream.pause(false);
_root.g_isPlaying = true;
} else {
_root.g_netStream.pause(true);
_root.g_isPlaying = false;
}
}
};
b_stop.onRelease = function () {
if (!_root.playFLV()) {
_root.g_currentFrame = 1;
_root.gotoAndStop(1);
} else {
if (!_root.g_flvLoaded) {
return(undefined);
}
_root.changeCurrentFrame(0);
_root.g_netStream.pause(true);
_root.g_isPlaying = false;
}
};
b_backward.onRelease = function () {
if (!_root.playFLV()) {
var _loc3 = (_root._currentframe - _root.g_seekStep);
if (_loc3 < 1) {
_loc3 = 1;
}
_root.changeCurrentFrame(_loc3);
} else {
if (!_root.g_flvLoaded) {
return(undefined);
}
var _loc2 = (_root.g_netStream.time - _root.g_seekStep);
if (_loc2 < 0) {
_loc2 = 0;
}
_root.changeCurrentFrame(_loc2);
}
};
b_forward.onRelease = function () {
if (!_root.playFLV()) {
var _loc3 = (_root._currentframe + _root.g_seekStep);
if (_loc3 > _root._totalframes) {
_loc3 = _root._totalframes;
}
_root.changeCurrentFrame(_loc3);
} else {
if (!_root.g_flvLoaded) {
return(undefined);
}
var _loc2 = (_root.g_netStream.time + _root.g_seekStep);
if (_loc2 > _root.g_totalTime) {
_loc2 = _root.g_totalTime;
}
_root.changeCurrentFrame(_loc2);
}
};
b_sound.onRelease = function () {
_root.g_soundMute = !_root.g_soundMute;
b_sound.gotoAndStop((_root.g_soundMute ? 2 : 1));
var _loc2;
if (!_root.g_soundMute) {
_loc2 = _root.g_soundVolume;
} else {
_loc2 = 0;
}
_root.g_soundObj.setVolume(_loc2);
};