# If statement

**URL:** <https://forum.kirupa.com/t/if-statement/320531>\
**Category:** Uncategorized\
**Created:** [March 26, 2011, 4:55am UTC](https://forum.kirupa.com/t/if-statement/320531 "2011-03-26T04:55:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkdanielkli](https://avatars.discourse-cdn.com/v4/letter/d/bb73d2/32.png) [@dkdanielkli](https://forum.kirupa.com/u/dkdanielkli)\
**Post date:** [March 26, 2011, 4:55am UTC](https://forum.kirupa.com/t/if-statement/320531/1 "2011-03-26T04:55:43Z")

</div>

I’m now to as3 and I got a question.  
so this is the situation :  
if player clicks on 1 of 3 buttons and computer chooses a random number from 1 to 3 than show x etc…  
kind of a rock paper scissors game.  
can u give me an example of a code like that ?
