Mas uma vez por aqui....
vejam se podem me ajudar.....
tenho um player com "PLAY" e "STOP"
em que carrega um arquivo .mp3 externo..
Então até ai tudo funciona mas o arquivo .mp3
tem que ficar em LOOP......e ai que não funciona
estou dando algum mole !
vou colar aqui as actions:
botao.onRelease = function() {
mySound = new Sound();
mySound.loadSound("wagon.mp3", true);
mySound.start(1, 999);
};
stopButton.onRelease = function() {
mySound = new Sound();
mySound.loadSound("wagon.mp3", false);
};
VALEU PELA ATENÇÃO !
Em Loop
Started By Palikir, 21/02/2005, 22:02
7 replies to this topic
#1
Posted 21/02/2005, 22:02
#2
Posted 22/02/2005, 09:18
Ok... primeiro... acho que deve estar havendo um equivoco quanto aos parametros do metodo loadSound();
Se vc colocar o valor do isStreaming como "true" o loop naum vai funcionar...
O código pra fazer seu player funcionar deve ser assim:
mySound.loadSound("url", isStreaming);Aonde "url" é localização do arquivo e isStreaming é valor booleano (true ou false) se o arquivo vai ser carregado por streaming (toca enquanto carrega).Se vc colocar o valor do isStreaming como "true" o loop naum vai funcionar...
O código pra fazer seu player funcionar deve ser assim:
botao.onRelease = function() {
mySound = new Sound();
mySound.loadSound("wagon.mp3", false);
mySound.start(0, 999);
};
stopButton.onRelease = function() {
mySound = new Sound();
mySound.stop();
};
import Profile;
var saruman:Profile = new Profile();
saruman.nome = new String("Tiago S. Kaneta");
saruman.localizacao = new Array("São Paulo","SP");
#3
Posted 22/02/2005, 10:17
Eu particularmente acho mais legal fazer loop desta forma:
Amplexos
var oSom = new Sound();
oSom.loadSound("arquivo.mp3",true);
oSom.onSoundComplete = function(){
this.start(0,1);
}
function tocaSom():Void{
oSom.start(0,1);
}
function paraSom():Void{
oSom.stop();
}
btPlay.onRelease = tocaSom;
btStop.onRelease = paraSom;
Amplexos
Edição feita por: Sheepman, 22/02/2005, 10:17.
#4
Posted 22/02/2005, 12:46
Sim.. eh o jeito que gosto mais tb... mas o outro jeito funciona da mesma forma e é até mais simples...
import Profile;
var saruman:Profile = new Profile();
saruman.nome = new String("Tiago S. Kaneta");
saruman.localizacao = new Array("São Paulo","SP");
#5
Posted 22/02/2005, 15:54
Apenas quis mostrar o outro lado da moeda, não me leve a mal... 
Amplexos
Amplexos
#6
Posted 22/02/2005, 15:55
Nem se preocupe... naum levei a mal naum... soh estava comentando... tudu certo?
import Profile;
var saruman:Profile = new Profile();
saruman.nome = new String("Tiago S. Kaneta");
saruman.localizacao = new Array("São Paulo","SP");
#7
Posted 22/02/2005, 17:20
#8
Posted 22/02/2005, 19:29
Muito obrigado pela atenção...........
Me amarrei........
Funcionou deu tudo certo...........
O que importa é a união das comunidades....
http://www.trinetdigital.com.br
Me amarrei........
Funcionou deu tudo certo...........
O que importa é a união das comunidades....
http://www.trinetdigital.com.br
1 user(s) are reading this topic
0 membro(s), 1 visitante(s) e 0 membros anônimo(s)










