Comunidad de diseño web y desarrollo en internet online

pasar parametro de php a flash

Citar            
MensajeEscrito el 12 Ene 2006 05:14 pm
Como puedo pasar lo que imprime esto que es una consulta a mysql desde php:

while ($row = mysql_fetch_array($consulta)) {

printf($row["datos"]);


}

a flash:

com puedo tomarlo en flash para poder meterlo en un cuadro de texto.

Gracias.

Por frankfdj

20 de clabLevel



 

msie
Citar            
MensajeEscrito el 12 Ene 2006 05:20 pm

Código :

$i=0;
while ($row = mysql_fetch_array($consulta)) {

printf("&dato".$i."=".$row["datos"]);
$i++;

}


y en flash lo lees así:

Código :

var resultadoPHP:LoadVars = new LoadVars();
resultadoPHP.load("tuscript.php"); //o sendAndLoad como lo tengas

resultadoPHP.onLoad = function (exito:Boolean){
       if (exito){
             miTextoDinamico.text= "";
             for (i=0;this["dato"+i]!=undefined;i++) { 
                    miTextoDinamico.text+= this["dato"+i]+"\n";
             }
       }
}



saludos :)

Por Maikel

BOFH

5575 de clabLevel

22 tutoriales
5 articulos

Genero:Masculino   Team Cristalab

Claber de baja indefinida

netscape

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.