# Show hide Movie Clip help

**URL:** https://forum.kirupa.com/t/show-hide-movie-clip-help/319340
**Category:** flash
**Created:** [February 17, 2011, 12:34am UTC](https://forum.kirupa.com/t/show-hide-movie-clip-help/319340 "2011-02-17T00:34:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Dragons\_Ire](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Dragons\_Ire](https://forum.kirupa.com/u/Dragons_Ire)
#### Post date: [February 17, 2011, 12:34am UTC](https://forum.kirupa.com/t/show-hide-movie-clip-help/319340/1 "2011-02-17T00:34:27Z")

</div>

Hi, I could someone please help me with a simple flash game I am trying to make, it involves someone pressing a button which generates a random number between 1 and 2, and depending on which number two images are displayed, “heads” and “tails”. Any help is much appricated as I am fairly new to flash and fourms, thank you.

This is what I have so far on the button

on (release) {  
var numCoin = random(2) + 1;  
if (numCoin = 1) {  
heads.\_visible = false;  
tails.\_visible = true;  
}else{  
heads.\_visible = true;  
tails.\_visible = false  
}

}

Thank you
