# Click Tag and graphic-following mouse problems

**URL:** https://forum.kirupa.com/t/click-tag-and-graphic-following-mouse-problems/308936
**Category:** Uncategorized
**Created:** [May 3, 2010, 7:42pm UTC](https://forum.kirupa.com/t/click-tag-and-graphic-following-mouse-problems/308936 "2010-05-03T19:42:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![drtyfrank](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@drtyfrank](https://forum.kirupa.com/u/drtyfrank)
#### Post date: [May 3, 2010, 7:42pm UTC](https://forum.kirupa.com/t/click-tag-and-graphic-following-mouse-problems/308936/1 "2010-05-03T19:42:28Z")

</div>

I’m utterly new to this whole Flash thing, but, I have managed to create my banner to my liking and have figured out how to have a graphic on the banner follow wherever the user points their mouse. This is the script that I found/used:

test\_mc.addEventListener(Event.ENTER\_FRAME, do\_stuff);  
function do\_stuff(event:Event):void {  
var myRadians:Number = Math.atan2(mouseY-test\_mc.y, mouseX-test\_mc.x);  
var myDegrees:Number = Math.round((myRadians\*180/Math.PI));  
var yChange:Number = Math.round(mouseY-test\_mc.y);  
var xChange:Number = Math.round(mouseX-test\_mc.x);  
var yMove:Number = Math.round(yChange/1);  
var xMove:Number = Math.round(xChange/1);  
test\_mc.y += yMove;  
test\_mc.x += xMove;  
}

This is applied to the highest layer in the hierarchy with my graphic on it. However, I also have to include a click tag on the banner. Can’t I include that code here, too? Before or after? I tried doing the “invisible button” method, but that nullifies the layer below it, right, if it’s interactive? I just putting the click tag immediately under the graphic(interactive) layer, but that didn’t work either. Shouldn’t it be able to be assigned to an event like onclick or whatever?
