Originariamente inviato da Broly
Ti avevo consigliato onSoundComplete per la fine del brano, poi m'avevi accennato al problema dell'inizio...e li appunto, quando sound.position > 0 vuol dire che il brano è appena iniziato e puoi far partire le barre :master:
Non capisco/ricordo 'ndo stia il problema
e non lo dire a mè vàà..
al solo pensiero di postare tutto il code AS stò male..
però se non vedi non si può capire
quindi non svenire..
codice:
suono = new Sound();
suono.loadSound("base3.mp3", true);
suono.stop();
suono.onLoad = function(ok) {
if (ok) {
loadMovieNum("eQualiz.swf", 2);
//suono.play();
}
};
//
suono.onSoundComplete = function() {
car = suono.getBytesLoaded();
tot = suono.getBytesTotal();
//var Sperc = Math.round(Stot/Scar*100)
if (car >= tot && _level2.getBytesLoaded() >= getBytesTotal()){
_level2._visible=0;
ripetizione++;
}
if (ripetizione<10) {
suono.loadSound("base3.mp3", true);
}
};
suono.loadSound("base3.mp3", true);
ripetizione = 0;
//
this.onEnterFrame = function() {
suono.stop();
car = suono.getBytesLoaded();
tot = suono.getBytesTotal();
//trace(car+" ; "+tot);
this.miotesto.text = Math.round(car/tot*100)+"%";
if (car >= tot && _level2.getBytesLoaded() >= getBytesTotal()) {
delete this.onEnterFrame;
this.miotesto.text = "";
suono.start();
}
if (ripetizione<10) {
suono.start();
}
}
credo di aver incollato correttamente.. vediamo!