# Why can't I see what is wrong here?

**URL:** <https://forum.kirupa.com/t/why-cant-i-see-what-is-wrong-here/229238>\
**Category:** Uncategorized\
**Created:** [June 15, 2007, 2:20am UTC](https://forum.kirupa.com/t/why-cant-i-see-what-is-wrong-here/229238 "2007-06-15T02:20:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![panzhuli](https://avatars.discourse-cdn.com/v4/letter/p/58956e/32.png) [@panzhuli](https://forum.kirupa.com/u/panzhuli)\
**Post date:** [June 15, 2007, 2:20am UTC](https://forum.kirupa.com/t/why-cant-i-see-what-is-wrong-here/229238/1 "2007-06-15T02:20:40Z")

</div>

I have a mc named image\_holder\_mc behind a mask on frame 1. also on frame 1 is this code:

var start\_x = 0;  
var start\_y = 0;  
image\_holder\_mc.onPress = function(){  
start\_x = \_root.\_xmouse;  
start\_y = \_root.\_ymouse;  
startDrag(this, false, -350, -350, 350, 350);  
trace (“start x::” + start\_x + ", " + start\_y);  
}  
image\_holder\_mc.onRelease = function(){  
if (\_root.\_xmouse == start\_x && \_root.\_ymouse == start\_y){  
//they didn’t drag  
gotoAndPlay(“second”);  
}else{  
stopDrag ();  
}  
}

I also have this code on frame 1:  
loadMovie(filename, “image\_holder\_mc”);  
stop();

The onPress and onRelease functions ONLY work if they are in the actions panel of the mc, not in the functions frame. Ideas?

Thanks!
