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?