Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Flex > Flex 2, 3 & 4

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-05-2011, 03:36 PM   #1
BeanoEFC
Registered User
 
Join Date: Sep 2009
Posts: 38
Default Dynamic Textfield Not Working

Hey Everyone,

Im working on a project which requires a dynamic textfield. I am developing on MAC with Flahs Builder 4.

The problem i have is my input is not recognised by the textfield. It seems like only a few keys actually work:
  • Tab
  • crtl
  • cmd

I can also paste by using the cmd + v command.

The code i am using for my textfield is below:
Code:
private function setTextField():TextField{
			var textfield:TextField = new TextField();
			textfield.x = 100;
			textfield.y = 100;
			textfield.width = 216;
			textfield.border = true;
			textfield.type = "input";
			textfield.multiline = true;
			textfield.wordWrap = true;
			textfield.selectable = true;
			textfield.addEventListener(KeyboardEvent.KEY_DOWN, textfieldKeyDownHandler);
			return textfield;
		}
I have looked on various sites and blogs but I have not come across this issue and I don't understand where i am going wrong here.

Any help would be appreciated.
Regards,
-Ben
BeanoEFC is offline   Reply With Quote
Old 09-09-2011, 05:10 PM   #2
iSynapps
print4dummies
 
iSynapps's Avatar
 
Join Date: Dec 2010
Location: Germany
Posts: 97
Send a message via Skype™ to iSynapps
Default

Try adding a textfield.setFocus(); to make sure it has focus before listening the KeyboardEvent.
__________________
Need a free business card design?
http://print4dummies.com/?url=produc...RlIDMuNXgyaW4=
iSynapps is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:31 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.