ActionScript 2.0 :: Flash8 : Search Multiple Arrays For A Value?

Feb 26, 2009

I am attempting to search multiple arrays (over 300) for a specific value which will then determine if that question is to be loaded. I have used these over the years as the quizzes simply loaded questions randomly. Now I am appempting to move this into a computer adaptive test format. I have most everything worked out except for this part which is the key to the project.

What I have is 300+ arrays like the ones below. Once a student answers a question either correctly or incorrectly a difcal value is assigned. It is that value I need to search for to determine which question to load.

For example if the student answered a question incorrectly and the difcal was calculated as -4.03 (difcal values are always in array element[0]) I would need to search the all arrays to find that value and then load that array into the question function.

Code:

var q1:Array = new Array();
q1[0] = -4.03;
q1[1] = 0.57;

[code]....

View 2 Replies


Similar Posts:


Arrays :: Search Multidimensional Array (Flash As3) Using Another Array For Search Criteria

Sep 26, 2011

Long story short: I want to search a multidimensional array in AS3 for (in this example) the location of 6 strings - all of which are stored in another unrelared array. Long story long: Once I get the locations (in the multidimensional array) of each string, i then know where it's located, and can access other atributes of that object - so if i found the string "box3" is located in element [5] of my multidimensional array, i can now target: multiArray[5][3] to return the 4th item stored (keeping in mind we're starting from 0, so 3 is the 4th position).

I can get this to work once, but I'm trying to set up a for loop based on the length of my basic string storage array - this array holds (in this example) 6 instance name strings - each time my for loop loops, i need to run a search in my multdimensional array for the next consecutive instance name. Then, once I've located all of them (and store the results in a new temporary array) I can dig around in each location for the info I need.

[Code]...

View 3 Replies

ActionScript 2.0 :: Flash8 Clickable Search Engine?

Apr 11, 2010

I use this search engine, but I try to make click able links. When I find somethink, then I can click on it. I wish to make something like that - I search something, then click on result ( what I find) and then opens poup up window with data from xml file. But I can't make it..

View 2 Replies

ActionScript 2.0 :: [Flash8] Place Image From A Xml Search?

Dec 7, 2005

I am working on a new project, and I need a search engine to look for data and display images and data, I read this senocular tutorial, but I'm too bad for these things and I can't still manage how to load an image.

View 6 Replies

Arrays :: Fastest Way To Merge Multiple Arrays?

Sep 26, 2011

I'm trying to write a function where I can specify any amount of array, and the return value will be an array containing the contents of all of the specified arrays.I've done this, but it seems like a really slow and ugly way of doing it:

var ar1:Array = [1,2,3,4,5,6,7,8,9];
var ar2:Array = ['a','b','c','d','e','f','g','h'];
function merge(...multi):Array[code].....

Is there an inbuilt and more efficient / nice way of achieving this? The result does not need to be in the same order as the input - completely unsorted is fine.

View 3 Replies

ActionScript 2.0 :: Flash8 Using Arrays For More Than 1 MC

Oct 10, 2009

i'm trying to use an array to attach up to 4 movie clips, using the same script. My code I'm using to attach looks like:

