Buonasera, sto creando un sito con sottofondo musicale, quindi ho inserito una slider per il volume, e i tasti stop e play. Il tutto sembra funzionare correttamente, invece c'è il problema che all'avvio del filmato il volume ha una certa tonalità, mentre al passaggio del mouse questa si abbassa. Come posso risolvere questo inconveniente?
Questa è la pagina in cui potrete constatare il problema. Per verificarlo dovrete riaggiornare ogni volta in quanto è come se al passaggio del moise sil filmato il volume si autoregolasse alla vera tonalità, e per tutto il tempo.
Mentre questo è lo script che ho utilizzato:
slider_1.onPress = function(){
this.startDrag(true, _root.groove_1._x, _root.groove_1._y, _root.groove_1._x + 520, _root.groove_1._y);
}
slider_1.onRelease = function(){
this.stopDrag();
}
mySong = new Sound(this);
mySong.attachSound("bouncesong");
mySong.start(0, 999);
play_btn.enabled=false;
stop_btn.onRelease = function() {
mySong.stop();
play_btn.enabled=true;
stop_btn.enabled=false;
};
play_btn.onRelease = function() {
mySong.start(0, 999);
play_btn.enabled=false;
stop_btn.enabled=true;
};
stop();
slider_1.onMouseMove = function(){
newPoint = new Object();
newPoint.x = this._x
newPoint.y = this._y
_root.groove_1.globalToLocal(newPoint);
_root.mySong.setVolume(1*newPoint.x);
}
Grazie anticipatamente, spero possiate aiutarmi.

Rispondi quotando

