Trig Positioning Glitch

Hi,
I can’t get this simple class function to work properly.
It’s a version of the eyeball following the mouse, only, instead of rotating a simple graphic with an offcenter iris, I’m trying to move the iris only, positioning it with a trig function using a radius and angle, and using the hypotenuse (pivot to mouse) as the radius, and the angle formed from that triangle.

I’m getting really erratic behavior though.
here’s the swf:

http://www.butcherbaker.org/fodder/Eyeball.swf

I’ve added some text readout and a pointer line.
here’s my code:

// symbol instances “orb”, “iris”,“pointer” and textFields are on Stage of Eyeball.fla (it’s doc class is Eyeball)

package {
import flash.display.MovieClip;
import flash.geom.Point;
import flash.events.Event;
import flash.text.;
public class Eyeball extends MovieClip {
private var _ang:Number;
private var _rad:Number;
private var _maxRad:Number;
private var _tgMaxRad:Number;
private var _pivot:Point;
private var _tgPoint:Point;
public function Eyeball():void {
_ang = 0;
_rad = 10;
_maxRad = 100;
_tgMaxRad = root.width;
_pivot = new Point(orb.x,orb.y);
addEventListener(Event.ENTER_FRAME, onEnterFrame );
}
private function onEnterFrame(e:Event):void {
var dx:Number = mouseX - _pivot.x;
var dy:Number = mouseY - _pivot.y;
var mouseHyp:Number = Math.sqrt(dy
dy+dxdx);
if (mouseHyp<=_maxRad) {
//trace (mouseHyp);
}
var prc:Number = _maxRad/_tgMaxRad;
var radians:Number = Math.atan2(dy,dx);
_ang = radians * 180 / Math.PI;
_rad = mouseHyp;
angReadout.text = String(Math.round(_ang));
mouseReadout.text = String(“mouseX: “+mouseX+”, mouseY: “+mouseY+”
mouseHyp: “+mouseHyp+”
iris {x:”+iris.x +", y:"+iris.y+" }");
**iris.x = _pivot.x + Math.sin(_ang) * _rad;
iris.y = _pivot.y + Math.cos(_ang) * _rad;
pointer.rotation = _ang;
pointer.line.width = mouseHyp
prc;**
}
}
}

You can see it is responding to the mouse, it is using the hypotenuse of pivot to mouse as its radius, but the angle is going wonky. if you move the mouse from 2degrees to -2degrees, it positions the iris roughly 180 degrees, but the pointer line, which is just rotating from its center, is working fine. (pointer line length is a percentage of hypotenuse to mouse, as will Iris radius eventually)

I’ve tried lots of permutations, but can’t seem to figure it out.
if anyone can see what’s wrong with this, please please please help me out.