ActionScript 3.0 :: XML Quiz With Correct Answers - Arranging Within Array

May 18, 2009

I need to put together a really simple flash Quiz for this project I am working on
and I am having a hell of a time figuring out a few key aspects.

1. When working with an array and an xml file, how can I assign the "correct" answer if a user selected the wrong option. Ideally I would love it to say for example " sorry, Egyptians was the correct answer" but would settle for " sorry, 3 was the correct answer" if that is easier to arrange within an array.

2. How can I make it so it marks your first answer and only your first answer (as opposed to how it is now where if you guessed wrong you can keep on guessing until it is right and it will notice the right answer and ignore the wrong)?
Files attached here [URL]

View 7 Replies


Similar Posts:


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 :: Multiple Choice Quiz - Tracking All Correct Answers?

Mar 24, 2004

I am currently trying to create a multiple choice quiz. Alright, what I want to do is this - I want to create a multiple choice like this, where user click the answer and they will be linked to a feedback page, telling them what is wrong with their answer. Then they can click an "OK" button to proceed to the next scene where there will be the next qns. The reason why I am not putting all in the same scene is because I need to do up a different scenario for each of the qns.

If I were to have ten qns in one scene, I was told it is "no good" by my lecturer. At the end of the ten qns, there will be a grading of points. I want the script to be able to track all correct answers despite all qns being on different scenes. Because I want the grade to show at the evaluation scene. is it possible to capture the answer user has clicked on, store to the array, store in another array as one point if it is a correct answer and click next to go to the next scene for the 2nd qns, not next frame.

View 14 Replies

ActionScript 2.0 :: XML Quiz Array Answers With Different Values?

May 20, 2009

I have this project where I have a quiz template that I am using(as2) and I have everything exactly the way I want it except.that I need for the individual questions to hold a different value from one another.

for example

Question 1 = 10 points
Question 2 = 20 points

so on and so forth

right now I have it so they are an equal percentage of the total (ie 10 questions all are worth 10 points)and I need to change thatunfortunately I am still teaching myself AS but even more unfortunate for me is that I am learning AS3 and this template is AS2 I also have not done much in this vein I have been concentrating more on UI kind of stuff and less on the math side also it makes no difference to me if this is done in AS or XML this file will not be continually updated so it can be a one time deal

View 5 Replies

ActionScript 2.0 :: Magic 8-ball - Answers Array To Store All The Answers And Then Call Them At Random Into The "answers" Field?

May 24, 2004

I've got an input field called "question" where you can type whatever you want, an ASK button called "ask" and a response field called "answer". Once you enter a question and hit the ASK button I want flash to randomly reply in the "answer" field with YES, NO, MAYBE, DEFINATELY etc.

Do I need some kind of answers array to store all the answers and then call them at random into the "answers" field? Am I on the right track?

View 7 Replies

ActionScript 3.0 :: Quiz With XML Questions And Answers

Nov 18, 2009

I'm trying to create a simple quiz that picks questions from an XML file, then checks the answer the user enters against the answers stored in the same XML file. Every time you press blue_btn it should bring up a new question. Right now I'm stuck -- it shows only the last question in the XML file, when I enter the right answer it tells me it's wrong, and when I press blue_btn again nothing happens.

[Code]....

View 4 Replies

Professional :: Tutorial For Quiz With Multiple Answers?

Jul 10, 2010

I'm looking for a decent, step-by-step tutorial on how to make a QUIZ with MULTIPLE ANSWERS in Flash 8.

View 1 Replies

ActionScript 2.0 :: Making Quiz Where User Type In Answers?

Dec 21, 2011

I am making a quiz what I want to do is: when the user types in the correct answer a tick appears and when they type in a wrong answer a cross appears I want this to happen on a single frame. How to make these type in boxes and how to make the above stuff happen.

View 1 Replies

Professional :: Interactive Quiz - Three Questions That The User Must Answer With Three Possible Answers In Frames 3,4 And 5?

Feb 10, 2010

For my project i am creating a quiz on the Romans. There are only three questions that the user must answer with three possible answers in frames 3,4 and 5.I want to know the code that would help me to allow a Jpeg (an evaluation of the answer given on each frame) to be placed on frame 6 ready for the user to receive feedback for each answer they have given. So when the user selects an answer, the corresponding jpeg to that answer is placed ready on frame 6 for their arrival after they have answered the third question.

