Ok so now the problem is the tempNode is lagging. So when you move the mouse the sprite lags behind anywhere from 10 to 50 pixels behind.
I tried switching it from a EnterFrame event to a MouseMove event and using updateAfter but it still lags the same amount. Anyone have any suggestions? --- In [email protected], "flexaustin" <flexaus...@...> wrote: > > TempNode isn't on the main the stage its down in about 6 containers. I > thought it was the same but the first way the mouse only traveled 50% of the > distance to the mouse. > > > > --- In [email protected], Paul Andrews <paul@> wrote: > > > > 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 [email protected], "flexaustin" <flexaustin@> 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 > > > > > > > > > > > > > > > > > >

