# How do I go to random scene?

**URL:** <https://forum.kirupa.com/t/how-do-i-go-to-random-scene/158612>\
**Category:** flash\
**Created:** [August 10, 2005, 6:35pm UTC](https://forum.kirupa.com/t/how-do-i-go-to-random-scene/158612 "2005-08-10T18:35:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrazyWolf](https://avatars.discourse-cdn.com/v4/letter/c/34f0e0/32.png) [@CrazyWolf](https://forum.kirupa.com/u/CrazyWolf)\
**Post date:** [August 10, 2005, 6:35pm UTC](https://forum.kirupa.com/t/how-do-i-go-to-random-scene/158612/1 "2005-08-10T18:35:53Z")

</div>

I have a movie with 6 scenes. Upon starting I want it to start at a random scene not always the first one. I tried the code below to but I get the error :“Scene name must be quoted string”. Help please.

```auto
sceneNum = Math.floor(Math.random() * (7 - 1)) + 1;
gotoAndPlay(sceneNum, 1);

```
