# Platform game gotoAndPlay problems

**URL:** https://forum.kirupa.com/t/platform-game-gotoandplay-problems/301326
**Category:** Uncategorized
**Created:** [December 7, 2009, 8:13pm UTC](https://forum.kirupa.com/t/platform-game-gotoandplay-problems/301326 "2009-12-07T20:13:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![spellbound55](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@spellbound55](https://forum.kirupa.com/u/spellbound55)
#### Post date: [December 7, 2009, 8:13pm UTC](https://forum.kirupa.com/t/platform-game-gotoandplay-problems/301326/1 "2009-12-07T20:13:18Z")

</div>

Hi, I’ve been making a side-scrolling platform game. when the main sprite dies, (by falling off a cliff and exceeding a certain coordinate) I want the timeline to jump to scene “Death Scene”.

on the sprite I have the death script:

if (this.\_y\>400.0){  
\_root.dead = true;

}  
if (\_root.dead) {  
s1.attachSound(“deathNote”);  
s1.start(0,1);  
unloadMovie(this);  
}

(I know this works because the sound plays and the clip unloads)

and on the main stage I have:

stop();  
if(\_root.dead){  
gotoAndPlay(“Death Scene”, 1);  
}

I cant imagine why it refuses to work- I use the same statement (if(\_root.dead){) on the little movie clip that displays the timer, so that when you die it stops counting down- and it works - -

I’ve tried having the gotoAndPlay attached to the if (\_root.dead){ in the main sprite, but that doesnt work either.

any ideas what’s up or alternate ways that I can do this?

Its a class project and its due soon!

thanks!
