PDA

View Full Version : building a card game...



Lemmy
March 16th, 2006, 06:52 PM
hi.
I've been trying to move array elements from one array to another using the push method. The problem is that the element pushed should any longer be on the first array where it was taken from. That's where i'm stuck...

Unfortunately, i cannot upload the fla cause it exceeds the limit so here's the code. The array elements correspond to MCs in the library. Mayber it's the wrong way to do this...hmm, you can grab the fla here (http://geocities.com/lemmyz1/array_deck.zip)

Smee
March 16th, 2006, 09:56 PM
I haven't looked at the fla, but you can use Array.splice() to remove elements from an array. Look on google or the Flash documentation for an explination on it's use.

bombsledder
March 18th, 2006, 06:41 PM
or better yet you could say like this

myarray1
myarray2

myarray2.push(myarray1.slice(3))

TheCanadian
March 18th, 2006, 08:33 PM
Already answered this here:
http://www.kirupa.com/forum/showthread.php?t=212515

:p:

Joppe
March 19th, 2006, 05:16 AM
Your footer is too big.