ActionScript 2.0 :: Disable ENTER Key In Textfields?
Aug 16, 2004
I have several "field types" such as Radios and Checks, but I also have a field type of my own called "multiVal".The purpose of the field is to allow the user to enter several values in one field, by pressing the Enter key. For this, I'm using a textArea component.I already wrote the code for the dynamic sizing of the textArea, and the Key Listeners, and it all works fine. My only problem is when the user presses&holds the ENTER key in the text field, because while my functions only count it as one press, the field itself is field with several line breaks.I am NOT interested in making it the other way around (having the function to add several "values" as long as the key is down). My GUI's specifications require that it only adds a SINGLE entry per key press.
I know I can probobly get around this by diving into the UIObject class, or textField class, but I'd really like to find a more effecient way than this.
View 1 Replies
Similar Posts:
Feb 13, 2008
Is there a way to disable scrolling on textfields? We are having a reoccuring problem where textfields that schouldn't be scrollable still scroll for 1 line.
View 9 Replies
Feb 13, 2008
Is there a way to disable scrolling on textfields?We are having a reoccuring problem where textfields that schouldn't be scrollable still scroll for 1 line.You can see ALL of the text in a textfield (nothing is hidden below the fold), but when you click and drag, the text field scrolls up one line. This looks really sloppy but we can't find a fix.It seems that flash autosize makes the textfield a few pixels too short.I've tried every variation I can and looked through the as docs with no luck.
View 14 Replies
Nov 27, 2009
Is there anyway to disable the movie from playing when I hit Enter? I've got a button press later on that needs Key.ENTERI could change it, but it is the only key that makes contextual sense.
View 1 Replies
Apr 17, 2005
Me and my friends have done a game and when we export it you can scroll through the whole game by pressing Ctrl + Enter. How can we block Ctrl+Enter from skipping frames?
View 13 Replies
Nov 8, 2009
Is there anyway to disable the movie from playing when I hit Enter? I've got a button press later on that needs Key.ENTER. I could change it, but it is the only key that makes contextual sense.
View 1 Replies
Apr 17, 2005
Me and my friends have done a game and when we export it you can scroll through the whole game by pressing Ctrl + Enter.So my question i simple: How can we block Ctrl+Enter from skipping frames??
View 14 Replies
Sep 3, 2010
How can i disable the text selection abilities and such of flash TextFields (so they act like labels)?
View 1 Replies
Mar 12, 2004
does anyone know how to disable user from using keys like enter , and . or also zoom in ands out function
View 3 Replies
Mar 12, 2004
does anyone know how to disable user from using keys like enter , and . or also zoom in ands out function
View 3 Replies
Aug 19, 2006
How on earth do you restrict "ENTER/CARRIAGE RETURN" key ASCII 13 on input textfields?
View 5 Replies
Jun 23, 2011
When my focus is inside the input text field, pressing CTRL+ENTER works but ENTER does not.Pressing Enter when my focus is anywhere BUT the input text field works just fine..My intention is to detect if ENTER key was pressed after the user fills out the field, but it seems to only work for CTRL+ENTER
ActionScript 3:
// works:
stage.addEventListener(KeyboardEvent.KEY_DOWN, enterHandler);
// ignored:
email.addEventListener(KeyboardEvent.KEY_DOWN, enterHandler);
[code]....
ENTER results in charCode == 0, whereas CTRL+ENTER is charCode == 13 email was created using the Text tool and set to "Editable"
Note: I am testing in Chrome and Firefox running Flash v10
View 1 Replies
Aug 20, 2007
I'm creating a Flash instant messaging application (through XMPP protocol) and run into a problem. It isn't that important but I was quite upset that I wasn't able to solve it and I want to know if their is a solution =D
I have a TextArea chat input and a button to send the text, the TextArea is multiline and so captures the Enter key to jump one line... What I need is to send the message with the Enter key and jump with a Ctrl+Enter combination... My ideas were to disable the bubbling of the Enter key, trap it, and then manually assign the Ctrl+Enter combination to jumping the line in TextArea but couldn't find how to do all this...
View 3 Replies
Jun 3, 2009
I want to create two textfields in flash wich will move the text simultaniously by using one scrollbar. for example. the left textfield contains text and the right textfield contains pictures. and the scrollbar is in the middle.
View 1 Replies
Feb 8, 2009
What I want to happen is..when you click on a button ('Bengkulu' for example), the movie should go to and stop at frame 63 , whilst the textfield (my_text) should display 'This is a delightful place in Sumatra'. However, the <Data> node's text won't display. Why?
[Code]...
View 0 Replies
Mar 3, 2010
I got two textfields on top of each other, with different sizes. When I push button_1 I want text in textfield_1 and when I push button_2 text in textfield_2.
That works but now I got links in both textfields and the the links in textfield_2 are not working because textfield_1 is on top of him. Can I swap the the arrangement ? I tried the swapDepths but this doesn't work for me Maybe I can disable textfield_1 when I pusch button_2 ??
View 2 Replies
Apr 7, 2012
I am working on a data provider application for class and wanted to take it a step further for usability and add tabbing for navigation, but the tabIndex code I have below does nothing. I would like to tab between the buttons and the textfields. Does tabbing work with data providers?
[Code]...
View 1 Replies
Sep 18, 2009
I should note they are all embedding the desired fonts. But when displaying my flash movie in low quality my text fields no longer appear... changing back to high quality the text fields appear fine.Is there a way to ensure the textfields will appear even at low quality? And what is the reason for them no longer rendering at low quality?
View 1 Replies
Jan 12, 2010
I've imported an external XML file that includes both image and text elements into a textfield, and now I want to format the elements with an external CSS.I've had only limited success. Images appear below the text, instead of inline or aligned Left or Right, Flash ignores DIV or SPAN styles, etc.I don't know if I'm overestimating flash's abilities to render styles.I've attached a zip with the fla and all external scripts, as well as an html of what I'd like the end result to look like.
View 5 Replies
Nov 11, 2010
I've recently been trying to rebuild a project we did at work so that we'd have a better and more flexible architecture for future projects. So far all is done, and work great, but I've been wanting to make the text we use (and we use a lot) easier to modify, so I thought having it outside my Flash/ActionScript files would do it. That way, I can change the text and have it working without having to recompile.
Unfortunatly, I've noticed that having the text in a .txt file puts random linebreaks which I really don't like, but XML severely limits what characters we can put in our text (no " < and so on, unless I'm missing something). Not to mention linebreaks would/could be a pain in an XML.
So, I'm wondering if you guys would have any ideas on how to do this, or even tips on how to do it in an XML or txt file that would work.
View 2 Replies
May 9, 2011
Basicly I'm adding dynamicaly sprites and textfields, which i populate from xml, in for loop. I'm building sort of table, so for every sprite, I'm adding new data in textfields. I've loaded xml and passed data to 2 xmllists, both traced and doing fine... Later on I add data from xmllist to array which then I'm looping in for loop.
Problem is that from 1st xmllist, 6 out of 7 textfields are visible, 1 can't be found nowhere :/ from the 2nd xmllist only 1 out of 4 are visible...
I've tried everything, tracing them returns that they are visible, on good position, filled with text, contrasted color from background...
Code:
for(mojbroj=0;mojbroj < dohvatiosamih2;mojbroj++){
if(mojbroj%2){
lista.graphics.beginFill(0xdddddd);
[Code]....
View 0 Replies
Jun 9, 2004
Im trying to create loop which will creat 4 new textfields and will put text into each field. The variables are already definned. But i doens't seem to work
Code:
detail2 = "test2";
detail3 = "test3";
[code].....
View 1 Replies
Apr 4, 2006
I want to link two textfields, so that if the first one is fille the text continues in the second textfield. The text is loaded from a xml file. One option would be to use html tags so the text wraps around the picture, but as you'll see in the attached image, the picture has a border around it, so it will be hard for the client to update it.I know flashloaded has a component, but as far as I can see it only works for columns, in the past I had found another component that did what I want, but I can't seem to find it anymore, not on the net and not in my backups.
View 4 Replies
Jul 20, 2006
Basically I'm adding dynamicaly sprites and textfields, which i populate from xml, in for loop. I'm building sort of table, so for every sprite, I'm adding new data in textfields. I've loaded xml and passed data to 2 xmllists, both traced and doing fine... Later on I add data from xmllist to array which then I'm looping in for loop.
Problem is that from 1st xmllist, 6 out of 7 textfields are visible, 1 can't be found nowhere :/ from the 2nd xmllist only 1 out of 4 are visible...I've tried everything, tracing them returns that they are visible, on good position, filled with text, contrasted color from background...
PS: here is the part probably causing the problems..
for(mojbroj = 0; mojbroj < dohvatiosamih2; mojbroj++)
{
if(mojbroj % 2)
{
[code]....
View 7 Replies
May 1, 2007
Here's my code:
Code:
for (var i = 0; i<nTotalPics; i++) {
main.createEmptyMovieClip( "container"+i, i );
var container:MovieClip = main["container"+i];
container.createEmptyMovieClip( "pic"+i, i );
[code]....
First, if I add "trace (pic._name);" inside the onLoadInit function it outputs "pic3,pic2,pic1,pic0". Why does it show up in reverse order of the for-loop?
Second, is the "pic:MovieClip" in "mclListener.onLoadInit = function(pic:MovieClip)" pointing to the "pic" in "mcl.loadClip( astrImages[i], pic );"? If not, what is it pointing to? If it is, can I add another variable after "pic" so that I can pass it inside the onLoadInit function? Ultimately what I would like to do is create a textfield under each pic.
View 1 Replies
Sep 22, 2007
I'm having a problem with loading some xml from an external file into my swf. I'm trying to populate various dynamic text fields with the appropriate value. Eventually this will be used to make it possible to change the language used for them, by changing the xml path.Right now, everything seems to be in place, but I am not getting the actual value into my text field.[code]
View 6 Replies
May 21, 2008
I want to display a list of purchases with their name and price. I want the price aligned right and the item aligned left. Should I try to do it in two text fields and one scrollbar? Or should I put the two text fields in a movie clip and scroll the movie clip? The text is dynamic and I don't know how long the list will be.
View 1 Replies
Feb 12, 2009
I have a dynamically created MovieClip that contains both graphics-drawn elements and TextFields. When I set this MC's buttonMode to true the mouse will only change over the graphics-part of the MC although I have set the selectable-attribute of the TextField to false. I also tried adding a invisible Rectangle on top, but it didn't work either
View 2 Replies
Nov 17, 2009
I have at some point imported photoshop graphics into flash where some textfield have had quite a large linespacing.Now, when I create a new textfield it will inherit this linespacing and the properties box have no setting for cahnging itHow can I get rid of this!?Edit:Nevermind, I just copied around some other textfields without linespacing and it dissapeared. A bit strange though that there's no setting for it.
View 2 Replies
Jun 13, 2010
I have a bunch of dynamic textfields on the main timeline. Each has its own instance name t0, t1, t2 ... t25. This might sound stupid but how can I use a loop to put them into the array?This is my simple "non-loop" code
Code:
var lettersArray:Array = new Array();
lettersArray.push(t0);
lettersArray.push(t1);
lettersArray.push(t2);
//add the rest here
trace(lettersArray); //[object TextField],[object TextField],[object TextField]
View 2 Replies