please help. i have no idea what i'm doing
I've been trying to make something point in another things direction but it's saying unexpected packages then it's saying public funtion is only allowed in a package then access of undefined property then left paren before left brace and so on. here is the code. currently there it's not saying where or what the error is so just take a look:
import flash.display;
import flash.events;
class rHit extends MovieClip
{
rHit.addEventListener(Rat);
function Rat();
{
var angle:Number = Math.atan2 (r.Y, r.X);
var degrees:Number = angle * 180/Math.PI;
rHit.rotation = degrees;
trace();
}
}
