Just nu i M3-nätverket
Jump to content

Promblem med volymkontroll i Flash


zenza

Recommended Posts

Hej! - försöker att få en volymkontroll att fungera när jag drar på reglaget 'audio.lever' men jag får inte ut ._x under tiden som musen är nedtryckt. Någon som har ett förslag på hur jag skriver för att få det att fungera. - Hälsningar Göran i Uppsala

 

.....................................................................................

 

audio.lever.onPress = function(){

so.setVolume(this._x * 2);

this.startDrag(false, 0, this._y, 50, this._y);

}

 

audio.lever.onRelease = audio.lever.onReleaseOutside = function(){

so.setVolume(this._x * 2);

this.stopDrag();

}

 

.........................................................................................

 

 

 

Link to comment
Share on other sites

Något i stil med detta borde fungera:

 

audio.lever.onPress = function()
{

   this.startDrag(false, 0, this._y, 50, this._y);
   this.onMouseMove = function()
   {
       so.setVolume(this._x * 2); 
   }
}

audio.lever.onRelease = audio.lever.onReleaseOutside = function(){
   this.stopDrag();
   delete this.onMouseMove
}

 

/Mirandir

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...