Prevent Character Entering In Text Box
i click the numerical characters only in my flash mx however when i fun the program it still lets me enter characters not just numbers, is there any actionscripting that will solve this problem?
FlashKit > Flash Help > Flash Newbies
Posted on: 05-09-2003, 07:44 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
How Do I Prevent Users Entering More Than 3 Lines To An Input Texfield?
Hiya, thanks for checking my post out. I have an input textfield where users can enter information over three lines. I have set a maximum chars property of the number of characters for the 3 lines but the user can still enter more than 3 lines of text if they press enter.
Is there a way i can limit the entry into the box to 3 lines without splitting it into 3 single line text boxes?
Thanks for your suggestions in advance
Schm,
Input Text Fields Colours To Fade In And Out On Entering Text?
I am uploading a file with input text field that changes colour when you click in it - this is great, but what if i wanted the following:
in the initial state, the text box is grey as you can see, but when i click inside it, it fades to pink instead of suddenly just changing to pink. And likewise, when i click outside the box it fades back to grey.
You will see what i mean if you view the file.
it's mx not mx2004
Thanks.
How To Call A .swf After Entering Text...
Hello all,
What I am trying to do is...
I have an input field that I want the user to be able to type in a 6 digit number (112233). After this I want them to press a button and have it open up another .swf (112233.swf) into level_10 of the same movie. I am more of a designer and I am having problems coding this. I have had some other suggestions but could not get them to work. I had this on the button but couldn't get it to call anything:
[as]
on(release){
myPath=bandFolder + "/intro.swf";
loadMovieNum(myPath,10);
}
[as]
"The code above will work only if each and every band folder has a file named intro.swf in it. It could be any other name, of course, the point is to have them all be the same, so you know which filename to put into myPath."
I need help setting up the button to work with the text that is inputted into the text field.
Does anyone see how to make this work?
Thanks.....tg
Entering Text Into An Array From A Form
Hiya
I'm still working on the "wheel of fortune" game. I've managed to set up an array of "name1, name2, name3..." in actionscript (thanks to nunomira ) and then depending on how many entries there are the circle splits into that many segments, and displays the name.
Is there a way I can create a form so that you can enter the names directly onto the stage rather than going into the coding? I've set up 'input text' boxes that allow you to type into them but I need them to connect to the array.
I've tried various things with the instance names of the boxes...any ideas??
Thanks so much!
Text Boxes And Entering Values
Hi there,
I am just messing about and creating a little quiz thing for a friend of mine.
I'm using some text boxes and asking the person to type yes or no in there and then clicking on a button which takes you to the next frame.
Thing I'd like to happen is that if my mate doesn't enter the word 'yes' or enters the word 'no' the movie can't go to the next frame.
I've got an idea that I need to assign a name in the 'Properties' box to each text box and then somehow or other if the value entered in that box doesn't match 'Yes' maybe a dialogue box needs to appear from somewhere.
Am I even close or am I talking complete nonsense? What would be even better would be a couple of check boxes with the correct one having to be checked before the movie can move to the next frame via a button.
Thanks for any help in advance.
Molenski
Tabing To Next Text Filed For Entering Data?
Hello, I Have two text fileds : UserFirstName and UserLastName. I would like to be able to press tab and make move the cursor go from one to the other. So far I have tried the below code, which does not work
on (keyPress "<Tab>") {
if (Selection.getFocus() == "_root.Main.D1netToolKitLinks.EmployeeLocatorSub.S earchByNameMovie.UserfirstName") {
Selection.setFocus("_root.Main.D1netToolKitLinks.E mployeeLocatorSub.SearchByNameMovie.UserLastName") ;
}
}
Any help
Thanks
Set RBG Color By Entering It In An Input Text Thing
Hey I'm trying to make it so that you can set the rbg color of a square in another movie clip by entering it into an imput text thing and pressing enter. Anyone know how to do this? An example would be great
Entering In A Code With Input Text To Go To Another Point
I've seen something done before, where you type in a certain code and it takes you to another point e.g.
have a code enter on a computer to get in a door
you type in something with input text and then hit a button and if you type the right thing it goes to the bit when the door is open. I'd really like to know how to do this. If you can help i'd appreciate your time.
Entering Inputted Text By Pressing ENTER
Hi i'm very new to programming and even newer to ActionScript
Firstly I'll explain what i'm doing. I have two text boxes (one 'Input', one 'Dynamic') with one button. The user types something in the first box (Input), presses a button, then it appears in the other box (Dynamic). I have set a variable to catch this information called 'username'. Heres the code for the boxes and button:
on(press) {
username = username_txt.text;
message_txt.text = message_txt.text + newline + "Name: " + username ;
}
on(release) {
username_txt.text = ""
}
This is all good and works fine on button press, but ideally I would like it to work also when the user presses 'Enter' on their keyboard after typing the information in the first text box. I know this is going to be very simple, but I just can't work it out. Thanks in advance,
Billy Jo xx
Preventing People From Entering Decimals In Input Text Fields?
Is there a way to prevent certain characters from being typed into input text fields?
I click on the "Include outlines for numbers" button for the text field properties, but I can still type in alpha and punctuation characters.
If it is not possible to prevent them from typing it in, does anyone know of a script that can recognize that a field has a decimal in it when a button is clicked allowing for an "if..then" statement to cure the problem?
thanks for any help.
Edit:
Well, I realized that the "Include outlines for numbers" is the answer to my problem, but it does not seem to be functioning properly in my particular case.. hmm oh well.. if I can't solve the problem, I wrote this nifty little script to rape the problem in the ahem....
on (release) {
if (qty > math.floor(qty)) {
qty = math.floor(qty)
}
}
that works!!
[Edited by Sintwar on 10-22-2001 at 03:18 PM]
Text Field For Entering Emaill Address And Submit Button
Can anyone tell me a straight forward way to create a text field (where a user can enter an email address). Then, to the right of the text field would be a button that says "Sign me up!" . Then the user hits this button and an email is sent.
Entering Text Into A Text Box From Key Press
Hi!
I am very close to completing my project, which is a ringtone composer for nokia mobile phones. I have a piano, where people can compose their tunes. The next stage is for when the particular duration is selected and the piano key pressed it enters a specific text into a text box (i will work out what the text is).
so pressing the C note in 1/1 duration will output "123" into the text box,
pressing the C note in 1/2 duration will output "456" into the text box and so on....
Here is an image of the piano i have made, so far :
http://www.flickr.com/photos/34235716@N00/
And here is the file itself :
http://s37.yousendit.com/d.aspx?id=3...X295A3259YAMWO
Any help, or advice will be warmly appreciated. Let me know if i haven't explained it clearly enough.
~angrymice
Prevent Text Copying
Probably a simple question.
I have text over a movie clip. I'd like the movie clip to show as buttonMode=true on rollover. Easy enough in itself, but the text switches the cursor to the text input cursor.
Isn't there a property of a text field you can set true or false to prevent this? I thought it had to do with disabling text copying, but I can't find a property that does this.
How To Prevent 'text Highlighting' In Scroll Box?
Hi Everyone -
This probably has a simple solution but since I'm teaching myself from scratch, easy things aren't necc so easy.
I've created a text area with a scroll-bar on this site:
http://www.theodorekaye.com/pamirtxt.html
I want to turn off the highlight/cut-paste options so that readers can't lift what I've written from the site.
Any suggestions or help would be much appreciated.
Cheers
Is Ther A Way To Prevent Html Text Input ?
Hi,
I'm working on a guest book and the text fields I use for it have to be in HTML.
But I don't want the users to be able to put HTML tags in the input fields,so that there is no problem with for example: <FONT COLOR ="#FF0000"><FONT SIZE = "100"> hello BOZO </FONT><FONT COLOR ="#000000"> input possible
How Do I Prevent Double Spacing In Dynamic Text?
What am I doing wrong? I have tried using html tags to format my text but the tags just appear in the text. I need to get rid of the double spacing.
(Probably a silly question but I have searched through the forums and couldn't find an answer. )
Thanks for any help!
Madeleine
[CS3] Prevent Word Breaks In Dynamic Text Box
I am working with arabic text that is being pulled in from xml into dynamically created text boxes, the only issue is:
when the text is wrapped to the next line, words are being "split" or "broken" in two, making no sense to the reader. is there a way to test if a word is being broken and then force the whole word to the next line?
I have messed with searching for spaces and amount of characters on a line, but the results have been multiple breaks happening : ie text looking like this:
hello how are
you
doing?
any thoughts on this?
IMS
Textfield - Prevent Select Text Scrolling
Hi,
I´m using AS2:
Code:
var txt:TextField = container.createTextField("txt", 0, 0, 0, 290, 20);
txt.embedFonts = true;
txt.autoSize = "left";
txt.multiline = true;
txt.wordWrap = true;
txt.condenseWhite = true;
txt.selectable = true;
txt.html = true;
txt.mouseWheelEnabled = false;
txt.htmlText = //some html text here
I need my text to be selectable, but when I select it (from top to bottom),
my text scrolls 1 line, hiding the first line...
How do I prevent that from happening?
The only way I know is to set selectable = false, but I need it to be true.
Thanks in advance!
Substring Searching Text Prevent Finding Duplicates
I have a function that sends a search term, xmllist & content to be searched with indexes at end of each line to represent item in xmllist. the function then outputs and xmllist of the found nodes that have the search term in them however if the the text in the node has two words or more words that are the same it will add that node however many times that word appears.
How do I prevent this. I have attached the code.
Code:
function searchStringInAttribute(list:XMLList, attributelist:String, term:String):XMLList {
var output:XMLList = new XMLList();
//trace("ALIST {" + attributelist + " } ALIST End " + "
");
var i:Number = 0;
var pos:Number = 0;
var index:int = 0;
var count:int = 0;
while (i > -1) {
pos = attributelist.indexOf(term, i);
if (pos > -1) {
index = int( attributelist.substring(attributelist.indexOf("<", pos)+1, attributelist.indexOf(">", pos)) );
output[count] = list[index];
count++;
i = pos+term.length;
} else {
i = pos;
}
}
return output;
}
Input Text Field- How To Prevent HTML Formatting
Hi
I am trying to create an input text field which does not insert HTML formatting to whatever the viewer types in it. For example, if the viewer puts the text "hello" into the text box, the value of the box should not be
<p align="left"><font face="Times" size="18" color="#000000" letterSpacing="0.000000" kerning="1">hello</font></p>
but just "hello"
I have unchecked that "allow html formatting" button on the properties bar
but it still inserts those tags. What am I doing wrong?
in the attached example, you should see the problem demonstrated - if you click on the button, it traces the value of the input text box. I would like that to be simply "hello" without all the html tags.
Thanks!
Substring Searching Text Prevent Finding Duplicates
have a function that sends a search term, xmllist & content to be searched (with indexes at end of each line to represent item in xmllist). the function then outputs and xmllist of the found nodes that have the search term in them however if the the text in the node has two or more words that are the same it will add that node however many times that word appears.
How do I prevent this. I have attached the code.
Code:
function searchStringInAttribute(list:XMLList, attributelist:String, term:String):XMLList {
var output:XMLList = new XMLList();
var i:Number = 0;
var pos:Number = 0;
var index:int = 0;
var count:int = 0;
while (i > -1) {
pos = attributelist.indexOf(term, i);
if (pos > -1) {
index = int( attributelist.substring(attributelist.indexOf("<", pos)+1, attributelist.indexOf(">", pos)) );
output[count] = list[index];
count++;
i = pos+term.length;
} else {
i = pos;
}
}
return output;
}
How To Prevent People Asking How To Prevent "click To Activate And Use This Control"
When I visit the fourms, I keep seeing these questions about how to disable
"click to activate and use this control". Its really annoying and
disrupting my web experience. I do know this really this is a blatant
attack on Adobe and Flash by Microsoft and is obviously related to the Adobe
takeover of Macromedia, and probably also related to the fact that it is now
impossible for anyone to install Flash Player (which Adobe is ignoring
because their support is so useless since the takeover). Is there something
I can do to prevent these questions being posted? I've searched all the
forums and cannot find any information. Surely someone else has had this
problem.
--
Jeckyl
Input Text Character Help
How do I limit an input text field to support only a few characters? I can't seem to embed the characters properly.
Text File Character <
How can I remove the special handling characteristic for the less than sign <?
IOW, I'm trying to display a < sign as a less than sign inside a text file pulled in using loadvariables. I've tried the hex rep %3C but that causes everything after that to disappear. %3E works fine. If I use them both in tandem flash treats them like a legit html tag which I don't want to happen either. I simply want flash to display the < whatever > in my textfield...
Many thanks in advance...!
Adding Character To Another Text Box
Hello all. I've searched high and low on these forums to the solution to my problem with no luck.
What I want to do is specificly target a character from one dynamic text box, say character in position 401 and then place it in another dynamic text box.
This must be possible.
Adding Character To Another Text Box
Hello all. I've searched high and low on these forums to the solution to my problem with no luck.
What I want to do is specificly target a character from one dynamic text box, say character in position 401 and then place it in another dynamic text box.
This must be possible.
Deleting A Character From A Text Box
Im making a "Key Board" SWF that is some buttons representing a PC's Key board that "types" to a textbox and the only fuction I cant think of how to do is how to delete text once it is put in "backspace button"
does anyone know how to do this?
Thanks in advance
Mark
[F8] How Many Character In My Text Field?
How do I find out or read, how many character in my text field?
Which is brought in byXML?
so that I could make an IF statement with.
ie.
if (this many characters) {
do this;
}else{
Something else
}
Pretty simple. I wish!!!
Adding Character To Another Text Box
Hello all. I've searched high and low on these forums to the solution to my problem with no luck.
What I want to do is specificly target a character from one dynamic text box, say character in position 401 and then place it in another dynamic text box.
This must be possible.
How To Insert Dot Character Between Text
Plz have You an idea how to insert dot character between text?
Example:
I have text in dyn. txt: 1000000000
I would like to have: 1.000.000.000
Thanks for ideas
Changing Colour Of A Character In A Text Box
Having large probs with this!!
What I am doing is reading the letter key pressed by the user from the keyboard:-
getMyKey = function (localVariable) {
pressed = Key.getCode();
if (pressed>=65 and pressed<=90) {
_root.pressed = _root.pressed + letterkeys[pressed-65];
letterkeys is an array holding all letters.
pressed is the variable of a dynamic text box.
I am displaying the letters the user is to type on the screen, if they type the right letter I want this letter to be green if not letter red and displayed to the user in the text box so screen would look like:-
letters to type:- sss lll sl ls sl sl sss lll
Letters typed:- sls sss sl ls sl sl sss lls (These letters in either red or green)
Please help driving me mad!!!
How Can You Focus After The Last Character In Input Text?
ok
im trying to set focus to an input text field
but i do not want to "highlight" the text
cause i need the color to remain green (00ff00)
so is there a way to set focus after the last character typed in by the user?
keeping in mind that the number of characters will vary from time to time
(might be 5 or 50 characters entered)
please let me know if this does not make sense
thanks a lot and free for all that help the capn
later
-c
' Character In HTML Dynamic Text Box
Hello,
Im working on a site, all content is going to be defined by variables to save me a large amount of work. My dyanmic text box has HTML formating enabled, but in my text where ever there is an 'it just shows up as a square.
Anyone know how to fix this?
-Mike
Replace A Character In A Text String
Hi,
I have a text string and i want to replace a char in it. I find the char but i don`t know how to change it.
For example the text string is "Axristos" and i want to change the letter "A" with the letter "B". Is there any way to do that?
I just want the script of changing, not the function to find the letter.
I can create a new text string with the old one and changing just that letter but i want something easier and less complex(if there is something)
Dynamic Text And Character Spacing
Hi there,
Is it all possible to reduce the character spacing in dynamic text? I have some dynamic text fields displaying the date etc and the letter spacing needs to be tighter. Any ideas?
Thanx
Dynamic Text Character Spacing
I am not sure how to control the character spacing when a text box is dynamic. Has anyone found how to make this work?
Thanks so much!
Brian.
Dynamic Text Character Spacing
I am not sure how to control the character spacing when a text box is dynamic. Has anyone found how to make this work?
Thanks so much!
Brian.
Character Spacing In Dynamic Text
Is there a way to use character spacing in dynamic text? You can use it with static text it's an option drop down on the properties dialog box, but I can't find a way to use it with dynamic text.
If there is for some very stupid reason you can't is there a way around it.
Thanks
Last Character In Dynamic Text Field
Hi
The last character in dynamic (HTML)textfield does not show the Hand cursor.Any solution for this. Or is it a flash bug ie. can't avoid.
dm_txt.html=true;
dm_txt.htmlText = "<AHREF='asfunction:myFunction'><fontcolor='#FF000 0'>"+"MyText"+"</font></a>";
Thanks
Text Field Character Restrictions
I have a text field that needs to only accept integers (0-9, no decimals), but since I have other text fields that accept letters, this one does, too.
Is there a way to restrict the character set for a particular text field?
Thanks,
Mark W
Special Text Character In ActionScript
Hi there....I'm trying to use a couple funny characters in the values for variables in ActionScript. For example, let's say I want to use the word "resume". How do I get the "é" to show properly in action script?
Code:
printVariable = "resume";
Thanks!
Search Text Field For Certain Character?
Hello!
My mission is to do some kind of textfield validation, IF there's a character from a-z AFTER a "."-character, you will get to the next page, and if a character from a-z is missing, a warning text will appear. How to get to the next page and how to show the warning text is already solved.
The thing I need help with is to search the textfield-content for a "." character and then search if there's a character from a-z AFTER it.
( My first thought is to break the content in the textfield into an array and then search the array for a "." and then use that number in substring.
The problem with that is that I cant do that in practice )
Thanks for any answers!
Dynamic Text - Character Support ?
I'm getting dynamic text texts from external XML.
Language is turkish.
The turkish characters are not displayed properly.
What do I have to do, to get them displayed properly ?
|