Frame 1
function s2time(d) {
if (d > 60) {
s = d % 60;
if (s < 10) {
s = "0" + s;
}
d = (((d - (d % 60)) / 60) + ":") + s;
}
return(d);
}
function updateseeker() {
if (_root.seeker._alpha < 100) {
_root.seeker._alpha = _root.seeker._alpha + 10;
}
_root.sposition = (_global.Behaviors.Sound.arf.position / _global.Behaviors.Sound.arf.duration) * 100;
_root.seeker.gotoAndStop(Math.round(sposition * 5));
if (_root.showtime) {
p = Math.round(_global.Behaviors.Sound.arf.position / 1000);
d = Math.round(_global.Behaviors.Sound.arf.duration / 1000);
_root.descr = (s2time(p) + " | ") + s2time(d);
} else {
_root.descr = (Math.round(_global.Behaviors.Sound.arf.position / 1000) + " | ") + Math.round(_global.Behaviors.Sound.arf.duration / 1000);
}
}
function fadeseeker() {
if (_root.seeker._alpha > 0) {
_root.seeker._alpha = _root.seeker._alpha - 5;
} else {
clearInterval(fadeseeker_interval);
}
}
function updatevol() {
decal = ((_root._xmouse - _root.volumecontrol._x) / _root.volumecontrol.fond._width) * 100;
decal = Math.round(decal);
_root.volume = decal;
if (_root.isplaying) {
_global.Behaviors.Sound.arf.setVolume(decal);
}
if ((decal >= 0) && (decal <= 100)) {
_root.volumecontrol.gotoAndStop(decal);
}
}
function setvc() {
_root.uv = setInterval(updatevol, interval / 2);
}
function releasevc() {
clearInterval(_root.uv);
}
function dewnext() {
current++;
if (current > (size - 1)) {
current = 0;
}
dewload();
}
function dewprev() {
current--;
if (current < 0) {
current = size - 1;
}
dewload();
}
function dewload() {
mp3file = mp3[current];
if (_global.Behaviors == null) {
_global.Behaviors = {};
}
if (_global.Behaviors.Sound == null) {
_global.Behaviors.Sound = {};
}
if (typeof(this.createEmptyMovieClip) == "undefined") {
this._parent.createEmptyMovieClip("BS_arf", new Date().getTime() - (Math.floor(new Date().getTime() / 10000) * 10000));
_global.Behaviors.Sound.arf = new Sound(this._parent.BS_arf);
} else {
this.createEmptyMovieClip("_arf_", new Date().getTime() - (Math.floor(new Date().getTime() / 10000) * 10000));
_global.Behaviors.Sound.arf = new Sound(this.BS_arf);
}
if (volume > 0) {
_global.Behaviors.Sound.arf.setVolume(volume);
}
_global.Behaviors.Sound.arf.onSoundComplete = function () {
if (((autoreplay == 1) || (autoreplay == "true")) || (autoreplay == "yes")) {
_root.isplaying = false;
_root.sposition = 0;
dewplay();
} else if (size > 1) {
dewnext();
} else {
dewstop();
}
};
_global.Behaviors.Sound.arf.loadSound(mp3file, true);
_global.Behaviors.Sound.arf.start();
_root.loaded = true;
_root.isplaying = true;
dewplay();
}
function dewplay() {
if (!_root.loaded) {
dewload();
}
position = _root.sposition * (_global.Behaviors.Sound.arf.duration / 100000);
if (!_root.isplaying) {
_global.Behaviors.Sound.arf.start(position, 1);
}
clearInterval(fadeseeker_interval);
clearInterval(updateseeker_interval);
updateseeker_interval = setInterval(updateseeker, interval);
_root.btnhelp._visible = false;
_root.isplaying = true;
btnplay._visible = false;
btnpause._visible = true;
btnstop._visible = true;
}
function dewpause() {
btnplay._visible = true;
btnpause._visible = false;
btnstop._visible = true;
_root.sposition = _global.Behaviors.Sound.arf.position / 1000;
_global.Behaviors.Sound.arf.stop();
_root.isplaying = false;
}
function dewstop() {
btnplay._visible = true;
btnpause._visible = false;
btnstop._visible = false;
_global.Behaviors.Sound.arf.stop();
clearInterval(updateseeker_interval);
_root.sposition = 0;
fadeseeker_interval = setInterval(fadeseeker, interval);
_root.isplaying = false;
}
Stage.align = "TL";
Stage.scaleMode = "noScale";
Stage.showMenu = false;
var sposition = 0;
var fadeseeker_interval;
var updateseeker_interval;
var interval = 50;
var isplaying = false;
var loaded = false;
btnplay._visible = true;
btnpause._visible = false;
btnstop._visible = false;
bg._visible = false;
btnplay.onRelease = dewplay;
btnpause.onRelease = dewpause;
btnstop.onRelease = dewstop;
btnnext.onRelease = dewnext;
btnprev.onRelease = dewprev;
if (!volume) {
volume = 100;
}
if (volume > 0) {
_root.volumecontrol.gotoAndStop(volume);
}
fond.onPress = function () {
if (_root.isplaying) {
decal = (_root._xmouse - _root.fond._x) / _root.fond._width;
decal = (_global.Behaviors.Sound.arf.duration * decal) / 1000;
if (decal > 0) {
_global.Behaviors.Sound.arf.start(decal, 1);
}
}
};
volumecontrol.onMouseDown = function () {
setvc();
};
volumecontrol.onMouseUp = function () {
releasevc();
};
btnhelp.onRelease = function () {
getURL ("http://www.alsacreations.fr/dewplayer", "_blank");
};
if (bgcolor) {
bgcolor = "0x" + bgcolor;
beginFill(bgcolor, 100);
lineStyle(1, bgcolor, 100);
moveTo(-100, -100);
lineTo(-100, 100);
lineTo(300, 100);
lineTo(300, -100);
endFill();
}
if (mp3 == undefined) {
if (file) {
mp3 = file;
} else if (sound) {
mp3 = sound;
} else if (son) {
mp3 = son;
}
}
mp3 = mp3.split("|");
var current = 0;
var size = mp3.length;
if ((size < 2) || (size == undefined)) {
btnprev._visible = false;
btnnext._visible = false;
}
if (size == undefined) {
btnplay._visible = false;
descr = "no mp3 file";
}
if ((((((autostart == 1) || (autostart == "true")) || (autostart == "yes")) || (autoplay == 1)) || (autoplay == "true")) || (autoplay == "yes")) {
dewload();
}
Symbol 22 MovieClip Frame 41
stop();
Symbol 24 MovieClip Frame 1
stop();