aloooo... je travail sur un site depuis quelques jours et jai maintenant fini... le probleme ... c'est que mon lecteur mp3 flash fonctionne sans probleme . je peux écouter les chansons et tout... mais il ne veut pas changer de chanson automatiquement... pour moi je le sais... mais un autre personne ne devrait pas changer les chansons manuellement... la page :
www.jessytremblay.com
code action :
function loader(sound)
{
var _loc2 = my_sound.getBytesLoaded();
var _loc1 = my_sound.getBytesTotal();
tf_txt.text = "En Attente " + int(_loc2 / _loc1 * 100) + "%";
} // End of the function
var numtrack = 1;
var maxTracks = 3;
var my_sound = new Sound();
my_sound.onLoad = function (success)
{
if (success)
{
my_sound.start();
var _loc1 = Math.floor(my_sound.duration / 1000);
MinutesSeconds(_loc1, timeAll_txt);
tf_txt.text = "Andy Mckee et Don Ross Par Jessy" ;
songCurrentTime();
clearInterval(interval);
} // end if
};
my_sound.loadSound("
http://www.filefreak.com/pfiles/46705/track3.mp3", false);
songCurrentTime = function ()
{
control.onEnterFrame = function ()
{
timePosition = Math.floor(my_sound.position / 1000);
MinutesSeconds(timePosition, timeCurr_txt);
};
};
MinutesSeconds = function (numberMlsec, timeTextField)
{
if (numberMlsec >= 60)
{
numberMlsec = numberMlsec / 60;
var _loc4 = String(numberMlsec);
var _loc2 = _loc4.substr(0, 1);
if (_loc2.length < 2)
{
_loc2 = "0" + _loc2;
} // end if
var _loc1 = _loc4.substr(2, 2);
timeTextField.text = _loc2 + ":" + _loc1;
}
else
{
_loc1 = String(numberMlsec);
if (_loc1.length < 2)
{
_loc1 = "0" + _loc1;
} // end if
timeTextField.text = "00:" + _loc1;
} // end else if
};
my_sound.onSoundComplete = function ()
{
my_sound.start();
};
interval = setInterval(loader, 100, my_sound);
btnNext.onRelease = function ()
{
++numtrack;
if (numtrack == maxTracks + 1)
{
numtrack = 1;
} // end if
my_sound.loadSound("
http://www.filefreak.com/pfiles/46705/track" + numtrack + ".mp3", false);
interval = setInterval(loader, 100, my_sound);
};
btnPrev.onRelease = function ()
{
--numtrack;
if (numtrack == 0)
{
numtrack = 3;
} // end if
my_sound.loadSound("
http://www.filefreak.com/pfiles/46705/track" + numtrack + ".mp3", false);
interval = setInterval(loader, 100, my_sound);
trace (numtrack);
};
btnStop.onRelease = function ()
{
my_sound.start();
my_sound.stop();
delete control.onEnterFrame;
timeCurr_txt.text = "00:00";
};
btnPlay.onRelease = function ()
{
my_sound.stop();
songCurrentTime();
my_sound.start();
};
merci d'avance...