flexaustin 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.
>
>   
Ah, in that case you just get the x co-ordinate within the parent, so 
the simplification doesn't work.

Paul
>
> --- In [email protected], Paul Andrews <p...@...> 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
>>>
>>>
>>>
>>>
>>>
>>>       
>
>
>
>
> ------------------------------------
>
> --
> 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
>
>
>
>
>   

Reply via email to