ActionScript 2.0 :: Flash Quiz With Input Text?

Sep 1, 2009

I would like to point out I have spent from 11PM last night to 4:30AM this morning searching the internet trying to find examples and ideas but I just cannot seems to find anything. 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. I have boiled it down to the fact that maybe I just haven't named the input text field with the right variable?

EDIT: I need to use AS 2.0 and not 3.0

Quote:

on (release) {
if (answer == "2") {
gotoAndStop("correct");

[code]....

No matter what answer I select, it will always take me to the "incorrect" box. So I am convinced it has to do with the "IF FUNCTION" and it not being the right name.

View 1 Replies


Similar Posts:


ActionScript 2.0 :: AS 2.0 - Simple If/else Input Text Quiz?

Oct 17, 2009

I have a question regarding an if/else statement I am creating for a simple quiz test in Flash ActionScript 2.0. I have the .FLA file attached. main stage I have the following: of "yes" and "no" with keyframes to jump a message to the user about if their answer was correct or notMy button has the following script:

on(release) {
if(vAnswer == "yes"){
gotoAndPlay("yes");
}else{

[code].....

Am I not doing this correct? Everytime I type yes into the input box, it jumps me to my "no" label. I have researched, and I am doing something so simple and wrong, but I can't figure it out for the life of me.

View 14 Replies

ActionScript 2.0 :: Create A Text Input Quiz Game?

May 28, 2009

I'm trying to create a text input quiz game.In frame 1, I have the actions:

stop();
answer = "";

On my stage I have a graphic symbol which contains a question. I have my blank input box, set to Single Line, Lower case Only. Variable is answer and maximum characters is 18. NO instance name.An Enter button , No instance name, with the attached code:

on (release, keyPress "<Enter>") {
if (answer eq "sun" or answer eq "the sun") {
gotoAndPlay("win");

[code]....

Everytime I enter the words sun or the sun, I get sent to the "wrong" frame instead of my "win" frame.

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 3.0 :: Test To See Whether What Is Input Into A Text Input Box (flash Component) Is Not A Number?

Jul 3, 2009

I'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;
}

View 6 Replies

ActionScript 3.0 :: Flash Make Input Text Box Empty And Ready To Get Next Input From Starting Position?

Jul 26, 2011

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

View 3 Replies

ActionScript 2.0 :: Removing Correct Answers From Array In Of Random Quiz Questions In Xml Quiz?

Jul 21, 2010

Anyone know where to start thinking about logic for an XML quiz with multiple correct answers, that when the user gets the question right, that question is removed from the random array of questions so we never need to answer it again?

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

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

Flash :: Flex. Replace The Selected Text In Text Input

Apr 11, 2011

How do I to make a function that replaces the selected text in text INPUT on the symbol of the selected one from each list?

View 2 Replies

Actionscript 3 :: Display Input Text To Another Text Field Flash?

Oct 10, 2011

I am trying to show input text to another text field on run time. I want to show the myOutputBox with in a movie clip. The code is below:

Actionscript 3

package
{
import flash.display.Sprite;
import flash.display.Stage;

[Code]....

View 1 Replies

Actionscript 3.0 :: Create Text Input In Flash.text.engine?

May 10, 2009

how to create text input in flash.text.engine.i not found property for that in elementFornat ,TextLine,TextBox and...like type priperty in TextFiled

View 3 Replies

ActionScript 3.0 :: Capturing Data In A Text Box On Results Screen For Quiz

Mar 19, 2009

I have a little quiz, where at the end the results are calculated and the test takers are taken to a results screen which calculates their results.

I have AS3 code creating the message screen, and the score is calculating ok. I want to capture the users name on the results page, and this is not working. I have attached the code which calculates the score and where I added the instance name of the test box when they login. I get an error when I publish. The error is "Access of undefined property name name_text"

obviously this is not how to capture that information, but not sure how to do it. Again, I have a text box with the instance name of "name_txt", and I am trying to capture that data on a results screen using AS3.

Code:
feedback.text = "Congrats" +name_txt+ "on finishing the exam!
Your score is "+Math.round(score*100)+"%
You may now close the exam window.";

View 1 Replies

ActionScript 3.0 :: Accessing Input Text (input Text Is On Keyframe 1, Access Required On Keyframe 2)?

Jul 12, 2011

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 Replies

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 3 :: Make Input Text Control Ready For Input On CreationComplete In Flex/MXML?

Mar 19, 2012

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

View 1 Replies

ActionScript 3.0 :: Full Screen Input Not Allowing Text Input

Jun 8, 2010

Notice full screen Icon at top left. My contact for will not except text when it's in full screen mode.

View 1 Replies

ActionScript 3.0 :: Input Text Field Won't Accept Numerical Input

Apr 15, 2011

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

View 2 Replies

Professional :: Assigning More Than One Input Term To Input Text Box

Jun 2, 2011

[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..?

View 3 Replies

ActionScript 2.0 :: PHPBB - Login Through Flash Using One Dynamic Text Field And One Input Text Field And No Buttons?

Jul 17, 2003

Is it possible to login through flash using one Dynamic Text Field and one Input Text Field and no buttons? If so how? I have seen many tutorials dealing with logging in to PHP using flash but it requires you to make your own php scripts which i am not familiar with. Can some one tell me how to do this with PHPBBs existing php scripts... I want to be able to login thorugh a Input Text Field box and have it verify it in PHP and also be able to register and view other PHP info such as users online and FAQ..

View 2 Replies

AS3 :: Professional : Using Input Text In Flash CS4?

Apr 20, 2009

I am trying to take a user's input (His Name) and then greet the user on the next frame using the name he previously entered.

View 18 Replies

AS2 :: Use Input Text As Navigation Flash 8?

Sep 21, 2009

I'm trying to find out if you can use an input text fields as navigation?
 
The idea: If I open my page and then enter (G-12226) or a (MiniGrim) into an input text field is it possible that the flash navigates itself to the Number or Name that is been entered in the input text field, Either automatically or via the touch of a button have no idea what is easiest No idea if this is possible?

View 4 Replies

Flex :: Change Caret (text Cursor) In Editable Text Area / Text Input?

Nov 23, 2009

I need to put together an editable text area that has a custom caret (cursor) which is different from the default blinking vertical line. Is the caret a "skinnable" property of text input? note that I am not asking about the mouse pointer cursor which can be set using the CursorManager.

View 1 Replies

Save An Input Text To Txt File In Flash CS3?

Aug 10, 2009

How do you dynamically save an input text to a .txt file which can be read to another file in Flash CS3? And how do i retrieve the data from the txt file if i want to call it from another file?

View 3 Replies

ActionScript 3.0 :: Get Input Text Field To Flash?

May 17, 2010

Flash CS4 AS 3.0

Trying to help a friend update their website cosmetics. One page has text field inputs that use Javascript, and a Flash output that displays input text. I am far from a flash guru and cannot get the right formula for AS to get the textfield input.

I should be using ExternalInterface class, but cannot get the script right. [code]...

View 4 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 3.0 :: Javascript And Flash Text Input?

Aug 31, 2009

im having a problem with communicating between flash and javascript.i need to build a HTML page that will include flash.in that flash file i need an input text field and a button next to it.when i click on the button a javascript alert needs to pop up and show the text i entered in the flash text field.

View 0 Replies

ActionScript 2.0 :: Flash Login With Input Text?

Jan 29, 2011

I Wanted to make a login with input text's I Got 2 frames.1 Is for Use ur desired username2 To show your usernameActionScript Code:usernamelogin_txt.text "Hi " +_global.movieclip1So dont mind using +_global and that text thing cause it wont work

View 7 Replies







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