# Collison detection and gotoAndPlay

**URL:** <https://forum.kirupa.com/t/collison-detection-and-gotoandplay/176458>\
**Category:** Uncategorized\
**Created:** [January 24, 2006, 10:42am UTC](https://forum.kirupa.com/t/collison-detection-and-gotoandplay/176458 "2006-01-24T10:42:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pzan](https://avatars.discourse-cdn.com/v4/letter/p/ecc23a/32.png) [@pzan](https://forum.kirupa.com/u/pzan)\
**Post date:** [January 24, 2006, 10:42am UTC](https://forum.kirupa.com/t/collison-detection-and-gotoandplay/176458/1 "2006-01-24T10:42:42Z")

</div>

Hello I hava a Qustion, I have two movieclips one moving and one that doesn´t move. I have a working collsion detection, but i want to move to a differnet when this occur but i cant get it to work any suggestions. I have this bit of code it it helps anyone?

onClipEvent (enterFrame) {  
if (this.hitTest(\_root.beetle)) {  
\_root.gotoAndPlay(2);  
}  
}  
Many thanks from Sweden
