Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




How To Set Default Values For Input Text Fields



Let's say I have 10 input text fields on the _root. I know you can set the default text for those fields by just entering that text in flash before publlishing the file, but what if I want users to be able to set the defaults and save them for future use.

The other issue is that this will not be a web-based tool. I plan on publishing this to a self contained exe file. It's probably not very feasible because of this.



FlashKit > Flash Help > Flash ActionScript
Posted on: 06-01-2006, 01:55 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Input Text Fields With Default Entries
So I have an input text field with a default entry (i.e. first name). I want the text saying 'first name' to dissapear when the user clicks on it to enter their info. Is there a way to set it up so that the default entry goes away when you click it, and it leaves the field selected for the user to enter text.

I tried setting it up as a 2 frame clip that when clicked goes to the blank box, but the user has to click the field again to enter their info. Any help would be great.

Input Text Fields: Initial Values
Hi there,

I am creating a flash user input form and want to have some initial values in each Input text field (i.e. - 'First Name', 'Email Address' etc).

I know I can simply type these values into the Input text fields in the .fla movie, but doing this means the user has to delete the initial value before entering their own details.

Which leads me to to my question:

How do I make the initial values automatically disappear when the user clicks their mouse on the Input text fields?

Thank you in advance,
the chad

Input Text Fields: Initial Values
Hi there,

I am creating a flash user input form and want to have some initial values in each Input text field (i.e. - 'First Name', 'Email Address' etc).

I know I can simply type these values into the Input text fields in the .fla movie, but doing this means the user has to delete the initial value before entering their own details.

Which leads me to to my question:

How do I make the initial values automatically disappear when the user clicks their mouse on the Input text fields?

Thank you in advance,
the chad

Input Text Fields - Initial Values Problem
Hi, I have a search box with an intial text value "Search here..." inside the input box. When the user clicks inside the box "Search here..." will disappear. This is the code I use (thanks to claudios previous post):


Code:
searchBox.border = true;
searchBox.borderColor = 0x737373;

fields = [searchBox];//your textfields instance names
captions = ["Search..."];//default text for each textfield
for (var i in fields) {
this.fields[i].j = this.i;
this.fields[i].text = captions[i];
this.fields[i].onSetFocus = function() {
if (this.text == captions[this.j]) {
this.text = "";
}
};
this.fields[i].onKillFocus = function() {
if (!this.length) {
this.text = captions[this.j];
}
};
}
It works great except when I click in the box the initial text disappears like it should but when you click outside the box again without entering any text the "Search here..." appears and they quickly disappears. Any ideas why it disappears quickly after?

Input Fields Hold Values
I have 2 input fields, and if the values entered are wrong, I have the field colour turned to red, by inserting a red input field movie clip...

problem is, when I call this red field after an incorrect entry, the red input field covers the user's input, wrong as it is...

how do i keep the value of the field in the new field...or is there a better way to do this...?

Default Text In Input Box
Is there a way to create an input box with text in it ("email" for example), but that goes blank as soon as you click on it so someone can enter their email address?

Thanks.

Default Text In Input Field
How do I populate the input field, then when they put in the cursor the text goes away?

Default Value For Input Text Boxes
Hello everyone,

I am trying to figure out how to get an input text box in Flash 8 Professional to show a default value, like you would a real form in HTML. I'm passing the values via the Flash URL in the Object tag like so:

component.swf?value1=1&value2=2 etc.

I'm using Cold Fusion as the scripting platform.

Can anyone tell me what to do to get the input text boxes in Flash to reflect the values in the URL?

Many thanks.


Gary

Default Value For Input Text Boxes
Hello everyone,

I am trying to figure out how to get an input text box in Flash 8 Professional to show a default value, like you would a real form in HTML. I'm passing the values via the Flash URL in the Object tag like so:

component.swf?value1=1&value2=2 etc.

I'm using Cold Fusion as the scripting platform.

Can anyone tell me what to do to get the input text boxes in Flash to reflect the values in the URL?

Many thanks.


