Copy link to clipboard
Copied
mouseX and mouseY is not propery update based on the mouse postion. If I am moving the mouse slowinside the flash its working fine. When mouse moves on average speed out to stage it's value are not proper.
http://www.ilike2flash.com/2009/08/find-mouse-position-in-actionscript-3.html
Look at the above link , Consider I am moving mouse out of stage with average speed it didn't show the end move of mouseX,mouseY. It remain some old value.
The above link stage has width of 400px. When I out from the stage it shows 327 or 349,etc... ofcource mouse cross the 400th px and coming out of stage. But mouseX keeps remain with some other older value.
The above link has "MouseEvent.MOUSE_MOVE" event. I tried with ENTER_FRAME event. Still the same issue is there...
How to solve this issue?
Copy link to clipboard
Copied
You can try speeding up the frame rate of the file. In any case you will be subject to the limitations of the frame rate for such processing.
Copy link to clipboard
Copied
Yes updated the frame rate up to 120... but there is no use . Also If I did something on frame rate all my existing animation will looking too fast.So increase frame rate may not good for me
Copy link to clipboard
Copied
There is a difference between moving your mouse off the SWF content or click-dragging off the SWF content while still holding your mouse button down. Notice that the values continue to update if you click-drag off the SWF content in the example you posted.
If you need to get mouse coordinates outside your SWF without click-dragging you can set up communication between Javascript and the SWF. Here's an example: JS and AS3 mouse coordinates outside swf object | Nelson Diotto Tech Hive
Copy link to clipboard
Copied
Hey Elliot,
Thanks for the input... Yes I saw that mouse down value keep updating outside of the SWF.
Unfortunately my problem is not related to find the mouse x,y of swf out side of the swf content.
The actual issue is to find the last mouseX,mouseY position of the mouse moved inside the swf content.
I am not much aware with Javascript... Can't we manage with flash alone?
I wonder why mouseX,mouseY not properly register when It crossing the swf border? is it bug of flash as3?
Thanks
Siva
Find more inspiration, events, and resources on the new Adobe Community
Explore Now