Quitter
  • Communauté internationale
    • Langue:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티

problem with dynamic text box and input box

Invité
Oct 04, 2015 Oct 04, 2015

wtf.dib

I am trying to make a login screen for a game.  I imported the background image added 5 text boxes and 2 buttons

the top one is dynamic and is supposed to show the message.   The Username or Password is incorrect    as is shown in the trace, but that is what appears instead.

the two left boxes are static and seem to be working fine.

the 2 boxes on the right are input boxes for the user to enter in their username and password, but the only alpha characters they allow are  a d e m n o p r s u w.

any other alpha chars get ignored. and u n p  are always in capital. 

I realize that the only letters that seem to be allowed are the letters in User Name & Password, but I have no idea why this is happening.

here is the code for the login.

stop();

import flash.events.MouseEvent;

import flash.ui.Mouse;

import flash.display.MovieClip;

import flash.events.Event;

import flash.display.Stage;

loginbtn.addEventListener(MouseEvent.CLICK, login);

function login(event:MouseEvent)

{

  if(usernametxt.text=="u" && passwordtxt.text=="p")

  {

  gotoAndPlay(2);

  }

  else

  {

  messagetxt.text = String("    The Username or Password is incorrect       ");

  trace(messagetxt.text)

  }

}

any help would be greatly appreciated.

SUJETS
ActionScript
547
Traduire
Signaler
Directives de la communauté
Restez bienveillant et courtois, ne vous attribuez pas la paternité des créations d’autrui et assurez-vous de l’absence de doublons avant de poster du contenu. En savoir plus
community guidelines

correct answers 1 bonne réponse

LÉGENDE , Oct 04, 2015 Oct 04, 2015

Embed the fonts for the dynamic/input textfields.

Traduire
LÉGENDE ,
Oct 04, 2015 Oct 04, 2015

Embed the fonts for the dynamic/input textfields.

Traduire
Signaler
Directives de la communauté
Restez bienveillant et courtois, ne vous attribuez pas la paternité des créations d’autrui et assurez-vous de l’absence de doublons avant de poster du contenu. En savoir plus
community guidelines
Invité
Oct 04, 2015 Oct 04, 2015

Thank you Ned

Traduire
Signaler
Directives de la communauté
Restez bienveillant et courtois, ne vous attribuez pas la paternité des créations d’autrui et assurez-vous de l’absence de doublons avant de poster du contenu. En savoir plus
community guidelines
LÉGENDE ,
Oct 04, 2015 Oct 04, 2015
LA PLUS RÉCENTE

You're welcome

Traduire
Signaler
Directives de la communauté
Restez bienveillant et courtois, ne vous attribuez pas la paternité des créations d’autrui et assurez-vous de l’absence de doublons avant de poster du contenu. En savoir plus
community guidelines