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


Similar Posts:


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 3.0 :: Movieclip Able To Check If Land On The Correct Movieclip?

Sep 20, 2010

I have 8 movieclip on stage, 4 of them being the contents, and the other 4 being the target. I have to drag all of the 4 contents, into the target. apparently, i am able to do that, but the problem i'm facing right now, is the button that is on stage, is suppose to check if the movieclip are in the right place, which i set them.

Here are the codes:

ActionScript Code:
import flash.events.MouseEvent;
import flash.display.MovieClip;
var startX:Number;

[Code]....

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

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

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







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