Questo cod lo metti nelle azioni del frame
mSound = new Sound(this);
mSound.loadSound("t1.mp3", false);
dausgabe = mSound.duration;
function sPos(aus, sobj) {
this[aus] = this[sobj].position;
}
function sBalken(obj, spobj) {
dauer = this[spobj].duration;
pos = this[spobj].position;
prozent = pos*100/dauer;
_root[obj]._xscale = prozent;
prozent = parseInt(prozent)+"%";
}
function spielen() {
anhalten();
mSound.start(0, 1);
}
function anhalten() {
mSound.stop();
}
function pause() {
anhalten();
mSound.start(pausgabe/1000, 1);
}
function ruck(diff) {
pausgabe = int(pausgabe)-diff;
anhalten();
mSound.start(pausgabe/1000, 1);
}
function vor(diff) {
pausgabe = int(pausgabe)+diff;
anhalten();
mSound.start(pausgabe/1000, 1);
}
Poi crei un pulsante che abbia questo codice
on (release) {
if (mSound.duration == mSound.position) {
spielen();
} else {
pause();
}
absig = 1;
psig = 1;
}
***il file audio MP3 deve essere nella cartella del swf o proiettore.
Funziona solo standalone.
Ciao se hai prob fammi sapere.