Code:
if(en<=4){
EA[t] = attachMovie("enemy", "enemy"+t, depth++);
EA[t]._x = random(300);

[Code]....

This part works fine, but what doesn't work is the script I try to add to the movieclips. If i add EA[t]._x += 10, then only the lastly created enemy moves. How do i make it so that all of the enemies move?

View 9 Replies

ActionScript 2.0 :: Flash8 Creating A Search Engine In Flash Using PHP And MySQL

Feb 27, 2010

So I have this database that's filled with data, but I would like to use Flash as an interface.

So I've got a couple questions, first of all, is it possible to create a text box that when the submit button is pressed, goes to another frame "results" that displays the results, each preferably a link to yet another slide "info" that displays the full entry info?

I already know all the PHP for this, just wondering how to integrate it with flash, and show the results and entries inside flash.

View 6 Replies

Arrays :: Flex DropDown Selection Not Working When Search For Item?

Nov 26, 2011

so here is the problem that I have so far. I tried to simplify my code so I can attempt to figure this out, but I have had absolutely no luck. I have a viewstack that contains 1 dropdown per stack. They share the same data provider. What I want to do is to select the item contents from the first one. Once I do that, when I click a button to the next stack I have a function that searches from index 0 to the dataprovider length and if the item from the first stack matches the second one, I want to have the second dropdown pick that item up and display it. I have it matching, and I try to select it, but when I run the application it shows up like nothing is selected. Here is what I have:

edit: I got it to work for a simple example, but when I attempt to use it in my more complicated example, on that button click it for some reason resets the value of selectedIndex to -1. How do I prevent this from happening? This is working code for the simple example

[Code]...

View 1 Replies

ActionScript 2.0 :: Flash8 Strings, Arrays, And Splitting Errors

Jul 18, 2009

the general goal I'm going for is this: user enters a bunch of text into a textarea. It's parsed word by word into an array, and then the array is gone through. If a certain word (from a list provided by me) is found in the array, then an event will happen later..

[Code]...

View 5 Replies

ActionScript 3.0 :: Multiple Arrays Containing Multiple Objects?

Oct 11, 2009

What's the best way to say:

if(this.object in same array as that.object)

with multiple arrays containing multiple objects?

View 2 Replies

ActionScript 2.0 :: Search Multiple Elements In An Array?

Jun 21, 2009

I'm trying to detect multiple elements in an array. My countTicks:Array contains mostly numbers and below you can see I'm using "logical AND" to try and find them.

The problem is, once I have more than 2 "logical ANDs" (&&) the trace gets called. Which it shouldn't because the array wouldn't yet hold those numbers.

PHP Code:

countTicks = function(){
for (var i = 0; i < tickCount.length; i++){
if (tickCount[i] == 1&&2&&4&&5){

[Code].....

View 5 Replies

Professional :: Multiple File Search And Replace?

Apr 17, 2011

it is possible to do search / replaces in script, text etc over multiple files?  If not, is there any 3rd party software available to do it?I have hundreds of files I have to make the same change in and just wanted to find out before I have to do the mind-numbing process of going through them all.

View 3 Replies

ActionScript 2.0 :: Search Function Across Multiple Swf Movies In A Cd Rom?

Oct 26, 2005

how to do a search function accross multimple swf movies in a cd rom. The situation is like this: i m making an elearning project where i have around 17 to 18 chapters. Now, all the chapters are in flash and they are seperate movies. Now, if someone wants to search for something inside the cd, like say, they are searching for "entertica" then all the pages that is related to that word should show up.. like google search.

View 2 Replies

ActionScript 2.0 :: Using Flash To Search Multiple Documents?

Jul 18, 2008

Is there a way to search multiple documents from Flash? I have a whole bunch of DOC files that I can either make to PDF or FlashPaper documents.

View 8 Replies

ActionScript 2.0 :: Display Multiple Search Results One At A Time?

Apr 7, 2010

I am trying to adapt this search code to display the results one at a time.Right now it displays all the terms it finds all at once and separated by commas. How would I adapt the code so it displays one item or term at a time.

[Code]...

View 9 Replies

ActionScript 3.0 :: Search TextField And Apply Multiple Formats?

Jul 14, 2011

I was interested in searching through the text in a textfield and applying formatting to key words. For example, every time the word 'the' appears, apply a text format the changes it to green and 14pt.[code]...

View 0 Replies

ActionScript 3.0 :: Setup And Search For A XML Node With Multiple Entries?

Nov 19, 2010

I just did Kirupa's (excellent) XML/AS3 tutorial, and I still have one important question. How can I set up and search for an XML node with multiple entries?

for example:

Code:
<Movie>
<MovieTitle>Nine Months</MovieTitle>
<Actors>Hugh Grant, Julianne Moore, Tom Arnold</Actors>
<Movie>

That way, I can use a "for" loop or something (?) to search for actor Hugh Grant, and it'll return all of his (excellent) movies.

View 2 Replies

ActionScript 2.0 :: Inputting Multiple Search Fields Into Query String?

Nov 8, 2006

i am building a little widget that allows a user to type in keyword(s) into one input field and then a zip code into another

when the user clicks submit, it plugs them into the search url

i have it working for one input field, but i am not sure how to append the script for the second field...what would i need to change to the below script to add a second field into that query string?

Code:
btn.onRelease = function(){
getURL("http://www.google.com/search?q="+myInputField,"_blank");
}

View 4 Replies

ActionScript 3.0 :: Multiple HitTestPoint With Arrays?

Mar 26, 2009

How would I change this to do a few test points,if (mydude.hitTestObject(myratarray[i])){

is it along these lines? if (mydude.hitTestPoint(myratarray[i].34,myratarray[i].12,true)){

View 2 Replies

ActionScript 3.0 :: HitTestObject With Multiple Arrays?

Aug 23, 2011

I have been making a game and have run into some problems I want to make a hitTestObject between multiple arrays, i have tried something like this:

for(var i:Number = 0; i < array1.length; i++)
{
array1[i].y -= 10; //Moves object up
for(var a:Number = 0; i < array2.length; a++)

[Code]....
 
When i run it, some object will detect the collision and will output "hit", but some will ignore that. I have also noticed that some object in the array1 stop running the move code (array1[i].y -= 10) after i have added another array.

View 4 Replies

ActionScript 3.0 :: Using Arrays To Load Multiple Swf-s?

Oct 26, 2009

I'm trying to load multiple external swf files into my main movie and arrange them on the stage (talking about 20 or more mc-s) So far I figured out how to load one single mc like this:

Code:
// Make request and loader
var request:URLRequest = new URLRequest("pano1.swf");
var loader:Loader = new Loader();

[Code].....

load an array of swf files and add them all to the stage?

View 11 Replies

ActionScript 2.0 :: Flash8 : Preloading The Multiple Sounds?

May 14, 2009

I have 10 sound files in an array.I am wanting to preload all of them and update a counter once each one loads sucessfully.So when song 2 for instance finishes loading then the counter would be at 2,then 3,etc....I think maybe I need to use a while loop to hook each sound into a load event?

View 1 Replies

Flash8 :: Multiple Album Photo Gallery

Jul 25, 2009

Being a newbie to this flash design and actionscript and self learning with the help of forums and tutorials I have create a simple photo gallery for a website I'm building. And all works fine. What I would like to do is add a list box to display different albums but I am having trouble with the actionscript and how to set out the XML file.

[Code]...

View 1 Replies

ActionScript 2.0 :: Flash8 Affecting Multiple MCs With A For Loop?

Feb 24, 2010

Let's say I have ten widgets that have ten items that need to be turned off. What am I doing wrong here?

Code:
for(i=1;i<=10;i++){
var tempWidget = ["widget0" + i];
trace(tempWidget);
tempWidget.item._visible=false;
}

The trace returns the correct value yet the loop doesn't turn the ten items off. Why?

View 2 Replies

ActionScript 2.0 :: Flash8 - Use One HitTest For Multiple Objects?

Jul 28, 2010

I'll try to make my question pretty short and simple.

[Code]...

So what I'm trying to do is make the character stop when it runs into something. I can do that, but it will only work for one "block" movieclip I put on the stage. What can I do to make this work for multiple "blocks"?

View 2 Replies

ActionScript 2.0 :: [Flash8] Keylistener On Multiple Keys

May 22, 2007

I got a little problem on a simple code: There are 5 Mcs on stage named Key1 to Key5. I got a listener on keyboard that put the mc alpha to 40 if you press the key of the mc (1 - 5), and turn the alpha to 100 if key isn't pressed

Code:
var keyListener:Object = new Object();
keyListener.onKeyDown = function() {
if (Key.isDown(49))key1._alpha=40;

[Code]....

The problem is that it works perfectly if you press a key at time, but it don't work if you press the 5 keys simultaneously , (make strange things :'1' to '4' pressed works, but '3' to '5' make the 5th mc as un-pressed) Is there a fine way to test if the 3 simultaneous keys (char '3' to '5') are pressed ?

View 2 Replies

ActionScript 3.0 :: Loading Multiple Xml Files Into Arrays

Apr 7, 2010

im trying to load 7 xml files into a question array, im unsure as to whether i need 7 arrays or if i can load it into one single array. each xml file has a set of questions for a quiz i am making i have managed to load the first set of questions but i dont really know how to proceed

View 2 Replies

ActionScript 3.0 :: Sorting Multiple Arrays At Different Indexes?

Aug 5, 2009

I just have another really quick question about Arrays, this time about Sorting them. I have just re- written my code to work for matching values from 2 arrays and then adding them to the screen.
 
however it seems as my matching is way off, it matches the items that are at the same index, which is not always the case
 
The output for the matches, which should be side by sideis as follows (which is incorrect) Therfore i am trying to find values at diffrent index levels
 
DunlopbabolatWilsonwilsonHeaddunlopAdidasheadBabolatslazengerSlazegerprincePrincevolklVolkladidas
 
I tried to sort the Array, but it seems as though the array, cannot be sorted the way i want it. I simply wanted to sort it Acending, but changing it to lowecase would not do what i needed it to do.

This is the code, matchInfo function should do all the work

package {
import flash.display.*;
import fl.transitions.*;
import fl.transitions.easing.*;

[Code]....

View 8 Replies

ActionScript 2.0 :: Calling From Multiple Arrays In One Loop?

May 23, 2007

I have two arrays - one for movieclip buttons and one for images. The idea is - rollover a button and it loads it's respective image. I have a loop for the button array that pretty much loads each button and creates a rollover state for it. At the moment it just traces what button the mouse is over. The problem is trying to load the correct image based on that button. The way it is now - it will only load the same image for all the buttons.

Code:
tagPosition = 0;
viciousImgs = new Array("vaI1_mc", "vaI2_mc", "vaI3_mc", "vaI4_mc", "vaI5_mc");
viciousButs = new Array("va1_mc", "va2_mc", "va3_mc", "va4_mc", "va5_mc");
vicious = new Array("vicious_mc", "uTitle_mc", "uTxt_mc", "uButs_mc", viciousImgs, viciousButs);

[code]....

View 2 Replies

ActionScript 2.0 :: Making A Multiple Row Menu With Arrays?

Sep 18, 2007

I'm trying to make a navigation of sorts using a bunch of thumbnails there will be 3 columns and 3 rows.I have made an array of images, created a button with an empty movie clip in it. And I am attempting to make a 3 by 3 grid of buttons based off the array... Here is my code.

cubicThumbs = ["Bracelet_Nugget_1_thmb.jpg","Earring_Nugget_1_thm b.jpg","Necklace_Nugget_1_thmb.jpg","Earring_Nugge t_1_thmb.jpg","Necklace_Nugget_1_thmb.jpg"];

[code].......

View 1 Replies







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