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
Similar Posts:
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
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
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
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
Dec 12, 2003
I have developed a simple quiz game, but im having a slight problem with it.I have a variable set to myScore=0
Everytime you get a right answer it should increment 2points But when you get all 3 answers correct i get a final score of 4points
View 2 Replies
Aug 23, 2005
I have designed a flash-based quiz for a training program. they've requested to have a timer that runs throughout the movie to add pressure and action to the game and also to display their time at the end.
View 2 Replies
Jul 7, 2011
" What does FPS stand for?"Below it, I have three potential answers:
A) Felt Pen Stimulator,
B)Fries Pickles Saurkraut,
C)Frames Per Second.
As you all (Hopefully!) know, the last answer is the correct one.What would I type in the Actions box so that when you click the right answer, it takes you to the next question,but when you click the wrong answer, it takes you to a game over screen? (Please, PLEASE make sure your code works before you tell me!)
View 2 Replies
Aug 22, 2003
Im am completly baffled as to how go about creating this flowchart type game. If you look at the gif example i have attached the way this works it that the user will click on b1 and then has to click on b2 for it be correct. If the user gets it right the line will become highlighted. If not a number gets added to the attempted clicks score:
What i want to happen is that when the user has linked the boxes from b1 to (b2 - b5), i want to disable b1, since the user has made all the selections.
How would i go about doing this? I tried using true false statements and adding numbers each time one of the buttons was clicked. But it all went horribly wrong. It must be a simple answer, but im just to baffled at the moment to figure it out.
View 12 Replies
Apr 11, 2010
Basically I want to create 6 questions with input boxes next to them for the user to inset their answer. I want them to try three times and then if not correct the answer is displayed for them. In the box with a little description next to it.
Question: How many sides as a square
(answer in the box) = 4
(desc to side of box says) = A square has four equal sides.
View 3 Replies
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
Aug 18, 2009
How can I create input text in Flash CS4?
View 3 Replies
Apr 6, 2010
I have created an array of input text fields from a custom class(TextBox). When the user enters something into a text box, I want to compare it the expected answer (answers:Array). I can't get the keyPressed function to read the input text. When I trace box[boxnum].text it says "undefined". What am I doing wrong and how can I fix it?
[Code]...
View 14 Replies
Sep 19, 2009
I have to creare a javascript alert that will show the value of a flash input text box when i press on the flash button next to it.
i have created in the editor the input text box and the button, and use the following script on the button [code]...
View 2 Replies
Nov 17, 2009
I am creating a form, and I would like to have a highlight around the input text box when the users is focused on that textfield.
i have a highlight movieclip(just a rectangle outline that is a movieclip).
How would i go about placing the highlight mc around the text box? would i use focus_In eventListeners? and call a function that can outline a box that is the input text background?
View 1 Replies
Mar 1, 2010
I'm trying to create an input text field that someone can type in, then by clicking a button, the font changes.
I can't figure out how to:
1 - Embed multiple fonts in an input text field
2 - create a function that chooses and applies a font to the text field
View 1 Replies
Dec 11, 2010
I have a input text field and I want to create a mc of the text that is typed in and birth said mc inside of a mc_container which is on the stage.
can this be done in as 2 ?? im using flash 8
View 3 Replies
Jun 17, 2010
I've been looking everywhere and I can't figure this out. I want an empty text entry box, where you type in a word and hit enter. When you hit enter, it adds this word to an array. The array shouldn't have a limit of the number of words allowed.
View 7 Replies
Feb 8, 2012
I keep getting an error when I try to run an app on BB Playbook that says Cannot create property editable on qnx.fuse.ui.text .StageTextInput.The same exact code works fine in Android and on the Flash Builder built in simulator, but errors on a physical Playbook and in the Blackberry Playbook Simulator. The area of code that seems to be causing the error is as follows:
<s:VGroup includeIn="login" top="10" left="10" right="10" id="loginForm">
<s:Label text="Email" />
<s:TextInput id="txt_email" width="100%" softKeyboardType="email" />[code].....
View 1 Replies
Apr 10, 2010
how can i create input text fileds dynamicaly?i know how to create dynamic text fileds dynamicaly, but how can i create iput text fileds dynamicaly?
View 1 Replies
Dec 11, 2010
I have a input text field and I want to create a mc of the text that is typed in and birth said mc inside of a mc_container which is on the stage.can this be done in as 2
View 2 Replies
Jan 10, 2009
I am new at flash and am trying to create a input text box message that goes away when the user types. Here is an example of what I want to do: [URL] On the bottom right hand corner when you click on the input box, the message goes away. Is it possible to do this in flash?
View 5 Replies
Feb 17, 2009
I tried to create a input text that asks the user to enter a value then i wanted that value to be compared with another var by an if statement but when it gets to that part it always goes to the else condition. I did check the values by making the flash view, they are the same but its still not running as i want it to.
anyways ill leave you with the code :
variables:
btn: a button i created
maq: an empty string that stores the value of the input text
GPA.text: name of the input text
V3: is just a dynamic text to let me know if the condition is met or not
Code:
stop();
btn.addEventListener(MouseEvent.MOUSE_UP,checker);
function checker(Event:MouseEvent):void
[Code]...
View 3 Replies
Mar 21, 2009
How I can make a simple personality quiz in Flash? I've been searching for months for quiz/test codes, tutorials, examples, etc...but I can't find one that would work for a quiz with no "right" or "wrong" answer.
Basically what I want to do is have the user click on statements that they agree with, or answer questions that would lead to one of two possible results.
View 1 Replies
Jan 18, 2010
I have created a form based on this tutorial by senocular: [URL]..The ide is to create input text fields on a site where a viewer can write his/her name and email address and then press "send". When the send button is pressed an email will be sent to my own email account.
My problem is that the email is supposed to contain only a name and an email address which the user wrote in the form.
[Code]...
I'm guessing it is because I use CSS to set the format on the input text fields. How can I solve this problem?
View 4 Replies
Aug 17, 2011
I'd like it to display a question on one page, then have a next button which takes the user to another page telling them if that question was correct or not, and if it is correct they can move on to the next question (by clicking another next button) and if they got it wrong, have to go back and answer it again. However I have no clue how to do this! which includes a quiz. Would it be a better idea to create the quiz in Flash or something and then embed it into my Java application? Or just do the whole thing in Java?
View 2 Replies
Jul 19, 2006
Useful link or resource or idea for creating a quiz in flash.My quiz has got these features that has to be mapped with the functionality
a) total of 150 questions divided in 4 modules
b) a time limit of 180 mts
c) option box or radio button for choices
d) mark for review functionality
e) negative marking
f) final review of correct and wrong answers
this is very similar to BITSAT exam conducted in India, by BITS PILANI as a online exam.
View 4 Replies
Apr 16, 2009
I am writing a class in AS 3.0 to read in a xml file to create content for a quiz. Once I instantiate the xml obj and pass in a string that determines the xml name in the constructor for the xml class I read in the xml and populate some arrays. Evidently in AS 3.0 you have listeners for reading in xml, which is the problem I am having. Once the object is instantiated I try to call on a method called getArray, but the XML hasnt finished being read in and I get a compile error. Error below: TypeError: Error #1009: Cannot access a property or method of a null object reference.at xmlReader_fla::MainTimeline/frame1()
[Code]...
View 1 Replies
Dec 31, 2011
Actually i have a quiz.fla. In the file ,two of them fill inthe blank questions and others are multiple questions.square1_mc must run only once not twice. Ä°f user correct selected, doesnt run it again.However,if mybadscoretext is 1 not increase 2,3,4. :Show i can do all?
stop();
var myScore:Number = 0;
var myBadScore:Number=0;[code]....
View 1 Replies
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