ok forse ci sono aspè...
su ON:
Codice PHP:
//assign a function to the button's event method
buttonInstance.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", "AVVIA_AUDIO", userMessage.text);
//delete the local connection now that the
//message has been sent
delete outgoing_lc;
};
// questo era quello che avevo prima...
//a questo punto non mi serve la'zione qui sotto dato che mando i valori direttamente ad //audio.swf e li agisco in base al valore che acquisisce...
/***on (press) { brano = new Sound();
* // brano è il nome istanza dell'oggetto Sound
* brano.loadSound("U2.mp3", true);
* // parte da sé poiché è vera (caricamento progressivo tramite buffer)
* brano.onSoundComplete = function() {
* // quando il brano è stato eseguito completamente ...
* brano.loadSound("U2.mp3", true);
* // ... ricaricalo, come prima.
* };
*}
**/
su OFF avrò invece
Codice PHP:
//assign a function to the button's event method
buttonInstance.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", "FERMA_AUDIO", userMessage.text);
//delete the local connection now that the
//message has been sent
delete outgoing_lc;
};
e su Audio.swf avrò:
Codice PHP:
incoming_lc = new LocalConnection ();
incoming_lc.methodToExecute = function (param) {
if $variabile =AVVIA_AUDIO {
loadSound("U2.mp3", true);
}
if $variabile=FERMA AUDIO{
unloadSound(1);
}
};
così facendo quando mi crea la connesisone fra il bottone ON oppure OFF e il frame in cui risiede il loadsound mi passa la variabile sulla quale faccio il controllo. se è uno avvia se è zero ferma riproduzione!... dovrebbe essere così oppure... non sono pratico di flash...è la 3 operazione che faccio..e non so dove mettere le mani... magari ti mando per mail il codice sorgente e se hai un secondo mi potresti modificare il codice?? lo so che ti chiedo una cosa grossa ma non so come svilupparlo!! grazie mille cmq per l'interessamento!