Allora,
innanzitutto tramite <Param name=Flash Vars ...
etc passo il numero di id che mi interessa, per interrogare il db.
QUindi faccio la query in php (tramite flash che chiama la pagina) e stampo con un echo i risultati:
echo "&titolo=".$titolo."&testo=".$testo eccetera eccetera...
L'action script in pratica è così:
var carica = new LoadVars();
carica.load("modifica.php?id="+id+"");
carica.onLoad = function(success) {
if(success) {
///Qui imposto le variabili che mi servono..
var testo = new String();
var titolo = new String();
var giorno = new String();
var mese = new String();
var anno = new String();
var home = new String();
//qui asseggno il valore che prendo da php
giorno += this["giorno"];
testo += this["testo"];
titolo +=this["titolo"];
giorno +=this["giorno"];
mese += this["mese"];
anno +=this["anno"];
home +=this["home"];
// qui imposto il checkbox selezionato se php resistuisce 1
if(home == "1"){
homep.setValue();
}
// qui scrivo nei campi di testo quello che recupero da php
testo_it.htmlText = testo;
titolo_it.htmlText = titolo;}
else {
testo_it.htmlText = "Errore nel caricamento file!";
}
}