The first one was me trying things. The second one is the one I was actually using. It does turn out to work... Here's the problem it turns out.

the assignment of the movieclips changed but not the way I had expected. for example a 2 of clubs is in deck[0] and I swap it with deck[5] now deck[5] is 2 of clubs and in the has swapped x,y position as well with deck[0] so now I've got to get the x and y and such to swap back...... I wonder if I should make it part of my swap function to somehow have them NOT swap paramaters.