Got it.

var pt:Point = tempNode.localToGlobal( new Point ( 0, 0 ) );
                        var vx:Number = (tempNode.stage.mouseX) - pt.x;
                        var vy:Number = (tempNode.stage.mouseY) - pt.y;
                        tempNode.x += vx;
                        tempNode.y += vy;


Always put everything on the same playing field, the stage.



--- In [email protected], "flexaustin" <flexaus...@...> wrote:
>
> Is there a reason this wouldn't work?  I am using the scale as the main 
> canvas can be scaled down.
> 
> var vx:Number = (tempNode.stage.mouseX / mainsprite.scaleX )- tempNode.x;
>                       var vy:Number = (tempNode.stage.mouseY / 
> mainsprite.scaleX) - tempNode.y;
>                       tempNode.x += vx;
>                       tempNode.y += vy;
>


Reply via email to