# \[F6\] randomizing trouble

**URL:** <https://forum.kirupa.com/t/f6-randomizing-trouble/250270>\
**Category:** flash\
**Created:** [January 27, 2008, 11:31pm UTC](https://forum.kirupa.com/t/f6-randomizing-trouble/250270 "2008-01-27T23:31:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seanbot](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@Seanbot](https://forum.kirupa.com/u/Seanbot)\
**Post date:** [January 27, 2008, 11:31pm UTC](https://forum.kirupa.com/t/f6-randomizing-trouble/250270/1 "2008-01-27T23:31:19Z")

</div>

Im making a simple match card game, the cards are fine its just the initial randomization thats the problem, i tried many different ways until i hit this one, its the closest ive gotton but it still doesnt work

```auto
Card = new Array(_root.CardBlue1, _root.CardBlue2, _root.CardRed1, _root.CardRed2, _root.CardGreen1, _root.CardGreen2, _root.CardYellow1, _root.CardYellow2);
shuffle = random(7);
_x.Card[shuffle] = 50;
_y.Card[shuffle] = 40;
trace(Card.splice(shuffle));
shuffle = random(6);
_x.Card[shuffle] = 250;
_y.Card[shuffle] = 40;
trace(Card.splice(shuffle));
shuffle = random(5);
_x.Card[shuffle] = 450;
_y.Card[shuffle] = 40;
trace(Card.splice(shuffle));
shuffle = random(4);
_x.Card[shuffle] = 650;
_y.Card[shuffle] = 40;
trace(Card.splice(shuffle));
shuffle = random(3);
_x.Card[shuffle] = 50;
_y.Card[shuffle] = 250;
trace(Card.splice(shuffle));
shuffle = random(2);
_x.Card[shuffle] = 250;
_y.Card[shuffle] = 250;
trace(Card.splice(shuffle));
shuffle = random(1);
_x.Card[shuffle] = 450;
_y.Card[shuffle] = 250;
trace(Card.splice(shuffle));
shuffle = random(0);
_x.Card[shuffle] = 650;
_y.Card[shuffle] = 250;
trace(Card.splice(shuffle));

```

i just keep getting outputs like these:

```auto
_level0.CardGreen2,_level0.CardYellow1,_level0.CardYellow2
_level0.CardRed1,_level0.CardRed2,_level0.CardGreen1

_level0.CardBlue1,_level0.CardBlue2

```

and i dont know what that means  
this is my first programming attemptby the way
