ActionScript 2.0 :: Setting Variable For Input Text?

Sep 1, 2009

I need to create a Flash Quiz with the following:

1.) A page with a question, including a "submit" button, and an Input Text field where the user can type in his answer.

2.) A page with "Correct" and a page with "Incorrect".I have already gotten the pages and graphics created. But for the life of me my Action script is not working. The tutorials I have looked at would help me if I were making the quiz one total page where when you answered the question there would be a comment that came up, but that's not the case.

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Create An Input Text Box That Puts The Users Input Into A Global Variable?

Apr 12, 2007

i 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 Replies

ActionScript 2.0 :: Setting Text From Input Box To Dynamic?

Jul 15, 2003

Is there a way to display text in a dynamic text field taken from a input text field?

View 5 Replies

ActionScript 2.0 :: Setting Variables Using Input Text Boxes?

Oct 27, 2004

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.

View 4 Replies

ActionScript 2.0 :: Setting Default Language In Input Text Field

Apr 30, 2009

i have a text input box in which i want to insert Hebrew (RTL language) text. now, the RTL support i need is basic, and thats easy enough to do. however, for entering hebrew in the box, the user has to set hebrew in his windows language bar. is there a way of making the default input language in the box hebrew, regardless of what is currently set in the language bar? note - the hebrew characters are showing just fine, its just that to enter them you have to make sure the language bar is set to hebrew as well.

View 2 Replies

ActionScript 2.0 :: Setting Dynamic Text Based On A Variable?

Jul 13, 2007

I have 8 dynamic text boxes in my scene. What I need to accomplish is setting the value of the text in the text boxes to "Ready". The number of dynamic text boxes that need to have their value set to "Ready" is based on the variable "myVar1". Which dynamic text box to begin with is based on the variable "myVar2". In the scenario below mytextbox4, mytextbox5, and mytextbox6 should all be displaying "Ready" when done.

Code:
var myVar1:Number = 3
var myVar2:Number = 4

[code].....

View 1 Replies

ActionScript 1/2 :: Variable On Input Text Not Working With If / Then?

Mar 25, 2009

I'm using ActionScript 2.0 with Flash CS4 Professional, andI'm running into conflicting info on how to do this depending onwhich Flash book I'm looking at (and is that really a surprise?).1) I want the user to type text into a text field and thenFlash places what they've typed into a variable.So I created a text field of the type 'Input Text' andassigned this variable 'myInput'2) When the user presses a button, I want Flash to look atwhat is in the variable. THEN... If they have typed the correctword, they are sent to frame 19. If they type anything else, theyare sent to frame 38.In this example, the correct word is: "move"So, I placed this script on the button:

