Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

problem with dynamic text box and input box

Guest
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.

TOPICS
ActionScript
501
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Oct 04, 2015 Oct 04, 2015

Embed the fonts for the dynamic/input textfields.

Translate
LEGEND ,
Oct 04, 2015 Oct 04, 2015

Embed the fonts for the dynamic/input textfields.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Oct 04, 2015 Oct 04, 2015

Thank you Ned

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 04, 2015 Oct 04, 2015
LATEST

You're welcome

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines