I have a flash movie that detects and points to the mouse position (it’s a compass sitting on a table). It works fine as long as the rest of the stage is clear, the problem is when it is embedded into a html file - when the mouse is on areas of text, a box or anything other than the swf itself.
I’ve tried two options -
[LIST=1]
[]the .swf is the top layer, with the whole stage being transparent except for the pointing object itself (so it can show the rest of the html underneath) - in this case the mouse is detected only on the opaque area (i.e., the little pointing object).
[]the .swf is the background layer (as explained here) - in this case the mouse is not detected in the areas of the html menu and html text body block that are (in a layer) on top of it.
[/LIST]
The problem seems to be that transparent areas (in option 1) and/or covered areas (option 2) are not part of the stage’s scope. Currently, my compass registers to the stage to “listen” to events, is there another way to get mouse position events, outside the scope of the stage?
Is that any different than dragging an empty box to the stage? because I tried that (borders but no fill, same size as the stage) and the mouse wasn’t detected in the empty/transparent area, only when on top of the (opaque) borders.
If it is different, do you mind explaining how exactly this should be done?
This solution works however it creates another problem - it disables the functionality of the html underneath (for example, the links in the layer below no longer detect hovering and cannot be pressed).