View 1 Replies

ActionScript 2.0 :: Flash Xml Quiz - Grab A Question / Answers Based On A Variable

Jul 26, 2006

I have an xml doc that has 6 categories that are colors and 4 questions that fall under each category. My question is I'm trying to create a quiz that will grab a question/answers based on a variable between 1-6 from the (6) categories in the xml doc. But the kicker is I want the user to have to choose from a different category if the 1-6 variables are different. And I need to walk down and grab a different question if they have been to blue before or maybe just a random question from the blue or green section.

[Code]...

View 2 Replies

ActionScript 2.0 :: Make The Correct Answers Appear After 5 Seconds?

Sep 19, 2005

I'm making 8 input boxes with 8 different answers. Users can key in their answers in the input boxes. The order of the 8 answers will not affect their results. However when users get the wrong answers, the wrong answers will be deleted. My question here is, when the wrong answers are deleted automatically, how do i make the correct answers to appear by themselves after 5 seconds? Below is my code that i put on a "check answer" button.

on(release)
{
answers = new Array(8);
answers[0] = "professional selling";[code].....

View 4 Replies

ActionScript 3.0 :: Drag And Drop - Checking Correct Answers

Feb 24, 2011

I am after finding out which drag and drops are correct, so I can score accordingly rather than just have a single score throughout. I need to know if the circle was dropped correctly or the square etc. I'd ideally like to have this interaction as a command on a button, but my AS3 is letting me down

var score:Number = 0;
var startX:Number;
var startY:Number;

[code]......

View 5 Replies

ActionScript 3.0 :: Setting XML Based Exam To Where There Are Two Correct Answers In A Question

Apr 9, 2009

I have an exam which pulls in questions from an XML file and to indicate what the correct answer is you would indicate in the XML as such:

[Code]...

There is one question, that is structured so there are two right answers, but when I add correct="true" to both answers I want as right only one is calculated correctly in the scoring. I thinking I need to make an adjustment in the code that pulls in the XML, but not sure where. Here is the AS code.

[Code]...

View 11 Replies

ActionScript 3.0 :: Increase & Decrease Operators - Count The Number Of Correct And Incorrect Answers

Jul 11, 2009

I'm using AS3 in timeline. I'm working on a multiplication game. The idea is to count the number of correct and incorrect answers and give the user a final count. I have several dynamic text boxes: box1 and box2 will multiply each other.box3 = input box; user inputs answerbox4 = message displaysbox5 = correct1; displays correct countbox6 = correct2; displays incorrect count buttonsbt_1 = checks answersbt_2 = resets problems PROBLEM:I CAN'T GET BOX6 COUNT THE INCORRECT ANSWERS. HOW CAN I FIX THIS PROBLEM?

[Code]...

View 3 Replies

Professional :: Multiple Choice Quiz - How To Set Correct Answer

Jul 1, 2010

I'm using CS4 and trying to create a new quiz using one of the templates.I can see how to edit it to get only Multiple Choice but I'm stuck at one thing - I can't see where to specify which choice is the correct one.

View 4 Replies

ActionScript 3.0 :: Create Flash Quiz Based On Circling The Correct Answer?

Dec 27, 2010

I am quite new to actionscripting and need to create a flash based quiz.The user will have to circle the correct answer in the quiz.I do know of drag and drop function but didn't know how to create circling function.

View 11 Replies

ActionScript 3.0 :: Arranging Elements Of An Associative Array?

Nov 3, 2009

I had been trying to output the result of the following code in a predictable sequence of my choice:

Code:

var arrAnimal1: Object = new Object();
var arrAnimal2: Object = new Object();
var arrAnimal3: Object = new Object();

[Code].....

View 2 Replies

ActionScript 3.0 :: Arranging Objects In An Array By Alphabetical Order?

Nov 30, 2009

I have an array with names of people randomly selected varying from 10-1000 names into a single array. I was wondering if anyone can point in the right direction on making the array alphabetical order so when I create a drop down box they come out alphabetize

View 2 Replies

ActionScript 2.0 :: Make New Array From Previous Answers?

Sep 22, 2007

I have sections with questions and answers which I can get. But, I need to save each section into new array and tally all the final scores.The screen will show the section score of current section that was just completed and the final score.I know the code has lots of problems - attached.For the total scores the dynamic text boxes var's are totalnumcorrect, totalnumIncorrect, totaluserScore.For the section score the dynamic text boxes var's are numcorrect, totalnumIncorrect, totaluserScore.

View 1 Replies

ActionScript 1/2 :: Create A Questionnaire And Store The User Answers In An Array Or A Database?

Apr 9, 2012

My project is creating a questionnaire in Flash and then storing the user answers in an array or a database for later analysis. although i was excellent in coding when i was in college, recently i forgot many parts

View 1 Replies

Actionscript 3 :: After Shuffling Array - Variable = Array[index] Gives 0, Trace(array[index]) Gives Correct Number

Aug 16, 2011

I think it would be simplest to explain it like this:

[Code]...

View 1 Replies

ActionScript 2.0 :: Quiz Check Uncheck With Array

Nov 17, 2011

there I�m making a quiz and would like to use an mc as a custom radio button, the thing is when I click an option it "checks" but when I click another mc when that check is active it "uncheck":

[Code]...

View 7 Replies

ActionScript 3.0 :: Multidimensional Array - Make A Quiz Program?

Jan 11, 2012

I guess I'm trying to create a multidimensional array. I'm trying to make a quiz program where each array entry has a: question, 4 answer choices, and the correct answer choice key.I wrote it in ActionScript 2 but I want to convert it to ActionScript 3 and I am lost on how to do something similar.I couldn't find any similar examples to the code I wrote.preciated.

ActionScript Code:
function mulChoice(question, choiceA, choiceB, choiceC, choiceD, correctChoice) {
this.question = question;
 this.choiceA = choiceA;[code]....

View 9 Replies

ActionScript 3.0 :: Correct Syntax For Referencing Array?

Sep 6, 2011

I have a number of XMLList objects:
 
_xml.group1..image[i]
_xml.group2..image[i]
_xml.group3..image[i]
_xml.group4..image[i]
_xml.group5..image[i]
 Im trying to reference each object thus:
_xml.group[myVariable]..image[i]
 
But it doesnt work. What's the correct syntax?

View 3 Replies

ActionScript 2.0 :: Array To Check If The Question Was Correct

Dec 16, 2006

I've created a quiz with 50 questions that is linked to a score page that the user can access at anytime to see which questions they have right or wrong. this score page has 50 ticks for when the user gets the question correct. what is need help with is trying to get an array to check if the question was correct and if so turn to tick to _alpha = 100; once each question has been answer correctly a _global var is passed and the if statement picks it up

[Code]...

View 3 Replies

ActionScript 3.0 :: Correct Way To Add Null Bytes In A Byte Array?

Jul 18, 2010

How do you add null bytes to a byte array or in my case I need to pad a byte array with null bytes before its wrote to disk.

View 1 Replies

ActionScript 2.0 :: Buttons In Array - OnPress Correct Sequence

Feb 10, 2011

I have pressed the buttons in a array. The objective is press the buttons in the correct sequence.
Correct sequence click "btn1 and btn2" or " btn2 or btn1"
Correct sequence click "btn3 and btn4" or " btn4 or btn3"
Inc correct sequence click "btn1 and btn4" or " btn4 or btn1"
and so on.

I've place a trace the button is returned undefined.
ActionScript Code:
var buttonArray = new Array(btn1, btn2, btn3, btn4);
var clicks = 0;
for(i =0; i < buttonArray.length; i++){
buttonArray[i] .onPress = function(){
trace(buttonArray[i] + "click");
}}

View 9 Replies

ActionScript 3.0 :: Correct Syntax To AddChild() Using Array Index

Jul 27, 2009

I'm using addChild(new nmonster()) to populate an on stage MC from my Library.

Instead of specifying the Symbol, I want to add it using an Array reference, like addChild(new monsterArray[0]()). I've tried a number of variations, but AS3.0 is unforgiving.

View 4 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 :: Get The Depths Of All The Blocks To Be At The Correct Levels At The Correct Times

Dec 30, 2009

I'm trying to get the depths of all the blocks to be at the correct levels at the correct times so that the 3d effect is maintained. I've tried many things, but have had little success. All the instances of the blocks are stored in an array, but since it's adding them in accordance with when they're added to the stage, it doesn't help me locate them to swap depths. Is there a way to arrange them by location on the board?

View 4 Replies







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