Nel pannello Components hai il componenente Alert. Ne trascini un'istanza sullo stage, poi la cancelli, in modo da averlo solo nella libreria. Quindi cambi lo script in:
codice:
on (release) {
import mx.controls.Alert
myVars = new LoadVars();
myVars.ragionesociale = this._parent.ragionesociale.text;
myVars.provincia = this._parent.provincia;
myVars.lavorazioni = this._parent.lavorazioni.text
myVars.importa = this._parent.checkbox1_set!=undefined?this._parent.checkbox1_set:'false';
myVars.esporta = this._parent.checkbox2_set!=undefined?this._parent.checkbox2_set:'false';
myVars.certifica = this._parent.checkbox3_set!=undefined?this._parent.checkbox3_set:'false';
myVars.settore = this._parent.item;
trace (...);
myVars.onLoad = function()
{
if (!this.error && this.user>0) {
var msg = "il messaggio da scrivere nell'alert";
var ttl = "Il titolo dell'alert";
Alert.show(msg, ttl, Alert.OK);
}
userName.selectable = true;
userPassword.selectable = true;
loginButton.enabled = true;
};
sendButton.enabled = false;
myVars.sendAndLoad("resulta.php", myVars, 'POST');
}