PDA

View Full Version : Input submit to dynamic text


Cragdo
03-01-2003, 01:05 AM
I want to have a user type something into an input box...
press enter...
and print what they just wrote on the input box in a dynamic text box. I also want to have the input box cleared out when enter is pressed... I have a submit button with the following on it :)


on (release, keyPress "<Enter>") {
command += newline;
command += input;
input = "";
}


Any ideas why this doesn't work....
Just for any help this may bring (to show it's not the button or whatever)

the following script does work (well not the input part) but does print out an unchanging sting on a newline


on (release, keyPress "<Enter>") {
command += newline;
command += "some random junk"
input = "";
}


Help... if you can ;) thanks

Billy T
03-01-2003, 02:51 AM
are command and input your instance names or variable names?

Cragdo
03-01-2003, 05:19 AM
MX and variable names...
sorry... anything else i have forgotten to mention?

Billy T
03-01-2003, 05:28 AM
are the text boxes and button all on the same timeline? ie _root?

Cragdo
03-01-2003, 05:44 AM
yup i even went as far as putting the two text fields on the same layer as the button all on root

Billy T
03-01-2003, 05:47 AM
can you up the file?

Ricod
03-01-2003, 09:13 AM
This might be a long shot, but i think I remember something about Flash handling keyboard input differently once you enter an input box. Flash will treat your <enter> as a newline input ...

To test it ... place the code on a button and then see if it does work ...

Also, when you up a .fla, zip it. :)

Cragdo
03-02-2003, 10:18 PM
here it is. :D ...

(this board should include a must have X amount of posts to download file... just a thought... although i know this board is one of those bought ones)

Ricod
03-02-2003, 10:18 PM
:confused: What ARE you talking about cragdo ? Did you solve it ?

oh .. k, look like you changed your post again ... ?

Cragdo
03-02-2003, 10:20 PM
sorry i had a little trouble... I uploaded the swf file... then i tried to upload the same zip name with the fla file and it had some trouble... so then i deleted that post and started over again ... sorry ... Solve away! ;)
Thanks for all the help!

Billy T
03-02-2003, 10:53 PM
Originally posted by Billy T
are the text boxes and button all on the same timeline? ie _root?

well if you'd answered this question correctly your prob would have been solved a while ago

the input text box is inside an mc

see attached

cheers

Cragdo
03-02-2003, 11:06 PM
AHAHAHA thanks Man i feel dumb now... Oh Well Thanks a bunch! You're my hero ;):cool:

Cragdo
03-02-2003, 11:13 PM
Hey BTW thanks for uploading that file but could you delete it for me :D Thanks.
~Cragdo