IDE :: Dynamically Add Input Text Comp On Click?
Jan 3, 2010I would like users to be able to:
- add input textbox components on click
- limit the number of times they can do this
- limit the chars to x number
I would like users to be able to:
- add input textbox components on click
- limit the number of times they can do this
- limit the chars to x number
I was attempting to create a text box with a submit button, where, when the text box first appears, there is text inside the box itself, for example, "enter answer here". However, I would like to have the ability to automatically clear that text when the user clicks on the text box, rather than forcing them to clear it.I found this thread which seems like it should work, using FocusEvent http:[url]...... However,when I entered that into my code using the name of my own text field, neither of the functions is ever triggered by clicking on and then off the text box.I even entered a trace to make certain, and it isn't.Am I missing some key point?
View 2 RepliesI have a simple form with an input text field with text in it. I would like that text to disappear when a user clicks on the input field. How is this done in Actionscript 2.0?
view this page for the example: [URL]
I have many input text boxes, I want to do something when a user clicks on an input text box but I don't know how to detect which input text box got clicked?
View 2 RepliesIs there an event that is dispatched when a text input gets clicked (i.e. to add text), but not after text has been added, simply when it is clicked? It won't have changed, and text won't have been entered.
[Code]...
I have a problem with the input text. I have a empty input text box on the frame one. Its name is "w". Then i m waiting for user input to that box. When the user input a text, i want him to click the button (called "manage_s") which will take him to the frame 2 and show the result of his input. (basically its quering the server).
[Code]...
I have some input text boxes on a form. The text within those boxes is appearing in the top left, so looks kind of stupid. I thought this would be easy to correct by moving the text away from the edges with some coordinates something like in the following:[code]Unfortunately myTextBox.text is a string so won't allow x and y values to be applied to it. Can anyone tell me how I can use actionscript to move the text around within the Input text box?
View 3 RepliesI am attempting to clear text input fields on click and I can't seem to figure out what is going wrong with my coding.[code]...
But when I did, now every time I click the Name input field the Email input field clears as well and vice versa.
You've seen those Input Text Fields on web sites that have titles on them, i.e. Name, Email, Message, in the Text field itself. Then, when you click on the the text field to type something in, the "title" disappears and you can type your info in. Perfect example: [URL] (Under "contact")
View 14 Replies<fx:Script>
<![CDATA[
import mx.controls.*;
import mx.controls.TextInput;
import mx.events.ListEvent;
public function init():void {
[Code] .....
I have implemented this one. I am getting 5 textboxes with empty value, if I entered some value in each textbox then, I want to get specific 3rd textbox value wen some event trigger.
So, I'm making a text editor for my mobile (Nokia 5800). Anyway, I want it to have kinetic scrolling, but since I will be allowing the user to input their own text and also to load their own text files, how could I re-size both a dynamic text field and an input text field so that all of the text is shown, but there isn't alot of empty space (no one wants to kinetically scroll to the bottom just to realize it is 3000 lines of emptiness ).
I was thinking possibly finding the total number of characters in the string and deciding on a number of characters per line, then finding line height and making the text box be number of lines time line height. On problem with that is I'm not using a fixed with font (Quicksand Bold), so it would probably not work the best.
I'd like to set up my splash page (all Flash) so that the login form is ready and waiting for input, without the user having to move the pointer to the first input text field and then click it.
View 3 RepliesI am trying to validate for empty input text field on a button click.
mytext is a variable
inputvalue is variable name for the input text field
on (release) {
_root.mytext = _root.inputvalue;
[code].....
i have two text field, textfield1 and textfield2, and a button..
textfield 1 = inputtext
textfield2 = the output.
when i click the button it will save the text in textfield1 into the textfield2.
I have an issue with font scaling of a dynamic text box.
Currently i have one input box named input_1 with a variable attached to it named "choc_1".
Also, i have a dynamic text box named dynamic_1 with variable "choc_1".
When the user types something on the input box then the dynamic box changes instantly and displays what the user has written.
auto scale-size the fonts to a smaller size if the user types many letters.
The input_1 box has a 13 character limit. My initial font size is 200, i want to scale down so when the user types 10 letters they fit the box and they don't go out of screen. I want to use one line, so wrap or multiline is not possible.
here's a code that i'm trying to fix but i can't get the dynamic box to change:
[Code].....
I have an issue with font scaling of a dynamic text box.
Currently i have one input box named input_1 with a variable attached to it named "choc_1".
Also, i have a dynamic text box named dynamic_1 with variable "choc_1".
When the user types something on the input box then the dynamic box changes instantly and displays what the user has written.
I've googled a lot, but i can't find a solution to auto scale-size the fonts to a smaller size if the user types many letters.
The input_1 box has a 13 character limit. My initial font size is 200, i want to scale down so when the user types 10 letters they fit the box and they don't go out of screen. I want to use one line, so wrap or multiline is not possible.
here's a code that i'm trying to fix but i can't get the dynamic box to change:
[Code]....
I'm trying to extend the text input that comes in flex to support an icon, just like mac os x search text input has a grey circle aligned to the right, the text input has a addChild method, but it didn't work for me.
View 2 Repliesthe last of many problems, is that at the very end of the test, you're shown your score, and you have the option to type your name in a text box and click "save". Doing so will apply you score data (time elapsed, date, correct answers and percentage) along with the name you typed in, and output in a form, that you can save or print off, or whatever. The problem is, the input text box will not let you type in it. If you mouse over it, the mouse stays a pointer, you don't get the text tool. If you click on it, the cursor appears for a split second after you release the mouse button, but you cannot type anything in it.This is the actionscript for the output form:
Code:
//
function saveRecord(record:String, field:String, now:Object, score:Object):Void {
[code]......
I have 2 keyframes on my timeline.The first keyframe has an input text field (instance name: inputTxt) and a button (instance name: btnTester).When the user clicks the button it takes them to the second keyframe where their text should be displayed in a dynamic text box (instance name: txtBox).I get a null value in keyframe 2.
View 3 Repliesi created an input text box that puts the users input into a global variable, but when i test it it gives me not only what i have typed in but all the html formatting for the font that my input text box has on it.I only want the text that i have typed in to go into the variable but the wackload of html is going in there too. ive tried a few different things, rewriting my code, recreating the text box, changing settings, dont know what im missing.
View 10 RepliesI'm trying to build a fahrenheit to celsius convertor in AS3. How can I test to see whether what is input into a text input box (flash component) is not a number? This isn't correct but you can get an idea of what i'm trying to do:
if (celsius_txt.text == NaN || fahrenheit_txt.text == NaN)
{
//do something;
}
I have the following Application tag code in my widget:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:local="*"
width="100%" height="100%" minWidth="200" minHeight="200" layout="absolute"
creationComplete="init()"
defaultButton="{Send_btn}">
[Code]...
i have an one input text box, first i type text into it and press space bar at this it will become empty and ready to accept next input from starting position, i make the text box empty by
textbox.text = "";
but the cursor not set to initial position in text box it consider "" as "space" and cursor will display after one space only, i need that cursor again move to starting position..
Notice full screen Icon at top left. My contact for will not except text when it's in full screen mode.
View 1 RepliesUsing AS3 to create a basic number guessing game but for some reason the input text field won't accept text input. I can't figure out which piece of code is causing the problem and it's driving me nuts considering it's from a tutorial.
Code:
package
{
import flash.display.MovieClip;
[code]....
[Code]...
This code corresponds to a quiz question where the correct answer is either blue or green. I get the #1009 error if I input "blue". The answer "green" seems to work ok. What's wrong with my code? Is there a better way to make is so more than one answer works? Something like "blue" or "green" or "otheranswer", etc..?
Whats the best way to customize UI components (all the cool sites have custom scroll boxes, text boxes, scroll easing etc.) in mx 2004? can any point me to any solid tutorials? or books? eg:[URL]
View 1 RepliesI have a problem in dispatching a customEvent. I already managed to dispatch custom events in other projects and all worked well so i can't understand what's different now. I have a WSConnectorEvent that extends Event
[Code]...
url...can anyone see the works? or can't get past the initialising stage? i test on both my mac and pc and it's working, i ask some of my friends to test also... some can view, a few others cannot get pass the initializing stage somehow, it just seems that after the init() and getService it doesn't return the results for those comps which can't get pass the initialising stage.
View 2 RepliesCan you take a url variable and have that variable be the value for the source parameter of the video playback component in flash CS4 or CS5?
vplayer=videofile1
the actionscript 3.0
var videoFile:String = [who do I get the url variable's value here?]
[code]....