Originariamente inviato da eddydesigner
esatto
ho però la vaga sensazione che non funzioni, spiego:
in una pagina in php prima di qualsiasi altra cosa ho inserito uno script che mi carica un file.htm che contiene l'swf con la musica, (l'ho messo proprio in quel punto perchè così quando mi sposto da una pagina all'altra la musica continua) adesso da un'oggetto flash contenuto dentro il body della stessa inde.php dovrei inserire un pulsantino che mi stoppa la musica.
N.b.
E' abbastanza importante che tutto quello che riguarda il caricamento della musica rimanga tale e quale perchè mi fa sia lo streaming sia il caricamento random ed il loop della musica.
grazie
beh ma io + o - faccio la stessa cosa
cioè nel file con la musica
quello sotto x capire
ho questo
codice:
prova=0;
function dai(){
if(prova==1){
brano = false;
}else if(prova==0){
brano = new Sound();
// brano è il nome istanza dell'oggetto Sound
brano.loadSound("prova.mp3", true);
// parte da sé poiché è vera (caricamento progressivo tramite buffer)
brano.onSoundComplete = function() {
// quando il brano è stato eseguito completamente ...
brano.loadSound("prova.mp3", true);
// ... ricaricalo, come prima.
};
}
}
//create the LocalConnection by first
//setting it equal to a variable
incoming_lc = new LocalConnection();
//define the function that will execute when a connection is made
incoming_lc.methodToExecute = function (param1,param2) {
//set the contents of the text field
//equal to the parameter received from the sending movie
sentMessage.text = param1;
prova=param2;
dai();
}
//make the connection
incoming_lc.connect("lc_name");
tempo = setInterval(function () {
dai();
clearInterval(tempo)},100);
nel secondo quello con i pls
btstop.onRelease = function() {
//create the LocalConnection by first
//setting it equal to a variable
outgoing_lc = new LocalConnection();
//send the contents of the text field
//using the send() method
outgoing_lc.send("lc_name", "methodToExecute", userMessage.text,1);
//delete the local connection now that the
//message has been sent
delete outgoing_lc;
};
btplay.onRelease = function() {
//create the LocalConnection by first
//setting it equal to a variable
outgoing_lc1 = new LocalConnection();
//send the contents of the text field
//using the send() method
outgoing_lc1.send("lc_name", "methodToExecute", userMessage.text,0);
//delete the local connection now that the
//message has been sent
delete outgoing_lc;
};