I am working on an application where an image serves as cursor. Now i would like to know at any time over which object the cursor is hovering. Sort of like a HitTestObject(*) where i can then see what object the * represents. Does anyone have any idea how i could accomplish this? (and using the mouse is not an option)
相关问题
- Should I wait for Flash Player 10.1 or go with Fla
- How to load flex swf from flash?
- Setting Page Title from a SWF
- Security Sandbox Violation
- Get the print screen image from the clipboard
相关文章
- as3 ByteArray to Hex (binary hex representation)
- getElementById not working in Google Chrome extens
- Libraries for text animation in Flex / Actionscrip
- How to upload BitmapData to a server (ActionScript
- Persistent connections between Flash client and Ja
- How to embed a swf file into html code?
- Web player to use with SHOUTcast
- Flash CS4 + SQLITE
Put the elements you want to monitor for 'hovering' in a separate array, then add an onEnterFrame listener to the object attached to your mouse that iterates through the array and performs hitTests with each of the objects.
and this goes in the onEnterFrame handler for your mouse-attached object:
I have solved the problem already :) since the cursor was in a different sprite than the others, i had to do it this way, because i couldn't pass the objects to hover into an array.