Sono nuova del flash e dell'actionscript....
Sono riuscita a leggere da/a php/flash ora il problema è visualizzare all'utente un'animazione diversa in base al valore della variabile vincente, restituita dal php.
Ho trovato l'istruzione _root.cellulare.gotoAndPlay(93) però l'animazione non parte .....perchè?
Il flash è composto da un unica animazione suddivisa in frame che corrispondono alle diverse esigenze....
Thxxx
on(release)
{
if (_root.nome.text ==""){
_root.info.text ="Inserire il nome";
}
else if (_root.cognome.text ==""){
_root.info.text="Inserire il cognome";
}
var sender = new LoadVars();
sender.onLoad = function(success) {
if (success) {
trace("v=" + this['vincente']);
if (this['error'] != '')
{
}
else if (this['vincente'] == 'si')
{
_root.cellulare.gotoAndPlay(93);
trace("v=" + this['vincente']);
}
else if (this['vincente'] == 'no')
{
_root.cellulare.gotoAndPlay(104);
}
}
};
var host = 'http://127.0.0.1/xxxxxx/';
var page = 'memo_reg.php';
qs = 'cognome=' + _root.cognome.text;
qs += '&cellulare=' + _root.cellulare.text;
var address = host + page + '?' + qs;
sender.load(address);
trace(qs);
}

Rispondi quotando