Comunidad de diseño web y desarrollo en internet online

sendAndLoad flash y php

Citar            
MensajeEscrito el 29 Nov 2008 07:39 pm
desde flash paso un avlor a php el cual php me retorma un valor

como puedo ahcer que si el valor que me devuleve php

por ejemplo el valor es 0 que me lleve al fotograma 5
y si el avlor es 1 que me lleve al fotograma 10

this.resultadodedatos = 0 ( gotoAndStop(5); )
this.resultadodedatos = 1 ( gotoAndStop(10); )
--------------------------------------------------------------------------

botonEnviar.onRelease = function () {

loadVars = new LoadVars();
loadVars.recibedatos = ingresodatos.text;
loadVars.sendAndLoad("http://localhost/sitio/misdatos.php", loadVars, "POST");
resultado.text = "Cargando Datos...";
loadVars.onLoad = function(exito) {
if(exito){
resultado.text = this.resultadodedatos;

}else{
resultado.text = "No se pudieron cargar los datos";
}
};
};

Por zonwebperu

24 de clabLevel



Genero:Masculino  

firefox
Citar            
MensajeEscrito el 29 Nov 2008 10:05 pm
Hola, esta seria mi solucion:

Código :

var loadVars:LoadVars = new LoadVars();
loadVars.recibedatos = ingresodatos.text;
loadVars.onLoad = function(exito) 
{
   if( exito )
   {
      this.parent.gotoAndStop( (this.resultadodedatos == 1 )? 10 : 5 );
   }
   else
   {
      resultado.text = "No se pudieron cargar los datos";
   }
};

loadVars.sendAndLoad("http://localhost/sitio/misdatos.php", loadVars, "POST");
loadVars.parent = this;
resultado.text = "Cargando Datos...";


Ps. No te recomiendo mucho LoadVars, para mi gusto, es muy Rural, casi una reliquia :wink:

Por LongeVie

Claber

1741 de clabLevel

1 tutorial

Genero:Masculino  

En un lugar, re moto.

msie7

 

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