# Random Frame or MC, but ignore current frame

**URL:** <https://forum.kirupa.com/t/random-frame-or-mc-but-ignore-current-frame/226144>\
**Category:** flash\
**Created:** [May 18, 2007, 1:15pm UTC](https://forum.kirupa.com/t/random-frame-or-mc-but-ignore-current-frame/226144 "2007-05-18T13:15:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tyg3r](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tyg3r/32/1341_2.png) [@Tyg3r](https://forum.kirupa.com/u/Tyg3r)\
**Post date:** [May 18, 2007, 1:15pm UTC](https://forum.kirupa.com/t/random-frame-or-mc-but-ignore-current-frame/226144/1 "2007-05-18T13:15:31Z")

</div>

Hi, I’ve got this:

[AS]gotoAndStop(random(5)+1);  
//or  
this[“btn”+(random(5)+1)].onPress();[/AS]  
But I’m having troubles telling it to ignore the current frame or MC its on. I only need it to randomise to something else… not what its already on.

Any ideas? perhaps it needs to set a few variables, then do a quick function check before actually randomising?

Thanks for your time.

Mark
