Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Charlles Miller

player só funciona no Opera ! o que fazer ?

Recommended Posts

tenho um player aqui em as3 que só funciona no Opera, vou passar o script dele, e tem outro problema tambem é que quando dou stop e depois play ele começa a tocar do começo, tem algum jeito de quando eu clicar em stop ele excluir o que ja foi carregado (buffer)?

var stopper:Boolean = false;

var soundRequest:URLRequest = new URLRequest("http://201.79.148.92:8000");   

// Then we make a new sound instance and naming it sound_   
var sound_:Sound = new Sound();   

// Also a sound control to control and adjust later on.   
var soundControl:SoundChannel = new SoundChannel();   

// last variable is a soundtransform instance, this is to control the volume up and down function. (and we set them to 1,1 thats the right and left speakers).   
var transform1:SoundTransform = new SoundTransform(1, 0);   

// now we attach the sound file to the sound_ instance we made before.   
sound_.load(soundRequest);   

// here is four eventlisteners, the control all our buttons, and "listen" and calls functions if the buttons are clicked.   
playButton_.addEventListener(MouseEvent.CLICK, playSound);   
stopButton_.addEventListener(MouseEvent.CLICK, stopSound);   
soundUp_btn.addEventListener(MouseEvent.CLICK, soundUp);   
soundDown_btn.addEventListener(MouseEvent.CLICK, soundDown);   
 soundControl = sound_.play(0, 1); 
// This is the function to control the play button, only thing happening is that we attach the soundcontrol to the sound and calls its play method.   
function playSound(event:MouseEvent):void
{
if (stopper== true)
{
soundControl = sound_.play();
stopper = false;
}
} 
function stopSound(event:MouseEvent):void
{
soundControl.stop();
stopper = true;
}
function soundUp(event:MouseEvent):void
{
transform1.volume += .1; soundControl.soundTransform = transform1;
}
function soundDown(event:MouseEvent):void 
{ 
transform1.volume -= .1;
soundControl.soundTransform = transform1;
}
este volume é infinito!! como resolver isso ?

Compartilhar este post


Link para o post
Compartilhar em outros sites

Talvez seja problema no plugin do flash player.

E não entendi qual a finalidade da outra dúvida.

 

Att.

 

se este player fosse para mp3 estaria certo, quando eu clicasse em stop e depois em play ele deveria mesmo começar tudo denovo, mas como é uma radio ele tem que tocar o que esta sendo enviado a ele naquela hora, vou explicar de uma forma mais facil, é assim, eu entro na radio e ta passando uma musica vamos chama-la de "musica 1", ai a musica acaba e começa outra a "musica 2" ai eu clico em stop, o player para, depois eu quero ouvir novamente a radio, clico em play mas o player toca denovo a "musica 1", mas ele deveria tocar a musica que esta sendo enviada pelo servidor de streaming não a musica que ja passou.

entendestes?

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.