Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/11/2005, 16:26
macwarez
 
Fecha de Ingreso: diciembre-2003
Mensajes: 82
Antigüedad: 20 años, 4 meses
Puntos: 1
crear campos dinamicos con variable

Saludos, estoy teniendo problemas al tratar de crear campos dinamicamente aplicando una varible de php a un for, si pongo el valor manualmente no tengo ningun problema pero si lo hago por medio de variable me aparece el siguiente error:

---------------------------
Macromedia Flash Player 8
---------------------------
A script in this movie is causing Macromedia Flash Player 8 to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?
---------------------------
Yes No
---------------------------

esto es lo que hago manualmente y funciona:

Código PHP:
for (i=1i<=500i++) {
    

      
   
txt1 "valores_txt"+i;
   
   
createTextField(txt1getNextHighestDepth(), 120i*2050020);
   
   
this[txt1].embedFonts true;
   
this[txt1].text "A, B, C, 352.00, 25.54, 544.55"+i;
   
this[txt1].setTextFormat(formato);
   
this[txt1].border true;
   
this[txt1].background true;
   
this[txt1].borderColor 0x000000;
   
this[txt1].backgroundColor fondo;
   
this[txt1].selectable false;
  


Pero necesito cargar el valor de i desde un archivo php y sutituirla por 500 pero meda el error para extraer la varible hago lo siguiente ya que ese valor lo tomo de en numeros de campos que tengo en una base mysql


Código PHP:
var envio_lv:LoadVars = new LoadVars();
var 
recibir_lv:LoadVars = new LoadVars();


function 
Crear() {
    
    
envio_lv.Prima 10;
    
envio_lv.Tiempo 12;
    
    
envio_lv.sendAndLoad("valor.php"recibir_lv"POST");
    
    
trace(envio_lv.Prima);
    
trace(envio_lv.Tiempo);
    
    
    
}


recibir_lv.onLoad = function(exito)
{
    if(
exito)
    {
         
gotoAndPlay("crear");
    }
};


y en el frame crear:


for (
i=1i<=this.registrosi++) {
    

      
   
txt1 "valores_txt"+i;
   
   
createTextField(txt1getNextHighestDepth(), 120i*2050020);
   
   
this[txt1].embedFonts true;
   
this[txt1].text "A, B, C, 352.00, 25.54, 544.55"+i;
   
this[txt1].setTextFormat(formato);
   
this[txt1].border true;
   
this[txt1].background true;
   
this[txt1].borderColor 0x000000;
   
this[txt1].backgroundColor fondo;
   
this[txt1].selectable false;
  
}

this.registros es una variable que tengo almacenada en php que cuenta los registros que estan en la tabla:

$VReg mysql_num_rows($QValor);
echo 
"&registros=".$VReg

pero al hacer eso no me funciona me podrian ayudar a ver cual es el problema no encuentro que puede estar pasando ya que la variable me tira el mismo valor que pongo manualmente pero no me funcina con la varible les agradeceria mucho la ayuda.