on (release) {
trace(myInput);
if (myInput = "move") {

[code]........

View 4 Replies

Flex :: Binding The Value Of A Variable To A Text Input

Apr 12, 2011

Is it possible to have the value of some string variable bound to the text inside a text input control? To clarify, whatever text was entered into the text input would be stored as the value of the variable.

View 3 Replies

ActionScript 3.0 :: Load Input Text Into A Variable?

Mar 28, 2011

i have an 'input text' box named "playernameinput".

i want the text inputted into that field to be loaded into a variable and sent to a php file. the 'timeLeft' field is correct and is updating in the mysql database but i cant for the life of me figure out how to get the text from the input box into the 'variables.username'.

ActionScript Code:
var str = timeLeft;
var playername:String = playernameinput.text;

[Code]....

View 2 Replies

ActionScript 3.0 :: Accessing Input Text Variable

Jul 8, 2011

I'm new to ActionScript 3.I have 2 frames. On the first frame two numbers are randomly generated and the user must enter their sum into the input text field (instance name: inTxt). They then click the OK button. On the solve frame their solution is checked against the correct answer.The problem is I can't access their solution from the input text field. I tried tracing it and get null. What am I missing?[code]

View 5 Replies

ActionScript 2.0 :: How To Convert Input Text To A Variable

Apr 8, 2008

be a really obvious question but does anyone know how to convert input text to a variable?At the moment I have a textArea component and want to make the user's input text a variable so I can use it later. can get a trace on the input text with "trace(mytext.text)" but I just don't know how to make it a variable

View 3 Replies

ActionScript 2.0 :: CS3 Input Text Passes Variable To URL For Loading XML?

Feb 4, 2010

Here is what I'm doing (using AS 2.0)I'm generating some XML based on parameters passed in a URLOn Frame One, I have an input text box. I would like whatever the user inputs in that text box to pass into the URL. For example, if I had a text box that said ZIPCODE: _________ I'd like that zip code to be passed into the URL

Code:
stop();
this.btn_send.onRelease = function() {

[code].....

View 1 Replies

Professional :: Input Text Variable Is Being Converted To HTML?

Sep 29, 2011

I have an Input Text box that has a variable assigned to it.The user is to input a number, and then it is submitted with a button that does a simple conditional if statement check. I noticed that the if statement is constantly failing because the variable is tracing back as HTML.The trace of the variable looks like this:

<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Times New Roman" SIZE="12" COLOR="#0066CC" LETTERSPACING="0" KERNING="0">4</FONT></P></TEXTFORMAT>

The variable should simply be the number 4 without all the HTML jibberish.The "Render text as HTML" is not on for the Input Text box.I am completely baffled and at a complete loss... any ideas of what is happening here?!Below is the exact code I am using...

TIMELINE
numA = random(10)
numB = random(10)[code]....

View 3 Replies

ActionScript 2.0 :: Pass Input Text To LoadVars Variable?

Oct 14, 2009

[code]...

I have an input field with the var name "chosenloc" in the same scope as the timeline I'm working in. I've set the input field var in code, on the fly, and by entering a number right into the field.

View 2 Replies

ActionScript 2.0 :: Input Text To Array Variable Not Working?

Jan 12, 2008

I am working on a line rider/ free rider style game in flash (which is coming along quite nicely ). For the whole night I've been trying to create a way to save and load data simply off text and have finally come up with a basic solution for it! I have my information all stored into an array neatly to be later used with the function lineTo upon load. My problem here is that when I actually input the data into the textbox to be picked up by the load button it does not draw the lines like its supposed to.My load button has the following code:

onClipEvent (enterFrame) {
onRelease = function() {
var points = new Array(_root.xInput);[code]......

View 2 Replies

ActionScript 3.0 :: Input A Variable At A Specific Portion Of The Text?

Feb 29, 2012

I have a string of text, but within this text I want to input a variable at a specific portion of the text. Now this string of text is taken from an XML file. So the XML file would look like this for example:

Code:
<name>Sweep</name>
<type>ATK</type>
<target>AoE-EN</target>
<caste>Warrior</caste>
<desc>"This is a text"+temp.alias+"hey"</desc>

The <desc> is an example of a way I tried to make it work. What I want to happen is when I display the desc in my flash file, it inputs the alias (which in the xml is the name) of the item. In PHP this could be doing using EVAL() but I notice the support for that type of function is removed in AS3.

View 10 Replies

ActionScript 2.0 :: Sending Input Text Variable To PHP Without HTML Tags

Oct 14, 2009

I have an input box with a variable name. When the user enters some text and presses a button that variable is sent to a php file using the GET method. Then the info is put into a database. When I checked my database, I found that a load of styling html tags has been included. I want for my input text box to have styled text, but I don't want that styling /html tags to be sent to the php file. I know I could use strip_tags in php to get rid of the html tags, but surely there's a way of not sending the tags at all, just the text content of my variable?

[Code]..

View 7 Replies

ActionScript 1/2 :: Hyperlink Button With Variable From Text Input Field?

Jun 24, 2009

I have a text input field called 'phone' and a button with the GetUrl function. Button script looks like this:

on (release){getURL("http://url/sendlink.page?country=160&phone=phone&keyword=33&msgtype=26", "", "POST");}

First of all when I press the button nothing happens. When I paste the link directly into my browser everythinbg works as it should. But not from flash file.

adding the 'phone' variable into the hyperlink. What do I write? Something like this: [URL]

View 13 Replies

Flex :: Search - Application For PlayBook Text Input Variable

Jan 8, 2011

how to take what a user inputs into a s:TextInput and use that as a variable in a JSON data request? Basically, I want to have a user enter a search term, like "math" and then have that placed into a variable so I can use it in a JSON request. Something like public var q:String, except that my search box (and hence user input) is on another "view" of the application. I've just started with Flex Mobile applications and I might be way out of my league.

View 1 Replies

ActionScript 3.0 :: Remove Excess Whitespace From User Input Text Variable?

Oct 17, 2011

I'm new to AS3, as well as this forum,and had a question. I created a simple ad-lib type game for practice and would like to be able to remove any leading and trailing whitespace that a user inputs from the final outputted ad-lib, as well as if the user tries to submit their input with missing fields of text, it would throw an error and ask them to try again.[code]...

View 4 Replies

ActionScript 2.0 :: Link Input Text To A Variable And Output That Text To The Output Window Using Trace

Jul 22, 2005

I'm teaching myself ActionScript and the book I'm reading just got into input text capabilities. The book shows me how to link input text to a variable and output that text to the output window using trace. My question is: how can I display the text that the user input onto the actual movie. For example... if I wanted the visitor to type their name into the input text box and click Submit and then a phrase shows up with their name such as "Hold on Name, my site will be done soon." How do I reference that variable and have it actually display in my movie?

View 5 Replies

ActionScript 2.0 :: Calculator - Clear The Text Field Then Store The New Input In The Same Text Field As A Different Variable

Mar 30, 2006

I'm making a calculator using Flash MX that works the same way as the basic calculator found on windows (not the scientific one). But having the user input a number, store it as a variable, store which function the user wants to perform and clear the text field then store the new input in the same text field as a different variable and multiply or add or divide or subtract the 2 numbers and getting the equals sign to display the answer when clicked is harder than I thought it would be.

View 3 Replies

ActionScript 2.0 :: Default Dynamic Text Auto-scale Font, Input From Input Text First

Feb 3, 2011

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].....

View 1 Replies

ActionScript 2.0 :: Setting A Dynamic Text Box Use A Dynamic Variable Name?

Feb 19, 2010

I have a movie clip and in that movie clip there is a dynamic text box. I want that text box to display a dynamic variable name something like:

Quote:
_root.var_[this._name]

so the variable will be _root._var plus what ever the instance name of the movie clip it's in is, how can i do this?

View 1 Replies

ActionScript 2.0 :: Dynamic Text Auto-scale Font, Input From Input Text First

Feb 3, 2011

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]....

View 0 Replies

Flex :: Text Input With Icon Inside Like Mac Os X Search Text Input

Mar 24, 2010

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 Replies

ActionScript 2.0 :: Input Text Box To Dynamic Text Output - No Cursor, Can't Input?

Apr 28, 2011

the 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]......

View 3 Replies

ActionScript 2.0 :: "input Text" Element - Send To Other Variable

Jul 7, 2008

I have Input Box named lets say "input". I have a button also. So, when i click button, i want to do something with my input. Problem is that AS my input send to other variable in this format:

[Code]...

View 3 Replies

ActionScript 2.0 :: Create A "input Text Box" That Changes A Variable?

Apr 14, 2006

i have 2 questions.

1: how do i create a "input text box" that changes a variable?

how to creat the ground he is gonna walk on (right now he is just walking in the air) so what are the codes for making a box that "egon" (the guy in my mini-game) can walk on??

View 2 Replies

ActionScript 2.0 :: Setting Rotation Of Object - Input TextBox Show Undefined

Oct 28, 2010

I'm trying to set the rotation of an object via an input textbox for debugging purposes. Currently I have the object working when it changes rotation automatically. A variable is reset every few seconds to a random number between -180 and +180 and then the rotation of the object changes to match the variable. However different things are meant to happen when the rotation variable is set at varying degrees so I rehashed the code so that instead of being a random number it responds to the variable in an input textbox.

Now... I set up the input textbox with the variable, and a dynamic textbox to show me the rotation set for the object. however every time I enter a variable in the input textbox the set-rotation changes to "Undefined". Am I supposed to add some kind of a "Submit entered number" button somehow. In the past when I have used input textboxes the number is processed automatically.

E.g.. dynamic textbox is 5*variable.
Enter #number. As you type input- the number appears inside the dynamic textbox

I even added a longer delay. The number in the dynamic textbox IS CHANGED with no resulting change in the rotation of the object. As the time countdown loop comes to a close (After every 9 seconds set rotation to input box) the text instantly changes to "Undefined".

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved