# Help, please

**URL:** <https://forum.kirupa.com/t/help-please/283100>\
**Category:** Uncategorized\
**Created:** [March 2, 2009, 5:23pm UTC](https://forum.kirupa.com/t/help-please/283100 "2009-03-02T17:23:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![capdetrons](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@capdetrons](https://forum.kirupa.com/u/capdetrons)\
**Post date:** [March 2, 2009, 5:23pm UTC](https://forum.kirupa.com/t/help-please/283100/1 "2009-03-02T17:23:26Z")

</div>

I am trying to modify a blackjack game and change the way the cards are dealt. I want to be able to show or hide the card, which I have achieved with the showCard function below and a button using showCard(cardNum), but when the showCards function runs it overwrites the initial value for the playerHand array.

Anyone have an idea of how I could change this?

playerHand = new Array();  
show= [true];

function showCards() {  
this[“playerCard0”].gotoAndStop(“back”);  
this[“playerCard1”].gotoAndStop(“back”);  
this[“playerCard2”].gotoAndStop(playerHand[2]);  
}

function showCard(cardNum) {  
if (show[cardNum]) {  
this[“playerCard”+cardNum].gotoAndStop(playerHand[cardNum]);  
show[cardNum] = false;  
} else {  
this[“playerCard”+cardNum].gotoAndStop(“back”);  
show[cardNum] = true;  
}  
}
