In my project i’m using away3d 4 for 3d scene and on top of that i have starling for ui, everything working just fine, only when i’m clicking on starling ui elements 3d objects underneath it is responding on the mouse event too.
How can i avoid that?
Excuse me if this question already was answered somewhere on forum, i just can’t find it.
Thanks in advance!
Clicking thru starlingSoftware: Away3D 4.x |
||
CubeHeaded, Newbie
Posted: 25 December 2012 01:45 PM Total Posts: 6 |
||
CubeHeaded, Newbie
Posted: 28 December 2012 03:38 PM Total Posts: 6 [ # 1 ] still struggling with this one, anybody? |
||
|
||
dlx, Newbie
Posted: 30 December 2012 12:32 AM Total Posts: 12 [ # 3 ] OK, I just found out ! |
||
rthompson, Newbie
Posted: 03 January 2013 09:54 PM Total Posts: 9 [ # 4 ] @dlx this is not the same issue, CubeHeaded is saying the mouse events are firing in both Starling and Away3D, instead of just firing for Starling..I’m having the same issue. Did you find a solution to this CubeHeaded? It appears that even though Starling is layered atop Away3D, Away3D receives the mouse events first (preventing some kind of hack). This makes sense as in my loop I call view.render() before starling.nextFrame()... Any help would be much appreciated. |
||
80prozent, Sr. Member
Posted: 04 January 2013 04:08 PM Total Posts: 430 [ # 5 ] the only workarround i can think of is to take a snapshot of your starling layer, and store it in a bitmap, where all areas without ui-components are transparent. hope that makes sense. |
||
CubeHeaded, Newbie
Posted: 08 January 2013 08:51 AM Total Posts: 6 [ # 6 ] @rthompson Nevertheless, thanks for the idea 80prozhent |
||
rthompson, Newbie
Posted: 08 January 2013 02:59 PM Total Posts: 9 [ # 7 ] How I handled this was my UI is on the bottom 20% of the stage. So, I put a MOUSE_CLICK handler on the stage (guaranteed to fire before starling/away3d), and if mouse is in this area set a global variable to true signaling the click occurred in the UI area. Then in the away3d MouseEvent3D handlers check to see if that global variable is true or false. Not ideal, but works for my particular project. |
||
80prozent, Sr. Member
Posted: 08 January 2013 06:32 PM Total Posts: 430 [ # 8 ] jeah i think thats basically the easiest way to solve this problem. so best is you sepperate your ui and your away3d click-areas, into simple rectancles. hope that makes sense |
||
|
||
|