Actionscript :: Input Text And Check Button?

Dec 24, 2009

My project is to get a input text from user and user can check their answer by simply click on the button check, if their answer is true a message "good job" will be display. but,my code have an error.check this code 4 me? .

ans1_box.restrict = "0123456789";
var setUpProblem:Function = function():Void
{

[code]........

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Using A Button To Check An Input Text Field

Dec 14, 2010

I am an educator and I am designing an interactive activity for my students. I created two buttons named button_B and button_G, and an input textfield named in_Text.when a student presses button_B, the letter "B" is entered into the input text field; if a student presses button_G, the letter "G" is entered into the input text field. More than one letter entry is acceptable as a student's answer: for exmple the entry BBB, BGB within the input field is okay.I have no trouble writing AS3 to accomplish this task, however:For a student's solution to the input text field to be correct, it has to contain the four values BBB, GGG, BGB, and GBG in any order. I created an array named solution_S with these values. I also have an enter the solution button named enter_btn. The student can check their solution by pressing the enter_btn button; if the input textfield is correct, the quiz moves on to the next frame in my timeline; if it is incorrect, it moves to a different frame in my timeline.

View 3 Replies

ActionScript 3 :: Flash - Check Input Text With Movie Clip Button?

Jan 30, 2012

im just working on my new project. All what i need is, i want to check input text using button, if the value on the input text box is equals 1, trace("true"), else trace ("false").

here's the example link [URL]

the problem is, when im trying to input text to 1, it's always goes to else, which means false. also all number. sorry for my bad english. here's what i did

var check:Boolean = false;
var input1:String;
var answer:String = "1";

[Code]....

View 2 Replies

ActionScript 3.0 :: Text Input Check In Flash

Oct 3, 2011

I have created a simple game which asks young children to spell in a text input box the image they see - typically banana, apple etc. I have a text input box into which they spell the word. A button they click to check their answer and a dynamic text box which displays either Wrong or Well done. The code I have applied to the button is pasted below:

on (press) {
if (answer1.text.indexOf("banana") != -1) {
show.text="well done";
} else {show.text="wrong";
}}

The problem I am having is that if they have a variant of the answer in the input text box it displays correct. For example, with the code above, the following answer would receive a correct response - "bananananananan". Is there any way to slightly tweek the code so that they need to spell the exact word? I have noticed that this works the same for simple maths questions. 5 + 5 with an answer of 1000 will give a correct response because somewhere in the answer is 10.

View 4 Replies

ActionScript 2.0 :: Check Input Text For Response?

Nov 8, 2010

I have made a text field and a button. The button has the following script applied:
on (press) {
if (textbox.text.indexOf("batman") != -1) {
gotoAndStop(2);
}}
This is taken from a tutorial and works, but it sends me to frame two if I type in "batmannnnnodppsidjssnakd" for example. Could I easily make this just respond if the textbox ONLY contains batman?

View 6 Replies

Flex :: Text Input Validation For Numeric Check?

Apr 30, 2011

I am seeing a strange issue in flex. I need to reset all text input fields to 0 once the
user submits the values to be calculated. In the method

private function calculate():void {
resetToZero();
var num:Number = parseFloat(s21.text);

[code].....

View 1 Replies

ActionScript 2.0 :: Form Field To Check Length Of Input Text?

Feb 27, 2006

i'm trying to get a Flash form to test certain conditions, one of which is the full date (ie 2006 as opposed to 06), but the AS below (in bold) isn't working... does anybody know the right script?

on (release) {
if (!name.length) {
text.emailstatus = "please enter your name";

[code]....

View 15 Replies

ActionScript 3.0 :: Loop Objects On Stage Input Text Check Box?

Oct 9, 2010

i have several check boxes and input texts on stage and would like to null out their values with a reset button but seem to be having issues, can anyone take a look

[Code]....

TypeError: Error #1010: A term is undefined and has no properties.
at Main/resetHandler()

View 9 Replies

ActionScript 2.0 :: Check What The User Types In Input Text Field?

Nov 25, 2010

I have input text box. the user can place there answer to question 1 in the textbox. what is the capital of the united Kingdom.the answer is london. so i want a to be able to check the user has subbmitted and typed letters london as there answer. i want to check in iput textbox ( the letter keys "london")

ActionScript Code:
var score = 0;
if(question1 == "london"){
score +=1;

View 9 Replies

ActionScript 2.0 :: If Statement: Check If An Input Text Field Is Empty

Jun 3, 2004

I want to check if an input text field is empty. I only managed to do it this way;

mytext = textfield.text;
if(mytext != "") .....

The problem with this approach is that I also want to exclude variables with whitespaces.
I tried; if(!isEmpty(mytext) )..... but that didnt work.

View 11 Replies

ActionScript 2.0 :: Check User Answer By Checking Input Text Box

Jul 26, 2004

how do i check the answer that enter by user.... the marks is given by checking whether they user key in the keywords or not... i m thinking of using string method...but i not able to do it...

View 1 Replies

ActionScript 2.0 :: Check To See If The User Inputted A Number Into An Input Text Field

Jan 28, 2010

I'm trying to do a check to see if the user inputed a number into an input text field. I'm also running a check to see if the user has left the input blank (which works just fine), but I can seem to get the NaN function working.

(using actionscript 2.0 w/ flash CS3)

Quote:

this.btn_step1next.onRelease = function() {
if ( zipcode.text == "" || zipcode.text == isNaN() ) {
message.text = "Please enter your ZIP code to continue.";
} else {

[Code]....

View 2 Replies

ActionScript 3.0 :: Flash Form - Multiple Text Input / Dropdown And Check Boxes

May 4, 2011

I am new to writing ActionScript and I'm designing a customer form for my web site. I am using multiple textInput's, Dropdown boxes and check boxes. Here is some of the code I have now for this form: [URL].
Code:
package{
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
[Code] .....

View 1 Replies

ActionScript 2.0 :: Input Quiz - Check Input Answer Against Random Display From Array

Jan 21, 2009

I am trying to check input answer against random display from array. but sometime it trace not correct when it is correct this is the code i use

[CODE]....

View 7 Replies

ActionScript 2.0 :: Take A The Text From And Input Text Box And When You Press A Submit Button Have It Post To A Php Page

Oct 15, 2009

I want is to take a the text from and input text box and when you press a submit button have it post to a php page. All was going well... but then I changed my code from value1 = "password" to value1 = password.text; and the php instead of coming back with the user's password, comes back undefined. WHY WHY WHy, does it except it when I say value1 = "password" and not with the value1 = password.text; (and 'password' is the instance name of the input text... (not using flash vars)

[Code]...

View 14 Replies

INPUT TEXT And Button Interactions?

Dec 13, 2009

I have this frame where in the button links will change whenever the textbox changes. Here is an attached sample image so you could imagine what I am trying to say. For the

textboxes (instance anme: voca2_pg and voca3_pg)
 
it should be 10-20 then when next button is clicked, it will be
 
20-3030-4040-5050-6060-7070-8080-9090-100
 
For short, the next and back button will operate the textboxes.
 
but if I type for example 25 (on voa2_pg textbox), it will show 25-35 (basically getting 10 numbers in all)
 
ex. I typed 43it will look like: 43 - 53 or if I type 88it will look like: 88 - 98 And then the purple button below also will change every numbering..10 - 20 the AS is:

on (release) {
getURL("javascript:command_voca(1,1)","_self");
}
20-30on (release) {

[code]....

View 1 Replies

ActionScript 2.0 :: Input Text Change With Button?

Sep 23, 2009

Using the text tool, I have made a Input Textbox with the instance name of voca2_pg and the other one is voca3_pg. It has a text inside: 1 and 11, respectively.Now I made a button that should send info to the input text that when I click the back button, text will change to a lower number, or when I click the next button it will change to a higher number. Example: (they are inside the textbox)

View 21 Replies

ActionScript 3.0 :: Input Text Box / Button Should Be Invisible

Apr 7, 2010

i am using one input text box and one button. In the beginning the button should be invisible. Once i started to type text in input text box, the button should be visible.I used following script. But it's not working.[code]

View 2 Replies

ActionScript 3.0 :: Input Dynamic Text Using A Button?

Jul 16, 2010

I would like to input a numerical value into a dynamic text field using a button. The numerical values is one, the button is called a1_btn The dynamic input text field is called results_txt

This is the code I am using. Even though it shows no script errors, clicking on the button doesn't input the number on the dynamic text field

//Mouse event code
a1_btn.addEventListener(MouseEvent.CLICK, onClick);
//this is the value of the number
var number1:Number = 1;

[Code].....

View 1 Replies

ActionScript 1/2 :: Input Text With Submit Button

Apr 29, 2009

I'm a Flash newbie using the program to develop a multimedia lesson. I want to include some practice questions where students are asked to answer a quesion by typing numerical values in the box. Then when they hit "enter" I want it to take them to a new question if they get the right answer, or a screen that says "try again" if they get it wrong. Here's the script that I used. I attached it to the "enter" button. The variable name is "answer_box"

[Code]...

View 3 Replies

Printing With Button And Submitting Input Text In CS4?

May 15, 2009

I am trying to make a box where a student enters their name and then clicks a button so their name is rememered and shows up.  I have created an input text instance called "nameText" and a button to submit it called "submitMe".
 
Second, in this game I would like to keep track of when a specific button is clicked.  In this game I'm having incoming freshman into college decide if the statement applies to college or high school by clicking on a button (saying high school or college).  I want to keep track of their choices and display them on a result page, then clear when I click the replay button on the results page.  Each button has its own name for each of the 12 questions (hs1 for high school c1 for college, and so forth until hs12 and c12).
 
Third, I'm looking for any advice on how to print in flash. The person I am developing this program for wants students to print their results (with their name on it from the "nameText" input field) and be able to hand it in to her in class.  I am not sure how to do this and I can't seem to find a clear way that works.  I have made a button called "printMe" 

Otherwise I've attached the swf file so you can see what I'm thinking.

View 3 Replies

ActionScript 2.0 :: Input Text Box A And Button On The Stage?

Feb 21, 2010

I have a input text box a and button on the stage. The Input text box contains the following:

my_txt.text = "This is a test";
When the user clicks the button it executes the following:
var my_fmt:TextFormat = new TextFormat();
my_fmt.bold = true;
my_txt.setNewTextFormat(my_fmt);

When I start typing in the (my_txt) inputbox the text is not bolded. Am I missing something?

View 2 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 :: 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

ActionScript 3.0 :: Click The Button When The User Input A Text

Jul 27, 2010

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

View 9 Replies

IDE :: Triggering An Action Off Of An Input Text Field Without Using A Button?

Jul 18, 2009

I have an input text field set to Password and set to a max of 8 characters. When the 8 characters have been typed in to the input field this needs to trigger (without any sort of button action involved) the playhead moving to frame 20 of the timeline.

I have labeled my input field as passwordTxt.

View 1 Replies

ActionScript 3.0 :: Load Input Text Into Url String And Attach It To A Button?

Mar 11, 2009

I have a simple page with a text box and a go button on it. I am trying to build a URL from text that's put in that box.For example, someone types "peanut" in the box, then hits the go button.When they do, it loads the page "http:[url].....It seems simple, but I am not getting the variable to store/pass properly.

View 5 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

ActionScript 1/2 :: Make 4 Input Text Boxes, And A Button In The Middle?

Oct 2, 2009

I am willing to use Macromedia Flash this year to make my physics project. Well, its going to be force resultant calculator. for ones dont know how it gets counted.
 
Well, I'll make 4 input text boxes, and a button in the middle. 1 text boxin the north, (power effect the body from the north) one on the south, one on the east and one on the west.(I've done that part).
 
Then, ill need it to subtract the north - south and east - west on(release), and display that on a dynamic box called Fx (east - west) and another called FY (north - south) Finally, I'll need it fethagorth the Fx and FY to give me the final force resultant. I've done the 4 input boxes and a button, I'll still need someone gimme the action script for subtraction and fethagorth (or atleast teach me how to do it).

View 1 Replies

ActionScript 3.0 :: Make Input Text/search Button On Site?

Aug 24, 2009

make a input text/search button on my site.

I have a bunch of pdf files in a specific location on my site (mysite.com/pdf).

I want to create a search field where the end user inputs text into a field and flash locates and opens the corresponding pdf file (mysite.com/pdf/myfile.pdf).

View 0 Replies







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