# Making a game in flash...switching levels when certain score is reached

**URL:** <https://forum.kirupa.com/t/making-a-game-in-flash-switching-levels-when-certain-score-is-reached/34531>\
**Category:** flash\
**Created:** [November 3, 2003, 8:02pm UTC](https://forum.kirupa.com/t/making-a-game-in-flash-switching-levels-when-certain-score-is-reached/34531 "2003-11-03T20:02:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Luther\_King\_J](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Martin\_Luther\_King\_J](https://forum.kirupa.com/u/Martin_Luther_King_J)\
**Post date:** [November 3, 2003, 8:02pm UTC](https://forum.kirupa.com/t/making-a-game-in-flash-switching-levels-when-certain-score-is-reached/34531/1 "2003-11-03T20:02:55Z")

</div>

k…I’m attempting to make a game in flash, but I’m stuck on how to make the scene change when the score reaches 1000…please help me. .fla attached. Thank Ypu.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 4, 2003, 12:57am UTC](https://forum.kirupa.com/t/making-a-game-in-flash-switching-levels-when-certain-score-is-reached/34531/2 "2003-11-04T00:57:08Z")

</div>

im not on a comp. with flash at the moment so I’ll try and help. Didn’t you ask this the other day? And didn’t I answer it? Ahwell, its all to do with variables. Your score is most likely a textbox right? Well all you need to say is if “score” is greater than 1000 then goto and play frame with level 2.

_EDIT_

I did answer this yesterday. bloody hell! It have better not have been you who asked it!!! just kidding 😃

_EDIT_

It was you!!! Oh you’ll pay for this, don’t think you wont pay!!! (scared yet? I know I am)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 4, 2003, 1:14am UTC](https://forum.kirupa.com/t/making-a-game-in-flash-switching-levels-when-certain-score-is-reached/34531/3 "2003-11-04T01:14:55Z")

</div>

You can run an onEnterFrame to keep checking for the variable that holds the score. When it reaches 1000, go to next scene.  
Something like this:

```auto
this.createEmptyMovieClip("t", 10000);
t.onEnterFrame = function() {
	if (score == 1000) {
		this._parent.gotoAndPlay(frame);//where frame is the frame with the new scene
delete this.onEnterFrame;
	}
};

```
