Hi, Im new to AS3 and am trying really hard to convert my AS2 code to AS3. I keep making break throughs only to get stuck again. The current problem is trying to detect a hitTest with the cursor. I use this code very successfully in AS2, when I cannot use an rollover for whatever reason.
This is my AS2 code:
onEnterFrame = function()
{
if(my_mc.hitTest(_root._xmouse, _root._ymouse))
{
race("the mouse is positioned over my_mc")
}
}
This is me trying unsuccessfully to convert it to AS3:
stage.addEventListener(Event.ENTER_FRAME, intro);
function intro(e:Event):void
{
my_mc.hitTest(mouseX, mouseY)
{
trace("the mouse is positioned over my_mc")
}
}
Anyone know where Im going wrong?