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


Similar Posts:


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

ActionScript 3.0 :: Uncheck A Checkbox On Reset Btn

Nov 23, 2009

I want to uncheck a checkbox on a reset btn, and surprisingly I'm finding it difficult to find the code.I tried checkbox == null; and it doesn't error out, but it doesn't take the check off of the page.I konw this has got to be simple, but I'm an hour into it and it's a no-go.[code]

View 4 Replies

Actionscript :: Flex - Uncheck A Checkbox In A Component?

Mar 22, 2011

I have a component with checkboxes, the checkboxes are bound to booleans in the main code:

<mx:CheckBox id="LyrClearAll" selected="{Application.application.bLyrClearAll}"/>

This works fine for the checkboxes that dont change unless a user interacts with them again. My problem appears because I want to uncheck one of the boxes everytime the component is closed. (I know something other than a checkbox would work better, but Im trying to keep things consistent in this component.)

I have tried setting the bound Boolean variable to false, and Ive tried setting the checkbox.selected value to false. Neither are working, everytime I open the component the checkbox is still checked.

private function makeLyrsPopUp(evt:MouseEvent):void
{
var panelLyr:popUpLayers = PopUpManager.createPopUp(this, popUpLayers, false) as popUpLayers;

[Code].....

View 2 Replies

ActionScript 2.0 :: For Loop To Check One Array Against Another Array?

Aug 25, 2011

ActionScript Code:
var answerArray:Array = ["3", "2", "5", "3", "2"]; //these are the correct answers
var answeredArray:Array = ["3", "1", "1", "3", "2"]; //this is an example of what the user

[code]....

View 3 Replies

Flex :: Datagrid Data Splitting - Show All Column Values And If Uncheck Columns Has To Show

Jan 23, 2012

In my flex datagird i have a checkbox and a datgrid with seven columns. im populating values in first five column(remaining two column no values) of datgrid by an Arraycollection. now,By clicking the checkbox i want to show all seven column values and if i uncheck five columns has to show... how its possible?? heres my code

[Code]...

View 1 Replies

ActionScript 2.0 :: How To Check If Value Is In Array

Jan 25, 2007

How can I check if the value is in the Array?
Code:
var myArray:Array = Array("firstElement", "secondElement", "thirdElement");
if( myArray.isInArray("firstElement")){
trace("true");
} else {
trace("false");
}

View 3 Replies

ActionScript 3.0 :: Check Xml Node Contains All In Array?

Aug 8, 2010

I'm trying to create a dvd search thing that picks out a dvd according to the filters you put in. It's running of an xml file with each dvd node looking like:

Code:
<dvd>
<title>Departed</title>
<director>Martin Scorsese</director>

[Code].....

View 3 Replies

ActionScript 3.0 :: Check To See When Array Is Empty?

Apr 24, 2009

I have a multiple choice quiz designed for a client. I have an array that works thruout the questions, that if the user answers incorrectly, it stores the question number in the array. When the user reaches the end of the quiz, I dont want this array to always display at the end, since the user could have all the asnwers correct (which means the array should be empty). I am trying to make an if else statement that will display a different message if the array is empty.[code]...

View 3 Replies

ActionScript 3.0 :: Error When Trying To Check An Array

Mar 9, 2012

i am trying to make a game that the score is calculated based on which objects you pick up from the stage. I am having trouble outputting them to the stage.
 
I have assigned the symbols from the library using the code below:   

[Code]...

View 4 Replies

Actionscript 3 :: Check An Array For A Match

Jan 12, 2010

If you have an array with six numbers, say: public var check:Array = new Array[10,12,5,11,9,4]; or public var check:Array = new Array[10,10,5,11,9,4]; How do you check for a match (of a pair?)

View 2 Replies

ActionScript 3.0 :: Check When Value Present In Array?

Feb 3, 2009

What is the best way to check if a value is current in an array and return true or false. [code]...

View 3 Replies

Actionscript 2.0 :: Check If Object Is From An Array?

Nov 27, 2009

I want to check if an object I just clicked is from an array.Sy there are ten objects on stage mc_01, mc_02, mc_03, mc_04, ect.This is my array

Code: Select allvar section_arr_01:Array = [ mc_01, mc_02 ];
And this is a function that will run onPress (all instances)
Code: Select allfunction CheckInstance(input, section_arr_01) {

[code].....

View 7 Replies

ActionScript 2.0 :: Check An Array Whether If It Consist A Value?

May 30, 2008

Here's an array:

var myArr:Array = new Array("January", "February", "March", "April");

if I want to check whether if "February" is presented in myArr, which returns boolean value,how do I write the code?I've looked into the Flash Help but the array constructer seems don't have this type of action that fits my need...

View 4 Replies

ActionScript 2.0 :: How To Check If String Is In Array

Jun 19, 2008

I want to check to see if a string is in an array, so basically:
If (string1 == [any item in array]) {
// do something.
}
But I am not sure how to write it..

View 2 Replies

ActionScript 3.0 :: Check Against All Values Of Array?

Dec 2, 2010

What's the quickest/cleanest way to check against all values within an array (sorta like a huge OR conditional for all array items)?

Example:

Code:
var isTrue:Boolean = false;
for (var k:int=0; k<arr.length; k++) {
if (arr[k] == "whatever") {

[Code]......

View 3 Replies

ActionScript 3.0 :: Check When Any String Of An Array Is Matched?

Jan 28, 2010

I am looking for a way to check if any sting of the Array is matched to the string that in the TextField. In the code it should be something like that [code]...

View 2 Replies

ActionScript 2.0 :: Check If An Element In An Array Exists?

Jan 25, 2007

How do I check if an element in an array exists?

I'm looking for something along the lines of this, but don't know the proper syntax:

ActionScript Code:
if(array[5].exists()) {
// Do something.
}
else {
// Do something else.
}

View 8 Replies

ActionScript 3.0 :: Check If An Element Exists In Array

Feb 18, 2009

Well, I looked at the example, and looks like that was still not what I wanted. Interestingly, I took the middle for loop out and now it appears I am not having issues anymore.[code]

View 7 Replies

ActionScript 2.0 :: Check When Array Item Value Has Been Changed?

Nov 4, 2009

I have Array which contains 4 vars.[code]...

So, now I need to check if my varHloder Array is changed?

View 2 Replies

ActionScript 3.0 :: Check If Any String Of An Array Is Matched?

Jan 28, 2010

I am looking for a way to check if any sting of the Array is matched to the string that in the TextField. In the code it should be something like that:

ActionScript Code:
var TestString:Array = new Array ("chicken", "cat", "dog");
function LookStringArray(){

[code].....

View 4 Replies

ActionScript 2.0 :: Check If Input Is Present In Array?

Jan 31, 2012

how to check if my input is present in my array.

View 7 Replies

ActionScript 2.0 :: Check An Array To See If An Element Has Already Been Added?

Feb 4, 2005

is there a way to check an array to see if an element has already been added? I'm working with an XML document where there are 4 possible variables, but these 4 vars are repeated several times over. It's reading in fine... I just want to pull those specific variables out of the XML and add them to an array, but I do not want them to duplicate. To say it another way... I don't want my array to be more than 4 items long (it is possible to be less) with a max of those 4 different vars.

View 1 Replies

ActionScript 2.0 :: Check Array Doesn't Work?

Feb 4, 2006

if (t1 or t2) = ar[0] or ar[1] or ar[2]
ok = false
else ok is true

[code].....

View 2 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 2.0 :: Check For Existence In Array And Then Store

Jun 8, 2008

I have an array with some elements that may repeat themselves or not (this is actually because they're attributes retrieved from xml nodes, but you don't need to know that); what I want to do is: go through that array and check for elements and store them in another array according to the following condition (this is where it gets tricky): if that element does not exist in the final array yet, store it; if it does exist already, nevermind it.

I wrote this code:
//custom method for searching through array
Array.prototype.contains = function(searchValue){
for(i=0; i<this.length; i++){
if (this[i] == searchValue){
return true
[Code] .....

Trace returns lisbon, oporto, oporto, coimbra, oporto, coimbra wich means that the only element in the destinations array being prevented from getting pushed into the final array is the first element in the initial array (in this case, "lisbon")... but if it prevents the first one, how come it doesn't prevent the others, damn it?...

View 2 Replies







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