RE: [Flashcoders] quick array question

2006-02-02 Thread Corban Baxter
Thanks. great help!

Corban Baxter  |  rich media designer  |  www.funimation.com


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Grant Cox
Sent: Wednesday, February 01, 2006 6:17 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] quick array question

Use Array.splice() to remove an element.

randomPos = random(total);
rfcClip = rfcsArray[randomPos];
imgID = imgArray[randomPos];

rfcsArray.splice(randomPos, 1);
imgArray.splice(randomPos, 1);

total--;



Corban Baxter wrote:

Ok one quick array question...

randomPos = random(total);
rfcClip = rfcsArray[randomPos];
imgID = imgArray[randomPos];
total--;
//now how can I delete those two records from my two arrays and
recompile the arrays for use next time? I want to slowing delete the
entire array so that I never use one twice... thanks.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] quick array question

2006-02-01 Thread Corban Baxter
Ok one quick array question...

randomPos = random(total);
rfcClip = rfcsArray[randomPos];
imgID = imgArray[randomPos];
total--;
//now how can I delete those two records from my two arrays and
recompile the arrays for use next time? I want to slowing delete the
entire array so that I never use one twice... thanks.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] quick array question

2006-02-01 Thread Grant Cox

Use Array.splice() to remove an element.

randomPos = random(total);
rfcClip = rfcsArray[randomPos];
imgID = imgArray[randomPos];

rfcsArray.splice(randomPos, 1);
imgArray.splice(randomPos, 1);

total--;



Corban Baxter wrote:


Ok one quick array question...

randomPos = random(total);
rfcClip = rfcsArray[randomPos];
imgID = imgArray[randomPos];
total--;
//now how can I delete those two records from my two arrays and
recompile the arrays for use next time? I want to slowing delete the
entire array so that I never use one twice... thanks.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] quick array question

2006-02-01 Thread thotskee

try checking into the Array .splice method

Method; adds and removes elements from an array. This method modifies the 
array without making a copy.


var myPets_array:Array = new Array(cat, dog, bird, fish);
trace( myPets_array.splice(1) ); // dog,bird,fish
trace( myPets_array ); // cat


- Original Message - 
From: Corban Baxter [EMAIL PROTECTED]

To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Wednesday, February 01, 2006 4:58 PM
Subject: [Flashcoders] quick array question



Ok one quick array question...

randomPos = random(total);
rfcClip = rfcsArray[randomPos];
imgID = imgArray[randomPos];
total--;
//now how can I delete those two records from my two arrays and
recompile the arrays for use next time? I want to slowing delete the
entire array so that I never use one twice... thanks.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders





___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders