Hey all,

Simple question that I just don't get. I have a simple movie clip of an
arrow and my code works fine when it's on stage. For some reason when i put
the movie clip in a holder clip my code doesn't work as it should. I know
it's a scope thing just don't know how to fix it. Delagate maybe?

any help would sweet thanks



//arrow_mc.onMouseMove = lookMouse;
holder.arrow_mc.onMouseMove = lookMouse;

//function that rotates any object that calls it toward the mouse position
function lookMouse(){
    updateAfterEvent();
    var xdiff:Number = _root._xmouse-this._x;
    var ydiff:Number = _root._ymouse-this._y;
    var angle:Number = Math.atan2(ydiff, xdiff);
    //Convert to degrees
    angle = angle*180/Math.PI;
    trace(angle);
    this._rotation = angle;
};
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to