ActionScript 3.0 :: Add Multiple Choice Answer To An Object?

Oct 18, 2009

I have declared an array which holds an object such as:

var myArr:Array = new Array({Question: 'Primary Colors Are?'});

How can I add the multiple choices to the object These are the choices:
 
red, green, blue
orange, red, white,
purple, yellow, green,
white, black, blue
 
I certainly can create the Answers as:

var myArr:Array = new Array({ Question: 'Primary Colors Are?', Answer1: 'red, green, blue',
, Answer2: 'orange, red, white, Answer3: 'purple, yellow, green', Answer4: 'white, black, blue' });

What I would like to do is to be able to store all the answer choices within an array called AnsArr. Can I declare a new array within the same obejct such as AnsArr and push these choices to it? 

View 3 Replies


Similar Posts:


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 :: Multiple Choice Question Not Displaying Answer Feedback?

Jun 9, 2011

I have a few multiple choice questions using ActionScript 3.0 that are not displaying the answer feedback when tested as a movie or published to a swf. The way the question is set up is that a learner clicks a radio button and then clicks a Check Answer button. A red X or green checkmark appears next to the selected answer choice.Incorrect/Correct feedback should then appear below the Check Answer button.Currently the Incorrect/Correct answer feedback is not appearing in the output box when published.
 
stop();
 var currBtn = "";
var currSelected:Number = 0;[code].......

View 1 Replies

ActionScript 3.0 :: Multiple Choice Questions Quiz - Conditional Answer Checking

Jun 7, 2010

I'm working on a quiz-style piece right now and in short it's several pages of multi choice questions, each rewarding a certain point amount that is added up at the end and given specific results based on the point range scored. (i.e. 10-20 = good, 21-30 = great... etc)

For code I've stopped here:
if (answercheck == 40 - 52){
trace("Feedback: Range 40 - 52");
form.gotoAndStop(3);
form.AnswerTotal.Number = answercheck;
}

Answercheck is the var with the total points accumulated. Form is the mc with the feedback frames based on their point totals. AnswerTotal is the dynamic text box I'm trying to load the exact point total the user acquired into at the end.

View 2 Replies

IDE :: XML Flash Quiz (Multiple Choice)

Jan 31, 2007

I have made a quiz from mixing and matching from various tutorials of the internet, and now want to make the questions (multiple choice) and possibly the answers appear shuffled. The xml looks like this:
<quiz>
<title>Quiz</title>
<items>
<item>
<question>In which continent is the country Japan located?</question>
<answer correct="y">Asia</answer>
<answer>Europe</answer>
<answer>Africa</answer>
<answer>America</answer>
</item>
and here is what I've got so far with the actionscript!

View 2 Replies

Multiple Choice Game Containing Questions And The Answers?

Apr 22, 2009

I have a project that i want to make which is a Multiple choice game containing questions and the answers is four pictures when you click on the right answer you move to next question when your are wrong a wrong sign appears i have zero knowladge about flash but i thought this is similar to Geo Challenge in facebook ,,Right ?? what software to download ? any tutorials online ?

View 4 Replies

ActionScript 3.0 :: Randomize Multiple Choice Buttons

Oct 26, 2009

I want to randomly scramble 4 multiple choice buttons (assigning each of them to one of four different positions). I'm trying to (a) randomly extract an element from an array, (b) delete that element from the array, and (c) go through the same process 3 more times till I have 4 random numbers assigned to 4 separate variables. I should be able to assign the buttons to different positions after that. 

Here's the first round of what could loosely be called code:

var firstElement:Number = 0;var distList:Array = ["0", "1", "2", "3"];var distNum0:Number = 0;var distNum1:Number = 0;var distNum2:Number = 0;var distNum3:Number = 0;

[Code].....

View 9 Replies

ActionScript 3.0 :: Setup A Multiple Choice Radio Button?

Jul 21, 2010

I am trying to setup a multiple choice radio button question quiz, but I'm having issues with some of the AS and was hoping some of you could assist me. I'm fairly new to ActionScript, but I'm trying to pick up quickly. The code is listed below. The lines giving errors have been increased in size.

[Code]...

View 9 Replies

Actionscript :: Add Score Tracker In An If / Else Statement For Multiple Choice Game?

Dec 12, 2010

Where and how I'd put the rest for the score tracker? I'm going to be making 3 of these multiple choice questions, so what would be the best way I lay that out and transition from one question to another?[code]...

View 1 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 :: Multiple Choice Questions Where The Question Are Being Fetched From A XML File

Jul 18, 2003

Can somebody give me an example of Multiple Choice Questions, where the question are being fetched from a XML file.

View 5 Replies

Actionscript 2.0 :: Make Interactive Multiple-choice Quiz In Adobe Flash?

Aug 13, 2009

Adobe Flash also lets users make interactive Flash quiz. This tutorial will guide you how to create interactive drop-down multiple-choice quiz in Adobe Flash. This short tutorial is just a sample of the workflow you'll use while authoring in Adobe Flash CS4.

Step 1 - Create a new document

a. Choose File > New.

b. In the New Document dialog box, selcet Flash File (ActionScript 2.0) and then Click OK.

Step 2 - Document settings Right-click on the stage, selcet Document Properties, then the Document Properties dialog box appears. It displays the current Stage size setting as 550*400 pixels, and the Background color swatch is set to white. You can change the size and color of the Stage as you want.

Step 3 - Import image to the stage Choose File > Import > Import to Stage, and then select the image you want. You also could click Ctrl+R to import image.

Step 4 - Add the multiple choice question to the Stage

a. Select the Text tool (T).

b. In the Property inspector (Window > Properties), select Static Text type to specify the type of text field, and then input the question " What was Michael's first song to air on MTV? ". You also could set the font size, family and color of the text.

Step 5 - Add ComboBox component

a. Select Window > Components.

b. Double-click ComboBox in the Components panel.

c. Select the component on the Stage, and name the instance name as box in the properties panel.

Step 6 - Add answer options

a. Select Window > Component Inspector. On the Component Inspector, click data, then the Value dialog box appears.

b. Click + to add answer options, and then replace the defaultValue as answer options, here the options are: thriller, billie jean, bad and the way you make me feel. After that, click OK.
c. On the Component Inspector, click labels, then the Value dialog box appears. Please following the same steps above to add the values by adding the + button.

[code]...

If that's too complicate to you, you could choose some 3rd party quiz makers to make multiple choice quiz for you. Wondershare QuizCreator is such a good Flash quiz maker that help you create multiple Flash quiz with ease.

View 1 Replies

ActionScript 3.0 :: Get An Answer From Input Text Field And Compare It To The Correct Answer?

Jul 8, 2010

I am trying to get an answer from Input text Field and compare it to the correct answer.here is how my code look like:

//I have a confirm button here
confirm_button.addEventListener(MouseEvent.CLICK, ConfirmFunction);
//I have a correct answer as a String here
var correctans:String = "July";

[code]....

This will check if correct answer contains words in the answer from input text field.But that will result on if I key in "July is great", it will still link to the correct answer frame instead of wrong answer frame.I want the answer to be exact same as the correct answer.

View 4 Replies

ActionScript 2.0 :: Button Is Pushed A Answer Is Displayed And On The Answer Frame?

Aug 27, 2010

I have a grid with 12 movieclip buttons. When a button is pushed a answer is displayed and on the answer frame, there's a button "click for more information".

That button points to information in a frame within the mc button. However, when I test it all the buttons on the root timeline appear on top of this information, covering it up.

Also, when you move the mouse while in this "further info" area, it disappears

View 1 Replies

ActionScript 2.0 :: Multiple Conditions - An Object Will Go To A New Frame If Multiple Buttons Are Pressed?

Aug 12, 2009

i have an if statement, an object will go to a new frame if multiple buttons are pressed

PHP Code:[code].....

now i want it so that if one condition is met the mc will goto frame 2, if 2 conditions are met, frame 3 and if 3 conditions are met, frame 4.i know i could do this with a lot of if statements but i have a lot of movie clips to use this code on, so is there any way to write an if statement that will trigger different options if multiple conditions are met?

View 4 Replies

Professional :: Copy Multiple Object On Multiple Layer With ALT?

May 27, 2010

In version before flash CS5, we could copy multiple objects from multiple layer by just click and drag + ALT, that was really usefull and it becames vital for me. Now in the CS5... the click and drag + ALT on multiple objects from multiple layer is copying all objects to only one layer !

View 3 Replies

Professional :: Random Frame Choice With No Repeat?

Sep 1, 2010

I am currently working on a flash game and I only have one major problem left!  I have a series of questions that are each their own movie clip in flash.  I have 13 different questions and thus 13 different movie clips, one for each. The issue I am having is thisDuring the course of a game sometimes a question will repeat itself, and I dont want that. I have tried to make the question selection random and without repeat but have only succeeded with the random part at this point.This is my code for for frame 1:

function randFrame(cFrame){
goFrame = random(11)+2;
if (goFrame == cFrame){

[code].....

View 25 Replies

ActionScript 1/2 :: Use Button To Select Combobox Choice?

Jun 13, 2011

I have a combobox (called "style_cb") and as you might have guseed you can use it to select a "style".The site also has pictures and I'd like users to be able to click the pictures (which are buttons) and have the comboboxautomatically set to that option.So, if the options in the combo are "oranges, apples, pears, cherries" and the pictures are of the same fruits,then clicking on a picture of a fruit (let's say "cherriesBtn") would set the combo box to that option.

View 1 Replies

ActionScript 3.0 :: Map Choice / Scenario With Dictionary + Arrays?

Apr 22, 2011

I am trying to create a scenario type quiz. The student's choice at each question point will take them to a new part of the scenario. So I guess it's a custom story based on student choices.

Anyway, first I am trying to make an authoring tool for this that will allow the scenario creator to graphically map out the scenario. So file icons are created (each representing a step in the scenario) with a number of targets as children (representing the choices). The targets are how the author draws lines from choices to corresponding files. When you click on a target I need to record which choice that is (choice1, choice2, etc) and draw a line from there to the file which the choice must lead to I need to record the name of that file. So, I was thinking that I would use dictionaries since they can be indexed with objects. One dictionary for the files, and one dictionary for the choices in that file.

dict1 --> dict2 --> array
file --> targets --> choice number to next file correlation

But I am having the hardest time getting anything to work. Am I going down the right path or should I change my approach?

View 2 Replies

ActionScript 2.0 :: Simple Multi Choice MC Buttons?

Jul 7, 2011

This is part of a large quiz I am building. The three choices here are part of a group of three from which you should only choose one. If so the other two are enabled=false.I can't change the method only modify since it is part of a much larger app that is runnung fine. So no radio buttons or codeing on maintimeline.

If you run the attached simple FLA and select the first choice you can see the enabled=false that is on the voted and pass framesworks fine, however if you choose the second the first is only disabled and the third is enabled and as logic would have it if you choose the third the first and second are enabled.The idea is to make it so the user can only choose one the other two are disabled while still having the choice to deselect.

View 0 Replies

Professional :: Go To A Frame Based On Radio Button Choice?

Apr 24, 2011

I have created a movieclip that is simply asking a question and the user chooses from a list of Radio buttons.I have set this up and it works fine, but I cannot figure out how to set up a "Next" button or a "Submit" button that, depending on the radio button choice made, the user goes to a specific frame or label.I bought the Adobe Flash CS5 bible, but there seems to be little information on controlling Radio buttons, only how to set them up to test.

View 1 Replies

Actionscript 3 :: Stop The Tween At The Point Of Choice (first Code)?

May 12, 2011

This is for Actionscript 3.0 on CS5.I've been having some issues with fl.transitions.easing.None.easeNone. I tried to animate my MovieClip character without easing and stopping on a dime. I used the following code to stop the easing:

stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
function keyPressed(evt:KeyboardEvent):void
{

[code]....

View 3 Replies

Flash :: Change Default Choice For Autocompleted Classes?

Feb 9, 2011

Sometimes there is a name conflict between classes in two different libraries, but I almost exclusively use one over the other. Unfortunately, the one I am using is not showing up as the first entry and I have to press the down arrow to pick it.

View 1 Replies

Actionscript 3 :: Either Stop The Tween At The Point Of Choice (first Code)?

Jun 5, 2011

This is for Actionscript 3.0 on CS5.I've been having some issues with fl.transitions.easing.None.easeNone. I tried to animate my MovieClip character without easing and stopping on a dime. I used the following code to stop the easing:

stage.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed);
function keyPressed(evt:KeyboardEvent):void
{

[code].....

View 1 Replies

ActionScript 2.0 :: Simple Multi-Choice MovieClip Buttons

Feb 6, 2011

This is part of a large quiz I am building. The three choices here are part of a group of three from which you should only choose one. If so the other two are enabled=false. I can't change the method only modify since it is part of a much larger app that is runnung fine. So no radio buttons or codeing on maintimeline. If you run the attached simple FLA and select the first choice you can see the enabled=false that is on the voted and pass framesworks fine, however if you choose the second the first is only disabled and the third is enabled and as logic would have it if you choose the third the first and second are enabled. The idea is to make it so the user can only choose one the other two are disabled while still having the choice to deselect.

View 1 Replies

ActionScript 2.0 :: Synchronize Movies Depending On User Choice?

May 1, 2011

I have a flash project where I have two movies that are supposed to synchronize, depending on user choices. Most of the time they do, randomly they do not. So I thought perhaps there is something wrong with the code I am using.

Code:
on (press){
this.movie1.gotoAndPlay(random(this.movie1._totalframes));
if(this.movierandom.enabled == false){
this.movie2.gotoAndPlay(this.movie1._currentframe);
}}

What's supposed to happen is, when the button is pressed, movie1 goes to a random frame and plays. If movierandom is not enabled, movie2 is supposed to go to the same frame as movie1 and play. Movie1 and movie2 have the same number of frames. Occasionally, movie2 goes to a different frame.

View 1 Replies

Flash :: Viewer / User Can Watch A Video Clip Of Their Choice

Jun 25, 2009

I want to make a flash form where the viewer/user can watch a video clip of their choice (from a drop-down control or something else if there's a better way). I've found myself totally unable to find our how to do this. I mean, frankly, I don't even know what kind of file to start from the "New..." form at the beginning of Flash (CS 3.0, btw)!

I know how to create a Flash Player and link it to a single video. What I envision is that after the page comes up, with a single player component (initially empty), the user chooses a video from the drop-down list and that video starts playing in the player. What kind of file should I be starting with? {I kinda assume I'll be making an SWF to put on a web page.} Where on earth do I learn how to get the simplest things (e.g., button clicks, etc.) to work?

View 2 Replies

ActionScript 1/2 :: Survey With Several Multipule Choice Questions Using Radio Buttons?

Nov 10, 2009

I have created a survey with several multipule choice questions using radio buttons. I want the last page of the survey to display results to the user kind of like a Cosmo quiz.like "50% A." "25% B." "25% C." "0% D." I can't find any info on how to do this with Actionscript.

View 1 Replies

Flex :: Arraycollection - Assign An Index Of My Choice To Array Collection?

Dec 14, 2010

I want to give an array index to array collection let say 205 when it is started is it possible to do so in flex or any alternate of this.actually I need to index the objects with a specific no, in 2D array collection

say

205 a c d g f d
268 s g h g f f
805 d g h h f f d

where integers are indexes and alphabets are object referenced by these integers

View 2 Replies

Silverlight :: Technology Choice For A Specific Rich/thick Client App?

Dec 14, 2011

I have a django site where I'm thinking about making a rich/thick client app to allow the user to do operations that would otherwise be really difficult to otherwise. some of the requirements would be things like importing xls, csv documents being able to manipulate data from the site and/or from the imported xls in a drag and drop fashion (e.g. put a bunch of users in groups, etc)etc It seems the rich client choices out there seem to be

silverlight
flex
HTML5 + whatever.

and thick client

.NET
Java

I'm not crazy about making a thick client because (desktop/laptop) platform independence would be nice.HTML5 would allow me to offer stuff to users on tablets i suppose,... but it's a luxury and doesn't really fit the main use case anyway.If there is a service provider out there that has a platform for doing things like this that i can just leverage, well that would be awesome too.

View 1 Replies







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