# hitTest Not working, instance names correct

**URL:** <https://forum.kirupa.com/t/hittest-not-working-instance-names-correct/160263>\
**Category:** flash\
**Created:** [August 24, 2005, 4:55pm UTC](https://forum.kirupa.com/t/hittest-not-working-instance-names-correct/160263 "2005-08-24T16:55:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skan](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@Skan](https://forum.kirupa.com/u/Skan)\
**Post date:** [August 24, 2005, 4:55pm UTC](https://forum.kirupa.com/t/hittest-not-working-instance-names-correct/160263/1 "2005-08-24T16:55:03Z")

</div>

Im doing a piece of coursework for uni and we have to use flash. we were taught using these crappy instruction booklets and the code is almost never correct.

In this case i cant figure out why this movie isnt working correctly, the others i have fixed, but being new to flash i cant seem to make this one work

```auto
_root.AnimatedPlayer_mc.stop();
disc1_mc.onPress=function(){
	this.startDrag(true,4,50,540,400);
};
disc1_mc.onRelease=function(){
	if (this.hitTest(AnimatedPlayer_mc)){
stopAllSounds();
song=new Sound();
song.attachSound("song1");
Song.Start(1.5,3);
this._visable=false
_root.AnimatedPlayer_mc.play();
	};
};

```

The movie is supposed to play the song “song1” when the “disc1\_mc” movie clip is dragged over the “AnimatedPlayer\_mc” movie clip and released.

“disc1\_mc” is draggable, but once clicked you cant “put it down” and when you release it over “AnimatedPlayer\_mc” nothing happens.

Also when i test my movie in flash MX i get this message

“Symbol=Animated\_Jukebox, Layer=Layer 1, Frame=50: Line 1: Statement must appear within on/onClipEvent handler  
\_”

please help if you can

Skan
