ActionScript 2.0 :: Different Between OnSetFocus And OnKillFocus?
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
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
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
Feb 11, 2010
I have quite a weird problem..I have an input text field and AS written for it to change it's content with "onKillFocus" and "onSetFocus" functions.
The problem is that when I add a "MediaDisplay" component to the scene input text's "onKillFocus" and "onSetFocus" functions won't work and as well as some other problems apear..I've seen that for these 2 functions I have to export with flashplayer 8 and so it is.
[Code]...
View 2 Replies
Feb 23, 2006
I've almost finished a website I've been doing, but I still have 2 issues/bugs. - The first is the one that made me start this thread. I've isolated the problem and uploaded the .fla file (MX2004 - 7.2), with a simplified example. You can download it at [URL] (don't worry, this link has nothing to do with the website, LoL)
Description: The combobox instance in the preloader frame is there to avoid the rectborder problem. If you leave things that way, on Form1 you'll notice that you can't kill focus by clicking outside the input text boxes, because it immediately sets focus back (you can only change focus from one input box to another). Let's call this issue bug A.
If you delete the combobox instance located in the first frame (preloader), you will not have the kill focus issue anymore (after setting focus on one of the text boxes, you can now click outside and it will kill focus and stay that way). However, if you go towards the second form (the one with the combobox), you'll now notice a bug that was previously non-existent: the combobox border (I've set its colour to red to highlight the problem better) will remain there after you've selected one of the combobox's available options. Let's call it bug B. I know that second bug is known, and that was why I used that solution with the instance placement on the preloader frame.
[Code]...
View 2 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
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