User Input Variables (Using Input Boxes)
Hey everyone! I need to call on your wisdom for something, probably won't take a minute!I've had a good hard look in the forums, and all over the internet, couldn't find anything about this.Basically, I need to be able to let a user put in a value into an Input box, and have flash turn it into a variable, and be able to use that as a property, for lets say, line thickness.Example:-User writes 3 into the text box. (input box's Instance name is line_thickness)-The movie is one frame, so apon enter frame, flash sees it, and turns that "3" into a variable. PHP Code:
var myline_thickness:String = String(line_thickness);
-Further down the code, that variable is used. PHP Code:
line.graphics.lineStyle(myline_thickness, 0xFFFFFF);
I've tried using an ouput box to see what flash sees the variable as, and it only says: [object TextField]I hope I've made it as clear as possible!Thanks in advance to any replies!
FlashKit > Flash Help > Actionscript 3.0
Posted on: 02-08-2008, 09:08 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Tracking User Input In Dynamic Input Boxes
I need to track if a user correctly typed what I have asked them to. If they do, they will go to the next step, if not , they will be prompted what to type. I set up an input text box with the instance name "name_txt" I have put this code in the first frame of the main timeline.
code:
var theName = "";
name_txt.onChanged = function(){
if (theName == "ron jones"){
trace ("correct");
gotoAndStop(2);
}else{
trace ("Please type ron jones");
};
trace ("My name = " + theName);
};
stop();
it tracks the users keystrokes, but when you type the final letter. the trace on the variable shows that it equals "ron jones" but the file does nothing, i put in a trace statement right after the "If" statement, apparently this never = true, because it is going right to the "else" statement. any ideas on how to accomplish this?
any help would be great
IMS
User Input Boxes In Children...
Link to sample: http://wemakeyourmark.com/AdBuilder.swf
Ok so I have a movie clip with input boxes in it that gets duplicated when you press the button. I'm having a really hard time finding the information I need to get this thing working correctly!
First! when I tab between text boxes of input text, it will jump between the different boxes in different children.. how do I fix that?
Next I need to figure out how to have these boxes "magnetic" or "snap to"
I want them to auto align with each other. to make this more complicated I will in the future have multiple size boxes that "snap to" each other.
And finally I will need to let the user save their box layout for future use (cookie type thing) I have some information on that in one of my reference books but if there is a good tutorial on this please point me in the right direction.
Please help! There are almost NO good AS3 tutorials on the web (unlike AS2 where there are TONS) i'm very frustrated with that!
Quote:
btn.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(event:MouseEvent):void {
var myClip:cont_mc = new cont_mc();
this.addChild(myClip);
myClip.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
myClip.addEventListener(MouseEvent.MOUSE_UP, dropIt);
function pickUp(event:MouseEvent):void
{
event.target.startDrag();
}
function dropIt(event:MouseEvent):void
{
event.target.stopDrag();
}
myClip.x = 300;
myClip.y = 400;
}
Input Boxes - Then Printing A Frame With Dynamic Boxes With The Input Text In Them...
I have created a flash document with input text... I put the input text with a a variable for each.. I need to print the variables on a seperate page. I used a bounding box inside a movie clip and the printing is working correctly... However it is not reading my input boxes into the dynamic text boxes..
What I did is I have the input boxes on the root timeline........ You input it and go through a few frames and you get the option to print from a button (which is printing 2nd frame of a movie symbol) NOTE: the printing is working correctly using #b.... This is what I have on the 2nd frame of the movie clip for the dynamic text boxes to read the input boxes and place those variables inside of those dynamic text boxes so it will print them as they inputted them...
Here is what I have for my button:
on (press) {
print(_root.Printing, "bmovie")
}
Here is what my variables are on the input boxes which are sitting on the root timeline, each word is a variable:
curious
passionate
accountable
resourceful
commited
teamwork
open
engerizing
External_focus
Clear_thinker
Imagination_courage
Inclusive_leader
Expertise
INSIDE THE PRINTING MOVIE I HAVE A FRAME WITH THIS ACTION ON IT FOR THE DYNAMIC TEXT BOXES TO READ THE INPUT TEXT BOXES:
External_focus1 = _parent.External_focus;
Clear_thinker1 = _parent.Clear_thinker;
Imagination_courage1 = _parent.Imagination_courage;
Inclusive_leader1 = _parent.Inclusive_leader;
Expertise1 = _parent.Expertise;
curious1 = _parent.curious;
passionate1 = _parent.passionate;
accountable1 = _parent.accountable;
resourceful1 = _parent.resourceful;
commited1 = _parent.commited;
teamwork1 = _parent.teamwork;
open1 = _parent.open;
engerizing1 = _parent.engerizing;
FOR SOME REASON IT IS NOT PRINTING MY INPUT BOX INFORMATION IN THE DYNAMIC TEXT BOXES.... DOES ANYONE KNOW WHY?
Forcing User To Put Text In Input Boxes
I am attempting to make input boxes mandatory to input text before going to the next frame of the movie.. has anyone done this?
I tried the javascript code (below) on the timeline to try to get it to warn you if you dont put anything into the input box but it seems not to work when I put it on the timeline frame that the input boxes reside on...
if (textbox.text == ""){
getURL("javascript:alert('message here')");
}
What I have is next buttons that go to a next frame......but I dont want them to be able to click on that next button until they fill out text into the input boxes......
I have attached a .fla file to see what I am aiming for...
Forcing User To Use Specific Input Boxes
can someone tell me how to go to a specific frame if the necessary input fields have note been filled.
im basically trying to tell the user that you have to fill in the necessary info to send the form.
thanks
Forcing User To Put Text In Input Boxes
I am attempting to make input boxes mandatory to input text before going to the next frame of the movie.. has anyone done this?
I tried the javascript code (below) on the timeline to try to get it to warn you if you dont put anything into the input box but it seems not to work when I put it on the timeline frame that the input boxes reside on...
if (textbox.text == ""){
getURL("javascript:alert('message here')");
}
What I have is next buttons that go to a next frame......but I dont want them to be able to click on that next button until they fill out text into the input boxes......
I have attached a .fla file to see what I am aiming for...
Help With Email Form - Input Text Boxes Not Allowing Input
i placed an email form into a movie clip in this site...and the input text boxes are no longer allowing me to type into them.
the email form (which i got from flashkit), as it's own file, works fine, so i know it's possible...but for some reason when i take the movie clip from one file and drag it into the one i'm working on...it loses that input text funcionality. All the actionscript is the same...everything is identical...i don't get it.
i even tried to place it on top of a movie clip within the main content clip thinking maybe because it was an mc within an mc within an mc that had something to do with it...but not the case.
any help you can provide is appreciated.
(attached file was saved as MX..orig is in MX 2004 Pro)
thanks.
oh, also....how would i load movie clips to different layers?...if i understand some things i've read here, that will help me speed up the site overall...as it is VERY slow in browser. but...maybe i'm wrong.
Help With Variables From User Input
I'm creating a simple flash movie that will allow me to setup an aim away message from the desktop or merely a web page, the code used is as follows:
aim:goaway?message=Message+Here+Go+to+aimisland.co m
As you can see there is a + after every word and the text is after Message+.
I need to know how to get text which is entered into a text box to be inserted into the above code to complete the link. Thanks in advance
Help With Variables From User Input
I'm creating a simple flash movie that will allow me to setup an aim away message from the desktop or merely a web page, the code used is as follows:
aim:goaway?message=Message+Here+Go+to+aimisland.co m
As you can see there is a + after every word and the text is after Message+.
I need to know how to get text which is entered into a text box to be inserted into the above code to complete the link. Thanks in advance
Setting Variables Using Input Text Boxes
Setting variables. Have a look at the file. Current height and width are both set at 200. I dont think i got the scripting right, or it may be in the wrong place. Thanks in advance.
Setting Variables Using Input Text Boxes
Setting variables. Have a look at the file. Current height and width are both set at 200. I dont think i got the scripting right, or it may be in the wrong place. Thanks in advance.
Input Text Boxes, Variables And SendAndLoad Loadvars
okay, i'm totally at a loss here.
i've got a form made up of 3 input text fields. the form submits to an .asp page which checks a database for duplicate entries and inserts the variables or sends back a warning variable if the entry already exists.
my problem is i'm using the loadvars object with sendAndLoad for the first time. I think my variables from my input text fields are not getting passed to the .asp page.
I'm passing blank variables which register as a blank entry in the database which comes back as a duplicate.
I need to know all the things I need to know to successfully transfer variables with sendAndLoad. how do I make sure my variables are being collected from the input text fields and attached to my loadvars object?
!@#$!@#$!@#
here's my load vars code (on first frame):
Code:
sendalist =new LoadVars();
talkback =new LoadVars();
sendalist.AFirst = _root.maincontent_mc.alistjoin.first.text;
sendalist.ALast = _root.maincontent_mc.alistjoin.last.text;
sendalist.AEmail = _root.maincontent_mc.alistjoin.email.text;
stop();
here's my actual loadvars :
Code:
sendalist.sendAndLoad("a-list.asp", talkback, [post]);
then i use a loop to get the return variables (duplicate or not, etc.) and decide what to do in my flash movie.
do I need instance names AND variable names on those input text boxes?
help!!!!!!!!!
Input Text Boxes Now Passing Formatting With Variables?
Hello, All-
I've had a site running for a few months that takes four input text boxes (name, e-mail, subject and message) and posts the values to an ASP page which composes an e-mail with a CDO.Message command.
For some reason (nothing has been changed in the files or on the server), it stopped working and I've traced it down to Flash passing Input Text Box Formatting information along WITH the variable.
Help!
Can anyone explain what's happened and how to correct it?
For example, in my form I've set all the name, e-mail and message to static text and let the Subject variable be passed and in the e-mail subject line, I get this:
<TEXTFORMAT LEADING="2"><P ALIGN="JUSTIFY"><FONT FACE="American Typewriter" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">Explicitly?</FONT></P></TEXTFORMAT>
Obviously, I only want the string 'Explicitly?' which I entered in the subject field. My guess it that it's doing this to all the fields and it's not parsing a correct e-mail address as well.
Any and all help is greatly appreciated.
Thanks,
Steve
Detecting Input For Input Boxes
Hi. I a flash frame with two input boxes for userid and password. What I want to do is detect when text has been entered in both boxes so that I can make the login button visible afterwards. How can I do this? Is it possible?
Thanx.
INPUT TEXT - How To Restrict Number Of Lines Of Text A User Can Input Into Textbox
In a flash form I've created I have a input textbox. I don't want the user to be able to input more than 7 lines of text. Is this possible to do? I know that I can set a value for 'max char', but this is not useful for me -- it's essential that the user cannot input more than 7 lines of text.
How can I limit the number of lines a user can input into a textbox?
Thanks!
Glenn
Getting The Input From A User From A "input Text Box"
Title speaks for itself, for anyone who didnt read it
I need to get the value entered in a input text box...
textbox name is called
entertext
anyone know how I can do this?
I also need to know how to remove any entered text from that input box
Input Boxes
Okay on my site.. I am using input boxes for my form.. However all the input boxes don't fit on the screen normally so I have a motion tween in a movie clip that allows me to use my "scroll" buttons to scroll down.. I use a mask to use this feature.. but when I test it the input boxes don't show up because the mask is above the boxes.. I'm not sure what to do.. Can anyone help me with this? If so - thanks....
- Jblack144
Input Boxes
I'm trying to use the new Date() script along with input text boxes to determine someone's age when coming into my site. What's the best methods for writing the script and math for this function? Basically trying to prohibit under 21 yearolds from coming into the rest of my site.
What do I do?
Input Boxes
I have an input boxes which I would like to only let the user enter Capital and Lower case d and c.
I have tried using the characters options in the properties menu but I am having no joy!
Any idea's?
Jemes
Input Boxes
How come my input boxes populate themselves with their location path (_level0.firstname), when I set the variable name? Also, my password box automatically inputs a full line of (*******) by default. Anyway to stop this from happening?
Help With Input Boxes
Hi everyone,
I have created a number of input boxes which record users answers to randomly generated questions. Does anyone know how the cursor can be automatically placed in the input box when the frame is loaded? Instead of the user having to select the box to put data in.
Any help would be really appreciated.
Thanks
Pete
Input Boxes
I'm trying to create an input box where the cursor blinks in the box from the beginning (without requiring the user to mouse click inside of it) Is this possible? Any solutions would be greatly appreciated.
Input Text Boxes
HELP PLEASE!!!
I'm trying to allow the user to input a 2 character value into a display. I have the general idea from the calculator sample included with the Flash 5.0 software, but it doesn't really explain too well. I'm not a computer language guru, so I'm doing the best I can by example. It works if I use the keyboard to type in numbers, but if I use the keypad buttons that I created, the display allows more than 2 numbers to appear. First, how do I limit it to just 2 characters when using buttons, and second, how do I keep that display when I go to another scene? I've already set the max characters to 2 in the text options panel.
THANK YOU!!
Input Text Boxes
I have an input text box on the stage called 'input' and four buttons which load their buttons names (variables) into this box when clicked.
I have a text box (called 'output') in an m/c within an m/c, and i want to the contents of the 'input' text box to be loaded into this box when the movie plays.
1. how do i do this,
2. does the text box have to be a input text box or dynamic?
3. basically i'm after the actionscript which gets the input and output boxes communicating
Text Input Boxes
I have a series of input boxes in Flash which enable the user to email a friend, the idea being that they email more than one friend. The boxes allow the user to type in their name and email address, then their friends name and email address, then a message...once they've pressed the 'send' button, I'd like the friends name and email address and the message boxes to clear, but the users name and email address to remain.
I imagine this has something to do with the text box variable names, but can't work out the code...any clues anyone?!
Tab Order On Input Boxes
hi
i have a series of input boxes (though not an array) and i'm wondering this:
1 - can i make the cursor appear inside the first textbox by default?
2 - can i controll the tab order (i.e. if the user tabs the cursor should move on to the next input box and so on)
Input Text Boxes
how to make this.....
if the input box = (forexample)"go"
tell Target "movie" gotoandstop frame 1
hope you understand it...
i want the movie to do something when the input box has a certain word in it
Input Text Boxes
I'm having trouble with input text boxes. I am loading an swf into one of the scroll pane flash components, but the input text boxes in that swf will not work, any suggestions?
Input Boxes And PHP Files
I've got two input boxes in my flash movie, a USER and PASS box. When the user presses the submit button i need it to do this:
system/member/login.php?USER=username+PASS=password
I did this a while ago but i've forgotten how to do it
please help.
Tab Between Input Text Boxes
Is there a way to allow a user to tab between input text boxes in a particular order (e.g. down one column then down the next column) rather than just accepting the default left to right?
Input Text Boxes?
I know this is very basic,
but I still don't know this?
How do you send data from an input text box?, to say a server side script? (eg. contact form)
any help would be greatly appreciated.
Input Text Boxes
Hi all.
I'm having this trouble:
When I upload my .swf file on the web, my input text boxes don't work anymore. When I test it on flash mx (ctrl+enter) they work and everything is ok.
Does anyone knows what am I doing wrong here?
Thanks
Input Text Boxes
how do you format input text boxes? i want to be able to change the background color and border on it. thanks!
Input Boxes Not Sending To Php
I have a Flash form that takes simple text data from input boxes and sends that data into a php script that in turn sends an email. The input boxes each refer to a var. That works fine.
But when I create a button that sets the var of an input box, that data doesnt get transmitted. (I have a few drop boxes accompanying a few input fields that place a predetermined value from a list into those input box vars) Note: none of the input boxes have instance names.
Really stuck on this one. I have tried every way to trouble shoot this that I can think of.
How To Set The Tab Order In Input Boxes
the name of the subject says it all.
I have built a form with a series of input boxes and sometimes when i press tab it jumps erratically to other buttons or input boxes.
how do i set them in order so the tabbing stays constant down the input box series.
Input Boxes - Problems
Hey,
If anyone could help me with these two things, I'd be very grateful.
Firstly, the arrow keys don't work for navigating around the text as the user inputs the text. Anyone know what's happening here?
Secondly, the line-breaks are getting lost. My variables are: textBox1 and textBox2 and I am passing them to a pop-up by the following script:
getURL
("javascript:window.open('dataSubmit.php?textArray 1="+textArray1+"&textArray2="+textArray2+"&active= "+active+"','popped','width=300,height=200,top='+( (screen.height/2)-100),left='+((screen.width/2)-150)+',toolbar=no,scrollbars=no,resizable=no,menub ar=no,status=no,directories=no,location=no'); void(0);");
I have tried: textArray1 = textBox1.split("
"); also, but this isn't working. Can anyone suggest anything?
ps - putting "GET" at the end seems to stop the pop-up from working.
Getting Input Boxes To ACTUALLY GetFocus
Code:
Selection.setFocus("1");
and give the user input an instance of "1" (minus the quotes). a simple this.getFocus won't work.....especially if you import from Captivate. For those of you who don't know, Captivate is a cross between PowerPoint and Swish...very annoying. The code Captivate gives you is fine as long as it goes nowhere NEAR Flash...once it does, things go to hell.
Input Text Boxes
does anyone else have issues with input text boxes being very unresponsive and slow in filling with text when a user inputs text? I have experienced this problem before ... anyone got any ideas? Are these best avoided?
Input Boxes - If All Correct..how?
I have 5 input boxes and in each of them you have to type in something. And i have a dynamic reply text box.And a button for every answer to check if its correct. Ok, i did that part. But this is my problem - if all of them are filled in correctly, a reply text and a new button which links to somewhere(doesnt metter where now) should show up. HOW? I tried this:
i added _root.allCorrect +=1; to count correct answers and the following code:
root.onEnterFrame= function(){
if(_root.allCorrect==5){
_root.reply.text = "BRAVO! .";
mybutton._visible = true;
But this doesnt seem to be good.
THANX!
Input Boxes (and Alternatives)
So I am trying to capture input from a user in a flash applicatoin I am developing. Right now, I have a standard input box, which works fine in Windows. However, when I export it down to flash 7 (for linux), the input box breaks. I have noticed in the past that standard input boxes often don't work in linux. For instance, www.aimfight.com used to have an input box like the one I'm talking about. They seem to have recently changed it to something that linux users can actually use. Does anyone know how to make one of those boxes?
Thanks so much!!!
Input Text Boxes
Hello People,
I am working on another project, I know how to use text boxes, but I would like to know if you can input information on the same screen. Picture a scenerio, making an interactive excercise for creating a chemical atom, and the user types in the number of electrons that are needed in the atom, lets say 7.
The number 7 will be typed in to the input box.
I would like to have 7 electrons appear on the atom, now these can be a movie clip. So what ever number the user types into the input box, that number of electrons will appear on the screen.
An example the user types 9 in the box, you'd see 9 on screen,
If they type 3 in the text box, you'd see 3 on the screen.
If that makes sense and if anyone out there can help I'd be very grateful.
I am multimedia designer not a programmer. However, I want to learn more actionscript, because there is tonnes of benefits.
Thanking you in advance,
Best wishes
James,
Help With Input Text Boxes
I have a small flash project with an input text box, and the input text box should use the information entered and take you to a specific website, for example:
www.{INPUT TEXT BOX HERE}.org
People would enter "actionscript" into the text box, and then when they click the go button, it will take them to www.actionscript.org
Now I'm not very good with actionscript, and need a bit of code to help me out, I've been told (By a very unhelpful b***ard) that .text collects the information from the box, but then they ignored me when I asked how to use it, so any help will be appreciated.
Help With Input Text Boxes
Is it possible in Actionscript 3 to have a input text box on stage, for example located down at the bottom, and have a static or dynamic text box somewhere else on the stage, and when you type IN the input text box, it appears in the other text (dynamic / static). I need to make something along the lines of an online shopping center, and am building it in flash. I would like to use this step for when the client is customizing their information.
Text Input Boxes
I have four text input boxes, and I need to be able to script it so that when the "Done" button is pushed each of the boxes are checked for the right input. I've tried two different methods, neither of which work or the answer is automatically correct. Please help.
Input Boxes Only Numbers
Hi, is there anyway where I can script it so that I can only type numbers in input text fields?
Input Text Boxes
I have a swf which contains several input text boxes , named a1 , a2 , a3 etc.
Is there a way of getting the cursor to go to a particular text box when the swf starts rather than having to click on it first.?
Thanks in advance.
Input Boxes And Maths
What would be the most effective way of performing mathematical functions on data that is entered into input text fields.
I have a client who wanted a method of predicting how many floor tiles would be needed for a floor depending on the square metres of the floor.
A simple width by height calculation would suffice but I seem to have encountered a little trouble.
If I had two input boxes in which to enter a width and a height and a further dynamic box to display the result of the calculation width x height, what sort of Actionscript would I be looking at??
Whenever I try to trace the result to an Output box I get NaN. This is not the answer I wanted. Back to books.
cheers
Can't Mask Input Boxes?
I have two input boxes that are under a mask.
the mask works fine, but now i cannot enter text into the input boxes.
I'm using verdana as the text for the input boxes.
Anyone know how to fix this?
|