Sto provando a usare questo slider per regolare il volume:
http://flash-mx.html.it/movies/view_movie.asp?id=532
ma non riesco a modificare il codice in modo che il movie stia a destra dello schermo, e non a 0 di "x" (tutto a sinistra).
Questo è il codice sul movie principale:
onClipEvent (load) {
//valore minimo
min = 0;
// valore massimo
max = 100;
percent = Math.floor((_x-min)/(max-min)*100);
//dalla libreria dopo aver creato l oggetto sound
loop = new Sound();
loop.attachSound("sound");
loop.start(0, 100);
volume = 50;
loop.setVolume(volume);
}
//
onClipEvent (mouseMove) {
if (drag == 1) {
_x = _root._xmouse+offsetX;
}
//
if (_x>max) {
_x = max;
}
if (_x<min) {
_x = min;
}
percent = Math.floor((_x-min)/(max-min)*100);
loop.setVolume(percent);
updateAfterEvent();
}
e questo sullo slider:
on (press){
offsetX = _x-_root._xmouse;
drag = 1;
}
on (release, releaseOutside){
drag = 0;
}
Riuscite ad aiutarmi? :rollo: