ActionScript 2.0 :: TextField.onSetFocus() And TabIndex?
Apr 18, 2007
I have a form with numerous input boxes. I've set tab orders to tab through the fields. In this scenario, I actually LIKE the edge highlight that appears around the textField when tabbing through them. However, this dissappears for any textFiled that I placed an onSetFocus event
View 1 Replies
Similar Posts:
Aug 9, 2010
I'm having an issue where the browser will not tab to a dynamic text region. If I change the region to input, the tab works fine, but I don't want users to change the text in the region. It is just meant to be read aloud by screen readers.
View 2 Replies
Jul 27, 2007
AS2, from an email form for my website:
instance: from_txt, var: from
the onKillFocus part works great, the onSetFocus does not. The input text has "your name here" typed in to begin with.
from_txt.onSetFocus = function() {
if (from == "your name here") {
from = "";
}
};
[code]....
View 2 Replies
Apr 14, 2004
I'm making a form and i want to set a backgroundColor for the textfields onSetFocus and that the backgroundColors dissapear again onKillFocus. So far I have this code
[Code]...
View 4 Replies
Jul 29, 2006
I'm absolutely and completely dumbfounded by this problem...
Code:
target.txtField.onSetFocus = function() {
trace(inputText.getFieldText()); // custom function, outputs a string (ex. "name")
if (this.text == inputText.getFieldText()) {
this IF statement runs through fine
this.text = ""; // won't work, no matter if I set it to empy or anything...
}
}
I'm probably doing something very stupid here... but I can't figure out what. I've done my research, gone over examples online and in books, still not working. The text field goes blank, but I cannot type into it, and it loses focus (if I try using Selection.setFocus(this); it doesn't work).
View 2 Replies
Apr 14, 2004
I'm making a form and i want to set a backgroundColor for the textfields onSetFocus and that the backgroundColors dissapear again onKillFocus. So far I have this code
Code:
naam.onSetFocus = function(){
this.background = true;
this.backgroundColor = 0xdddddd;[code]....
but to me it seems that there must be a way to combine all this lines of code into one single function or at least two one for the setFocus and one for the killFocus.
View 4 Replies
Mar 30, 2011
I have a text box which I want to display a certain text on it when it loads, say, "demotext", for example. However, I want it to clear that text when the user clicks on it and then only displays stars when they type (as if it has turned into a password box when they clicked on it). So far I only have this:
ActionScript Code:
cancelcount.onSetFocus = function() {
cancelcount.text = "";
[code].....
View 3 Replies
Apr 30, 2009
I have a main swf and some nav items which load in external swfs. This all works but it needs to be accessible. No problem. I created a set of alt nav buttons for tabbing. This works. what doesn't work is when an external swf is loaded in I can't the extranal swf to get the focus. It just stays on the buttons on the main swf.For buttons on the main swf I have set the tabIndex and in the external swf those buttons have their tabIndex's set and all are unique numerically.
View 1 Replies
Mar 10, 2011
Does anyone know if there is a way to set focus to the next item in the tabIndex? So for example (in psuedo code): stage.focus = whatever the next item in the tabIndex is
Maybe something like tabIndex.next? I know this doesn't work because I already tried it, but maybe something like it?
View 2 Replies
Oct 11, 2011
how to set the tabIndex for the RadioButton of a same group.
View 5 Replies
Mar 10, 2011
if there is a way to set focus to the next item in the tabIndex? So for example (in psuedo code): stage.focus = whatever the next item in the tabIndex is
Maybe something like tabIndex.next? I know this doesn't work because I already tried it, but maybe something like it?
I have a series of dynamically generated textfield boxes that form a grid and I want users to enter a single character and then have the focus change to the next box. I have had all kinds of issues trying to reference the next textfield using the instance name I gave them when they are generated, so I thought if there was a way to just automatically go to the next item in the tabindex, that would be perfect.
View 0 Replies
Dec 1, 2004
I have a login system set up in flash where people enter an email and password. Hence,there's two text fields and a submit button.This submit button responds to the Enter key on the keyboard.The problem is that if I define those two textfields with tabIndex, the submit button does not respond to the enter key anymore.
View 2 Replies
Jul 27, 2010
I'm trying to add tabIndexing to a dynamically-created form, with a SEND button on the end that is constructed from a custom button class that extends Sprite.
For some reason, the tabIndex gets stuck on this button no matter what I do. If I disable it -- and enable it only for the TextFields -- it works fine, cycling through all of the TextFields endlessly. But as soon as I give this custom button Sprite a tabIndex value, it will highlight that button just fine in the order I tell it, but I can no longer tab or shift-tab to get off of the button again; it remains stuck there unless I use the mouse to click somewhere else and start over.
In an attempt to eliminate any variables, I threw this code together -- essentially the same thing I'm trying to do -- and it gets stuck with this code as well[code]....
View 8 Replies
Dec 23, 2004
I have several input text fields in flash. For instance, email and password to login. I also have a button that responds to the Enter key (to submit the data). Everything works perfectly until I use the tabIndex property in ActionScript. The moment I define those 2 text fields as tab Indexes the Enter Key does not execute the submit button. I can only click the button with the mouse.
I have:
userName.tabIndex=1;
password.tabIndex=2;
Where userName and password are the text field names. TabIndex works then but not the Enter key. It's only one or the other. How can I make Tabindex and Enter key Compatible?
View 1 Replies
Jul 20, 2010
iam giving tabindex order. some swf file loading runtime than can i change tabIndex order
View 1 Replies
Feb 17, 2011
I have a contact form on my site for which the text inputs are created via AS2. This works fine but I cannot get the tabbing to work (or even have any effect) no matter what I do. I have a menu that sometimes displays at the top, sometimes on the left and sometimes at the bottom. If it's at the top or bottom then the form tabbing works fine, however if it's down the side then when i tab from contact_namefield it goes to the 8th menu option, then the 9th menu option, then contact_emailfield then contact_messagefield.Similarly if i tab from the top of the menu it's goes down sequentially to menu option 7, then to contact_namefield, then menu option 8, then menu option 9 then contact_emailfield then contact_messagefield.
I cannot for the life of me work out how to change this, I would rather avoid setting tabenabled=false for every other element on the page (as i'd still like these to be tabbed), but either way I don't think this will fix it as the tabindexes i've specified seem to be having no affect at all, no matter what values i put in (even if i reverse them) the tab order is always exactly the same. I am using the following code and would be so grateful if anyone could point out what i'm doing wrong as I can't for the life of me figure it out!
var currfont=_root.textfont;
var inputcol = "0x" + _root.textcolour;var my_fmt:TextFormat = new TextFormat();my_fmt.bold = false;my_fmt.font = "Arial";my_fmt.color = inputcol;
[code].....
View 1 Replies
Jun 25, 2009
I feel like I'm missing something really simple here. I'm loading a AS3 swf containing a form (created by one of our designers) into a flex app. The swf's tabIndex properties work fine when the swf is viewed by itself, however, once it's loaded into the flex app:
<mx:SWFLoader source="form.swf" top="20" horizontalCenter="0" id="formSwf" complete="swfCompleteHandler(event)"/>
the form fields stop receiving focus on tab. I've been looking at the FocusManager in flex, for some sort of solution, but I can't seem to find any examples, and I'm not entirely sure I'm looking in the right place. Am I stuck redoing this form in flex?
View 2 Replies
Dec 5, 2009
I have some numericstepper in my movie, I given the tabindex for all numstepper, Its working fine with pressing TAB key, but I need this event also work even if I press "SPACE" key.
View 2 Replies
Apr 9, 2010
I have set up a Qwerty keyboard within a swf using duplicateMovieClip() - all works fine. If I have no tabbing whatsoever then I can use the tab key to randomly jump all over the keyboard.
But I would like it to tab in an order. Other buttons at the _root level are tabbing fine but these dynamically created ones are not doing a thing.
The keyboard buttons are created within a movieclip called mcContent which is sat at the _root level, anything within this mc is usually referenced by mcContent. or _level0.mcContent. (if it is being really fussy).
I have an instructions button - if this is NOT included in the tabIndex then the tabbing will work on the keyboard, erratically, but it at least goes there. As soon as I set _root.mcInstructionsBtn.tabIndex = 1; then nothing but the _root level buttons work
I have tried to add the tabIndex when creating the movieclips but this has not worked either. I have tried to set the tabIndex in a copy version where the keyboard buttons are created at the _root level and it functions exactly the same.
View 1 Replies
Jun 17, 2010
I have a challenge in a flash movie with TabIndex that involves some pretty comprehensive keyboard functionality and have solved the problem but the client is not madly happy with the solution. Problem is I don't know whether there is another way of solving it.
I've built a app the allows the user to upload a picture and manipulate it using marker placement. You can either drag the markers with the mouse or using tabIndex can tab through them then, once highlighted, you can move each marker up, down, left and right using the WASD keys.
I thought this was a nice solution since gamers are familiar with WASD to move directionally, however the client wants to use the arrow keys for this function. The problem resides in the fact that within the tabindex the arrow keys act in the same way as the tab, in that they tab forward or back through the index.
Client suggest tabbing to marker, clicking ENTER to disable tabbing, using the arrows to move the marker, then clicking ENTER again to re-enable the tabbing, move to the next marker, click ENTER to disable... etc etc.
View 0 Replies
Feb 29, 2012
I've got a problem with following example code in flex:
Test.mxml:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" [code]..........
When I start the application and press Tab to cycle through controls, the focus jumps to the first text box, then to the first radio button of the first TestComponent, and then directly to the last textbox missing the second and the third TestComponents.
UPD: Explicitely setting tabIndex does not work either:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"[code]...............
View 3 Replies
Oct 3, 2011
I have a button with a tabIndex. The button contains a textfield.When I click on the edge of the button and hit tab, the next item is correctly focussed.But when I click on the textfield (non-editable,not tab-enabled, no tabindex), and then hit tab, it focusses on the first object on the page, even though the parents focusIn function is triggered, in which I'm setting the focus to the parent object[code]...
View 1 Replies
Dec 1, 2004
I have a login system set up in flash where people enter an email and password. Hence, there's two text fields and a submit button. This submit button responds to the Enter key on the keyboard. The problem is that if I define those two textfields with tabIndex, the submit button does not respond to the enter key anymore. Do I need to use listeners to fix this somehow?
View 2 Replies
Oct 5, 2011
I parse an xml file that his content is:
Code:
<?xml version="1.0" encoding="utf-8"?>
<operators>
<operator><name>OPerator1 </name></operator>
[Code].....
I display the name of operator in a TextField after parsing the xml file my problem is to loop through this different TextField with a fade effect.
View 0 Replies
Dec 21, 2005
how can i make a movieclip and a textfield to resize to the content of the text in the textfield? I mean, if I have a textfield with 3 letters font name XXX and then the content of the field change, how can i resize te textfield so the text dont autoadjust to the 3 letter space?
View 3 Replies
Jun 18, 2008
Does anyone know, why a textfield may become white when loading text + JPGs into it? Sometimes it happens to me, sometimes not. I haven't figured out why. If you have any clues... The AS I'm using:
[Code]...
View 3 Replies
May 5, 2010
I am looking to change the background color of a input textField when the user selects that testfield to start populating it. I have done a bunch of searching and I keep coming up with this type of answer...
Code:
myTextField.onSetFocus = Set(evt:Event){
// Change color
}
Problems...
1) Is onSetFocus/onKillFocus still available? From what I can tell it is not.
2) I have my text objects encapsulasted in a class so I do not believe I am able to do it like I have been suggested.
View 2 Replies
Jun 2, 2009
I'm using the following to remove a textFeild from the stage I then need to add this textField back to the stage at a later time....i tried using addChild the problem is the text that was in the text field prior to the removal is still in the textfield when i re add it......How do i remove the textfield and replace it with a fresh textfield at a later time?....using msgTa.text =""; is not an option.
View 4 Replies
Dec 12, 2010
I just recently started playing with cs5 and it's new features. I tried to rotate a textfield with the 3D rotation tool, but when you do this, the textfields gets blurry.And it seems like it's not a vector text anymore, because when you zoom in, it still is blurry.Is there a way to prevent that?
View 5 Replies
Jun 14, 2011
i would just like to ask why is the case that when i use embedfonts = true on a textfield, the textfield's text only resizes according to the textfield's height but not the textfield's width. meaning if i make the textfield's height bigger, the text also gets bigger in terms of height, but not width, can't the embedded font maintain aspect ratio according to the textfield height?
I'm only wondering about this because this is not the case when embedfonts= false
View 1 Replies