Gary

Dynamic Default Value For Input Text Box
i have created a form in which a user will input text that will be sent to php and then be put in a txt file on the server. my problem is when the user returns to the input box it shows it being blank. I want the text that they input the last time they were there to be in the box when they arrive so they can add to it.

in essence i need the input box to first act as a dynamic text box that loads external data from the txt file, then be able to be edited as an input text box

i hope i made this clear...my thoughts are a little chaotic lol

thanks for the help

About Alpha Values And Text Fields
why is it that when i set the alpha of a clip containing a dynamic text field, the textfield's alpha doesnt inherit that alpha as well?

ie: when i set alpha to 0 on the parent clip i can still see the text

also if someone could point me to a list of known actionscript 1.0 and 2.0 bugs thatd be mighty helpful

Passing Values To Text Fields In A Tween
hi there

I have a movie clip that attaches to the stage when a specific event happens.

the movie clip is two layers deep where the first layer is a tween that fades away then removes its self. inside this movieclip there is a dynamic text box that supposed to be populated onload.

simple enough ehhh ... well at least that is what I thought but no go

so then i tried to create a textfield on the fly and populate it with the tween mc
the only inheritance it pickes up is the tween mc removes its self...

i need help getting the value to the textbox so that it inherets the tween.

i have attach my project just press the number that appears twice to see what i mean.

Converting Values In Text Fields To A Document?
Is there a way i can convert values in text fields to a document, maybe like a Word Document or a PDF? the values entered into the Flash Text Fields are stored in a mySQL Database, but is there a way i can output those values as a hard digital copy?

Dynamic Text Fields Not Showing Values Assigned
I'm trying to add text to a dynamic text field on a movie clip that I am using as a button. It's actually a DTMF keypad I'm trying to create by using for loops to populate the text fields. No matter what I try it is not working. I step through the code and it goes through my function in its entirety, but the text labels are not showing any values.

I don't know if it matters, but the parent movie clip object of the buttons is not visible at start up (_visible = "false");

here's the code below for anyone who might be able to help:

function initializePageWindow(){
var alpha:Array= new Array("A", "B", "C", "D");

for(i=0;i<10;i++){
_root.winPage["btn"+i].txtBlack.text = i;
_root.winPage["btn"+i].txtWhite.text = i;
}

for(i=0;i<4;i++){
_root.winPage["btn"+i].txtBlack.text = alpha[i];
_root.winPage["btn"+i].txtWhite.text = alpha[i];
}
_root.winPage.btnStar.txtBlack.text = "*";
_root.winPage.btnStar.txtWhite.text = "*";

_root.winPage.btnHash.txtBlack.text = "#";
_root.winPage.btnHash.txtWhite.text = "#";

}

winPage is the parent, and the buttons are labeled btn0 through btn9, btnHash, and btnStar, and the reason for the two test boxes is for shading effect.

The text fields are named txtBlack and txtWhite respectively.

I would really appreciate any help I can get with this, I'm losing it.

Thanks in advance to anyone who can help.

Text Input Fields
I am creating a sort of calculator tool for a client.

I have some input fields that I have set the character limit to four but upon testing the file some of these fields are being over-rided and giving me answers like 2.19865493554 instead of 2.19

Anybody know of a reason why????? I've tried it in Flash 4 and five. Both give me the same results. I've doubled checked the action scripts and the input fields that the answers are calculated from and everything seems to be in order.

Second question: Is there an algebraic equation to make these numbers round without limiting the character spaces?

Thanks, nauhs

Input Text Fields
Greets all.

I have a page with an input text field and I need the cursor to be blinking in the field when the page loads.

Any way to do that?

Text Input Fields
Hmm, Ok... Well I want to be able to create a name/password thing... I know how to do the programming for the variable, like If name=____ goto _____ or something along those lines... But I know not hot to create the text input boxs, at all.

