flexaustin wrote: > 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. > Isn't that just the same as
tempNode.x = tempNode.stage.mouseX; tempNode.y = tempNode.stage.mouseY; ? Paul > > > --- In flexcoders@yahoogroups.com, "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; >> >> > > > > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Alternative FAQ location: > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links > > > > >