_root.onEnterFrame = function() {
if (Math.floor(ns.time) == Math.floor(duration) && namenumber<=12) {
ns.seek(0);
player.scrub1.scrub._x = 0;
myVideo.clear();
ns.pause(false);
player.playBut._visible = false;
player.pauseBut._visible = true;
namenumber++;
ns.play(mdm.Application.path+"Data/"+namenumber+".afk");
}
if (un && _root.ms<100) {
_root.ms += 10;
}
my_sound.setVolume(_root.ms);
if (_xmouse>player._x-227 && _xmouse<player._x+227 && _ymouse>player._y-327 && _ymouse<player._y+10) {
if (player._alpha<=110) {
player._alpha += 5;
}
} else if (player._alpha>=20) {
player._alpha -= 5;
}
}
player.stopButton.onRelease = function() {
delete this.onEnterFrame;
ns.seek(0);
myVideo.clear();
ns.pause(true);
player.playBut._visible = true;
player.pauseBut._visible = false;
};
player.prev.onRelease = function() {
if (namenumber>=9) {
delete this.onEnterFrame;
ns.seek(0);
player.scrub1.scrub._x = 0;
myVideo.clear();
ns.pause(false);
player.playBut._visible = false;
player.pauseBut._visible = true;
namenumber -= 1;
ns.play(mdm.Application.path+"Data/"+namenumber+".afk");
}
};
player.next.onRelease = function() {
if (namenumber<=12) {
delete this.onEnterFrame;
ns.seek(0);
player.scrub1.scrub._x = 0;
myVideo.clear();
ns.pause(false);
player.playBut._visible = false;
player.pauseBut._visible = true;
namenumber += 1;
ns.play(mdm.Application.path+"Data/"+namenumber+".afk");
}
};
player.seekbar.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit, 10);
player.scrub1.scrub.startDrag(true, 0, this._y, 187, this._y);
};
player.seekbar.onRelease = player.seekbar.onReleaseOutside=function () {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus, 2000);
this.stopDrag();
ns.seek(Math.floor((player.scrub1.scrub._x/187)*duration));
};
player.videoBg.onPress = function() {
if (player.pauseBut._visible == false) {
playMovie();
} else {
pauseMovie();
}
};
player.scrub1.scrub.onPress = function() {
clearInterval(videoInterval);
scrubInterval = setInterval(scrubit, 10);
this.startDrag(true, 0, this._y, 187, this._y);
};
player.scrub1.scrub.onRelease = player.scrub1.scrub.onReleaseOutside=function () {
clearInterval(scrubInterval);
videoInterval = setInterval(videoStatus, 2000);
this.stopDrag();
};
player.pauseBut.onPress = function() {
pauseMovie();
};
player.playBut.onPress = function() {
playMovie();
};
function selvideo() {
ns.seek(0);
player.scrub1.scrub._x = 0;
myVideo.clear();
ns.pause(false);
player.playBut._visible = false;
player.pauseBut._visible = true;
ns.play(mdm.Application.path+"Data/"+namenumber+".afk");
}
//pause movie
function playMovie() {
ns.pause();
player.pauseBut._visible = true;
player.playBut._visible = false;
videoDisplay._visible = true;
}
//pause movie
function pauseMovie() {
ns.pause();
player.playBut._visible = true;
player.pauseBut._visible = false;
}
var videoInterval = setInterval(videoStatus, 100);
var amountLoaded:Number;
var duration:Number;
//get duration of video file
ns.onMetaData = function(obj) {
duration = obj.duration;
};
////get video status and when finish file going to next file
function videoStatus() {
player.scrub1.scrub._x = ns.time/duration*187;
}
var Interval;
//
function scrubit() {
ns.seek(Math.floor((player.scrub1.scrub._x/187)*duration));
}
//attach and set volume for video
this.attachAudio(ns);
var snd = new Sound(this);
function setVol(v) {
snd.setVolume(v);
}
function getVol() {
return snd.getVolume();