# Slot machine

**URL:** https://forum.kirupa.com/t/slot-machine/281279
**Category:** Uncategorized
**Created:** [February 6, 2009, 8:26pm UTC](https://forum.kirupa.com/t/slot-machine/281279 "2009-02-06T20:26:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![gencoglu](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@gencoglu](https://forum.kirupa.com/u/gencoglu)
#### Post date: [February 6, 2009, 8:26pm UTC](https://forum.kirupa.com/t/slot-machine/281279/1 "2009-02-06T20:26:54Z")

</div>

hi,  
Im tring to create a slot machine game…I have a mask.and I have 3 layers each of which has a motion tween of 120 frames.they animate my 3 slots…the problem is how and where I can assign a random number so that the motion tween should stop at any image.?  
on(press)  
{  
slot1\_mc.gotoAndPlay(2);  
slot2\_mc.gotoAndPlay(2);  
slot3\_mc.gotoAndPlay(2);  
}  
thanks
