# Desperately need for assginment Flash MX 2004 hitTest gotoAndPlay

**URL:** <https://forum.kirupa.com/t/desperately-need-for-assginment-flash-mx-2004-hittest-gotoandplay/63448>\
**Category:** Uncategorized\
**Created:** [September 7, 2004, 1:18am UTC](https://forum.kirupa.com/t/desperately-need-for-assginment-flash-mx-2004-hittest-gotoandplay/63448 "2004-09-07T01:18:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fishinghat](https://avatars.discourse-cdn.com/v4/letter/f/f07891/32.png) [@Fishinghat](https://forum.kirupa.com/u/Fishinghat)\
**Post date:** [September 7, 2004, 1:18am UTC](https://forum.kirupa.com/t/desperately-need-for-assginment-flash-mx-2004-hittest-gotoandplay/63448/1 "2004-09-07T01:18:49Z")

</div>

hey all, just trying to figure out what path is correct, i’ve tried \_root.gotoAndPlay(“S4”, 1);  
this.\_root.gotoAndPlay(“S4”, 1);  
this.gotoAndPlay(“S4”, 1);

statements are in a rock that if it collides with the spaceship, game over, hitTest works, but doesn’t jump to next scene to say “Game Over”.

```auto

if (this.hitTest(this._parent.motherShip)) {
trace("Hit!");
this.stop();
gotoAndPlay("S4", 1);
}

```

Thanks in advance

---

<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:** [September 7, 2004, 4:54pm UTC](https://forum.kirupa.com/t/desperately-need-for-assginment-flash-mx-2004-hittest-gotoandplay/63448/2 "2004-09-07T16:54:53Z")

</div>

Can you post the .fla or at least all of the actionscript so I can see how you’ve been naming things. Also, what levels are the rock and the spaceship on?

And does your trace function work? I think you indicated that it did, the only thing that isn’t working is that your movie isn’t moving to the next scene. Are you sure your scene is named “S4”?

---

<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:** [September 7, 2004, 10:09pm UTC](https://forum.kirupa.com/t/desperately-need-for-assginment-flash-mx-2004-hittest-gotoandplay/63448/3 "2004-09-07T22:09:09Z")

</div>

to go between scenes, i think it’s

```auto
gotoAndPlay("scene", "frame");

```

but don’t quote me on that.

---

<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:** [September 7, 2004, 11:26pm UTC](https://forum.kirupa.com/t/desperately-need-for-assginment-flash-mx-2004-hittest-gotoandplay/63448/4 "2004-09-07T23:26:34Z")

</div>

i think you want \_root.gotoAndPlay(“S4”,4);  
You should really take a peak at this, though.  
[http://www.kirupa.com/developer/actionscript/tricks/root\_parent\_this.htm](http://www.kirupa.com/developer/actionscript/tricks/root_parent_this.htm)