I would simply like to know how to create a simple white box so that someone cane type something in it and store what they type as a variable... Anyone have any idea how to? (I'm sure you do, so PLEASE help!)
--Samsa--

Input Text Fields?
Hi, I am trying to figure out how to implement user input text
fields into my site. I would like to have text fields for the customers name, addy, email and a comments area. Thanks much

Input Text Fields?
I was on a website... http://www.tiredofthinking.com
On his CONTACT section he has form mail fields.

The fields are pre-filled with text (name, email, etc)
until you click into the field...then it disappears so you can fill in your name or email address or message, etc.

How is that done? Thanks for you reply in advance.

Getting Sum Of Input Text Fields
Hello I have 3 input text fields and one dynamic one. When i click i want it to display the total of the 3. right now im getting the 3 numbers in sequence
ex.
2+2+2 = 222
i need it to say 6
thnx
on (release) {
myTot_var = h1_var+h2_var+h3_var;
}

Input Text Fields Help
I have a form with a few input text fields inside of a movie clip. When I goto tab from one field to another, it tabs to the navigation on the main scene, not the next text field in the movie clip. Does anyone know how to fix this?

Input Text Fields....
Ok i no how to use them a restrict them and so on thats nor the problem.
What im trying to work out is if i set the input box so that u can only type a maximum of 500 characters is there a way of having another text box that will display 500 and count down as another character is typed so you no how many characters are left ??

And then if u where to delete some it would count back up basicly keeping track of what u have imputed to that text box ??

PHP Input Text Fields?
Ok I've tried to do a tutorial on the PHP Text boxes that you submit infomation to a e-mail account..but it's not working.

Is there a site that explains it real well or how would I go about doing this. I've got Flash MX and I'm building the input text - area into the flash site..then going to Dreamweaver and saving it as html and uploading it to my host-server.

How do I build one? What might I be doig wrong?

Thanks for your timem.
JT

ATL

Input Text Fields
this is probably a real easy fix but i can't seem to get it workin.

i've got a form set up and i want the input fields to use device fonts when the user types in them. right now, they're aliased even though i selected device fonts for those fields.

is there something special i need to do to get this working?

thanks,
Clint

Input Text Fields.
I am a very newb at falsh so could somebody help me out. I want to create a flash swf so that if you type inyour name and press a button, the swf/screen will say : "Hello (inputed name)!" Can somebody pleez help me...

Help With Text Input Fields
Hi.

I am trying to modify a text input field component. Right now no matter what size in length my text input field is, the number of characters that show at a time are limited to 14 or so characters. they wont all display in the text input field from left to right. The letters are truncated and scroll.

How do I expand the number of characters that display in the textbox at a time. Note, I am an action script idiot. I can cut and paste the code but my knowledge is limited.

Any help is appreciated,

2 Instead Of @ In Input Text Fields?
i have a simple little guestbook, that has name/email/message. and sometimes, when you try and type in your email address the number 2 comes up instead of the @ symbol.

on the keyboard i have, you have to press ctrl+alt+2 to get the @ symbol.

i've embedded danish letters (å,æ,ø) and the @ symbol, but it still won't except it??

any suggestions?

[F8] Input Text Fields
how do i use them to create variables and thier values for use later on?

come on, please!

Input Text Fields
Hi.
I've posted this before but it is still not working.
Basically i have an email form which is a movie clip. I've put this emailform movieclip in another movie clip which is then in another movie clip. I think this is where my problem lies. What happens is that the text fields don't show when i test the main movie. When i place the emailform movie clip on the main timeline it shows, this is why i think my problem is due to the fact that the emailform MC is located in a MC in a MC.

Any help, script to ensure that the text fields show would be greatly appreciated.

Thanks

[F8] Using Text Input For Other Fields
I've created a form that invites a user to input their name, email, phone, postal address. When they click the submit button, the data is sent to a php file and emailed to a recipient, while the form rolls over to a confirmation page, providing feedback to the user that the form was submitted successfully.

So far so good, this all works

What I would like to do is customise the confirmation page with the users inputed data. How do I have the input text of one field appear as static text in the next frame?

Input Text Fields
Is there any way to read the highlited area of a inpu text field in actionscript.

exaple: if i had the sentenced.

The dog jumped over the cat.

And highlighted "jumped over".

could i save it to a variable that returns "jumped over".

Thank You

Help My Input Text Fields Are Gone :(
they appear when i put them on root and one level up, but the higher levels like level 5 is the thing that make my input field dissapear. someone knows what this can be? everything else like text is loaded except the input fields

Input Text Fields
Hello,
I'm trying to create a simulation using Flash Professional 8. What I would like to do is have the user type information into a text field and either press a button on the keyboard like tab or enter, then if the information they inputed is correct it will move them on to the next frame. This seems like it should be pretty easy to do but I can't figure it out.
If you have any information or examples I would greatly appreciate it!
Thanks in advance!!!

Input Text Fields
Here's a two parter usin AS2 in CS3-

I have two input text boxes, one for a user name and one for a password. There is also a button with an instance name of "enter_btn. There are additional frames labeled "correct" and "wrong". Here is the AS on the first frame:

stop();
enter_btn.onPress = function() {
if ((username == "John") && (password == "awesome")) {
gotoAndStop("correct");
}
else {
gotoAndStop("wrong");

};

}


That works fine except when the input text boxes have "auto kern" checked in the PI. When that is checked, it sends it to the "wrong" frame every time. Why should the auto kern affect the collecting of the variables?


Second question-

In the Flash help, it recommends not to use the "var" field in the PI to create input text field variables that will be populated by the user. It says that should only be done for previous versions of Flash players (even though it still works that way). I'm assuming that it then means to give the text field an instance name and define the variable in a frame action like:

var name:String;

If that's the case, what is the AS to tell the input text to be "name" and then test for it?

var name:String;
name_txt.text = name;
button_mc.onPress = function() {
if (name == "John") {
gotoAndStop(10);
} else {
gotoAndStop(20);
}
};


The above does not work.

Input Text Fields
Does anybody know why when a swf that contains input text boxes they stop functioning properly but they work when the swf is previewed on its own..


Thanks
R

Input Text Fields
when i try to send my variables through to php from my input text fields IT ONLY WORKS WHEN PUBLISHED IN FLASH PLAYER VERSION 6 but when i put it to version 8 which is what i need...my input text fields still let me to write but it won't recognise anything i type in it??

why is this??? any solutions??

Input Text Fields
Hi,

I was wondering if there was a way to tell if a user has clicked in an input text field. I want to have different movieclips appear depending on what text field is being typed in. I tried using a hittest, but if the user moves the mouse and continues to type in the field the movieclip disappears. If anyone knows if this is possible or has any suggestions on how to go about this it would be greatly appreciated.

Cheers,
morggs

Input Text Fields
I think I already know the answer, but just want to make sure.

Can you alpha tween and or mask input text fields?

Aaron.

If not I hope they are going to make it possible.

Passing User Input Values(text Form) Into A Text File
Hey,

I've created a form-like input to receive user input in the form of text in a frame. Now, I would like to pass that input into an external text file. I hope to get help to implement this. Let's assume that this app will be only used locally and not over the web.

Thanks

Initial Values For Input Text From Db
Hi all,

I want to set an initial value for an input text box to the data found in the db, so users don't have to retype the content they want to update. Is this possible - basically using a hybrid of input/dynamic text boxes?

I've succesfully managed to use a dyn box to grab/display data from the db using php....I can use a form to update that data. But, how do I combine these items into one text box?

Thanks in advance...

Passing Values In Input Text
I'm making SUDOKU game. I want to pass numbers in 81 cells(input text) of 9*9 grid, with following certain rules. I traced my code and it's showing correct results. but the numbers are not being shown in the input texts.

My code is:

code: play();//at timeline 1

ival = new Array();//array for initial numbers
ibox = new Array();//array for var name of input text cells of the grid

ival = [[1,2,3,4,5,6,7,8,9],[7,8,9,1,2,3,4,5,6],[4,5,6,7,8,9,1,2,3],[9,1,2,3,4,5,6,7,8],[3,4,5,6,7,8,9,1,2],[6,7,8,9,1,2,3,4,5],[8,9,1,2,3,4,5,6,7],[2,3,4,5,6,7,8,9,1],[5,6,7,8,9,1,2,3,4]];
ibox = [["a1","a2","a3","a4","a5","a6","a7","a8","a9"],["b1","b2","b3","b4","b5","b6","b7","b8","b9"],["c1","c2","c3","c4","c5","c6","c7","c8","c9"],["d1","d2","d3","d4","d5","d6","d7","d8","d9"],["e1","e2","e3","e4","e5","e6","e7","e8","e9"],["f1","f2","f3","f4","f5","f6","f7","f8","f9"],["g1","g2","g3","g4","g5","g6","g7","g8","g9"],["h1","h2","h3","h4","h5","h6","h7","h8","h9"],["i1","i2","i3","i4","i5","i6","i7","i8","i9"]];


var count:Number = 0;// count for displaying each time new values in cells
var x:Number = 0;
var y:Number = 0;
var z:String;
var xx:Number = 0;
var zz:Number = 0;
for(x=0;x<9;x++) {
for(y=0;y<9;y++) {
z = ibox[x][y];
zz = ival[x][y];
for (xx = 0; xx<count; xx++) { // for displaying values
zz = Number(zz); // first time
zz = (zz+4)%9; //these lines are
zz = zz+1; //not
} //required
_root.z = zz;
}
}
count++;

I need the solution asap. Thanks in advance.

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.

Dynamic Input Text Fields
I am new to flash and don't know much but I wanted to display information off an array which may vary in size from time to time.
Is there any way to create input text fields dynamically (in accordance to the size of the incoming array) to load variables?
If so, how do I make a reference to the dynamic input text fields?

Thanks
Jorge

MC Container W/ Input Text Fields?
I have a MC container with two input text fields. when the user enters the required data
and hits the submit button the loadvariables command comes in action by posting the data to the cgi.
I also have few variables on the main time line which are requiert by the server also.
the problem is that when the submit button is being hit flash post only the variable from the main time
line and none of those in the MC. I need to post every single variable that exists in that moovie.
What am I doing wrong or what am I not doing.


thanx in advance

Input Text Fields And Arrays
Hey All,
I am just now beginning to understand arrays, so please bear with me. If I have an empty array that I want to get populated by an input text field, what would the syntax look like? Any help and/or explanation with this would be greatly appreciated. Thanks

-Fleep

Tab Order Of Input Text Fields
oke here is the deal.
im building this site.. http://www.agdgraphics.nl
its dutch but that doent matter to the problem...

the menu "CONTACT" and then "INFO AANVRAGEN"
there is a CFMAIL script someone fills in the form and it automatically mails the thing.. that part works.. please don't mail cause its linked to my own email now..
but youll see that the Tab order is not right..

if you fill in the email line and you press tab to go to the next field.. it jumps to the adres field.
and if i change the fields places and rename them.. it still jumps to the wrong one..

how do i make it work properly?

thanks in advance.
Martijn.

Input Text Fields In SWiSH?
Is it possible to create an input text field in SWiSH? I can't find any reference to them & can't figure out a way to do it.

Custom Input Text Fields
Anyone know the best way to make custom input text fields?
i.e. Alpha only or Numeric only?

Thanks!

Dynamic And Input Text Fields.. I Need Some Help
Hi there, I need some help with dynamic and input text fields. My problem is getting them to display Kanji characters with an embedded font.

See, the problem is, it can display regular ascii characters using the embeded Osaka font that I am using no problem, but when trying to input or display the unicode characters, it just doesn't display them. Now, when relying on the system fonts, or device fonts, it works fine. It is just when the fonts are embedded in the flash file itself (which is what I need since I do need to use masks which aren't possible on dynamic or input text fields unless they are embedded fonts).

Thanks,

Jon

Copyright © 2005-08 www.BigResource.com, All rights reserved