FORUMS: list search recent posts

Difficulty with input text box.

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Burns
Difficulty with input text box.
on Apr 6, 2009 at 3:44:19 am


I have a Flash built website that I want one page to require a password to see. I've created an input text field and have given it a var name: pass_word. On the enter button I've entered the following action script:

on(release, keyPress""){
if(pass_word eq "HappyHarris"){
Access_Denied="Access Denied";

I added the trace to see what was getting recorded when the user enters the password because even if the user enters the correct word he gets the access denied message. It seems that a bunch of html is getting recorded in addition to the word. It shows the paragraph and text style tags all around the word. Is this what is causing the access denied message? And if so, how do I fix it? I've made sure that the "render text as html" button is not selected in the input text field.

Any help would be most appreciated.



Return to posts index

demetri tashie
Re: Difficulty with input text box. (AS3 solution)
on Apr 6, 2009 at 2:31:43 pm

it looks like you're working in AS2. if you can use AS3, here is a way that i have done it on a client's site.



var mypword:String;

function submitclick(event:MouseEvent):void{
if(mypword =="ABCDEF"){
}else{failed.text="Please enter valid password";

where there is a submit button with instance name "submit" . there is a dynamic text field named "failed" and there is an input text field named "pword" you can choose , form the Properties Inspector, the line type "password" for this box, if you want

because of my background, i opted to have the 'failed' dynamic text box's border and background not be visible.

i created a VAR ("mypword") and data typed it as a String, so i can use it in my function
the submitclick function says that if the password is correct, then go to the correct frame, if not, to place some text into the "failed" text box.

here is a stripped down example: the correct password is : COWrocks case sensitive

hope that helps. let us know if you need more clarification, or if you need someone else to help you with AS2 code. if so, please add "AS2" somewhere in the subject line.

Return to posts index

David Burns
Re: Difficulty with input text box. (AS3 solution)
on Apr 7, 2009 at 1:23:51 am

Thanks Demetri. I've built the entire site in AS2 because, unfortunately, it's all I'm acquainted with right now. Your post has got me motivated to take a course to learn the basics of AS3 but in the meantime, I will take your advice and repost with AS2 listed in the subject line.

Thanks again.


Return to posts index

demetri tashie
Re: Difficulty with input text box. (AS3 solution)
on Apr 7, 2009 at 1:34:42 am

good luck. sorry i can't help with AS2. when i was working with AS2 , my stuff was mainly timeline based.if i couldn't do it with Script Assist, i didn't want a part of it !

i made a conscious decision to leave that behind and really try to get a grip on AS3. it took a while for my brain to function with it, but now i feel i am beginning to understand it, although there is sooo much to know, it is daunting.

also, i was afraid AS2 was becoming obsolete and thought i'd get left behind !

let me ( and us ) know what you figure out, so we can all learn together. thanks.

Return to posts index

Richa Singh
Difficulty with input text box (AS2)
on Apr 7, 2009 at 2:53:57 am

Even I have the same problem in AS 2....Someone plese help...I have been trying this from agess!!!!!....

Thnx in advance for the help

Return to posts index

Hans Fouche
Re: Difficulty with input text box.
on Oct 8, 2009 at 3:46:27 pm

hi Dave,

I have a similar problem and need assistance please tell me you have a solution.



Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved