Foros del Web » Creando para Internet » Flash y Actionscript »

pasar de flash mx a 8

Estas en el tema de pasar de flash mx a 8 en el foro de Flash y Actionscript en Foros del Web. Estoy construyendo un sistema de login con asp y flash a partir de un tutorial que he encontrado en http://www.flashmagazine.com/695.htm , pero está hecho para ...
  #1 (permalink)  
Antiguo 17/05/2007, 11:22
 
Fecha de Ingreso: julio-2002
Mensajes: 195
Antigüedad: 21 años, 8 meses
Puntos: 0
pasar de flash mx a 8

Estoy construyendo un sistema de login con asp y flash a partir de un tutorial que he encontrado en http://www.flashmagazine.com/695.htm, pero está hecho para flash mx y yo estoy usando flash 8, y creo que por eso no funciona bien.
El flash 8 no me da ningún error, pero el sistema no funciona. Creo que uno de los problemas es que tengo que crear una instancia del botón del panel de componentes, y ponerle como parámetro Click Handler con valor "onLogin". No soy capaz de hacerlo. Como se puede hacer eso?
Me podeis decir si esto está bien para flash 8:

// first we create the object
login_lv = new LoadVars();

//now we create the function that will happen when this object receives data
login_lv.onLoad=function(){

//check to see if the users info is correct
if(this.userInfo == "true"){
trace("Welcome");
}else{
//if the users info was not correct, trace an error, and clean the text fields
trace("Invalid data");
login_txt.text="";
password_txt.text="";
}
}

Now we have that set, lets create the function that will happen when the user tries to login, and we will add some client side validation to make sure the user actually did put information in both text fields, and the password is at least a certain length.

//the function for the login button
onLogin=function(){
//an error will occur if the user didn't enter a login name
if(login_txt.text.length<1){
trace("please provide a login name");
//an error will occur if the password is not the right length
}else if(password_txt.text.length<5){
trace("invalid password");
//and clean out the password
password_txt.text="";
}else{
//this is if everything is fine to send

//we will store the user information as properties of the LoadVars object
login_lv.username=login_txt.text;
login_lv.password=password_txt.text;
//now we send the data, and wait to recieve something back
login_lv.sendAndLoad("login.asp", login_lv, "POST");
}
}
__________________
EL conocimiento es la base del poder
  #2 (permalink)  
Antiguo 17/05/2007, 11:30
Avatar de Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 8 meses
Puntos: 406
Re: pasar de flash mx a 8

Hola Rafa28:
Revisa éste link: http://www.aspfacil.com/articulos/cv_usuarios.asp

Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/
  #3 (permalink)  
Antiguo 17/05/2007, 12:08
 
Fecha de Ingreso: julio-2002
Mensajes: 195
Antigüedad: 21 años, 8 meses
Puntos: 0
Re: pasar de flash mx a 8

He intentado entrar en ese link, pero sale que no es correcto.
__________________
EL conocimiento es la base del poder
  #4 (permalink)  
Antiguo 17/05/2007, 12:17
Avatar de Bandit
Moderador
 
Fecha de Ingreso: julio-2003
Ubicación: Lima - Perú
Mensajes: 16.726
Antigüedad: 20 años, 8 meses
Puntos: 406
Re: pasar de flash mx a 8

Que raro, el link está bien, otra forma sería que lo copies y lo pegues en el navegador.

Espero haberte sido de ayuda.
__________________
Bandit.
Si no sabes estudia y si sabes enseña.
http://www.banditwebdesign.com/
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:28.