I had this idea of a trick for integrating Unity (web) with a Flash-based GUI. The main concept was to put the SWF in front of the Unity game kinda like this:
I have the theory that the SWF movie will “cancel” the mouse events in Unity, just like Flash, when you place a MovieClip in front of a button, disabling the events for that button. But obviously I had to load a Flash movie of the same size of the Unity game to make it unplayable (like a selection screen or pause menu), to deal with that I could unload the SWF or call another with a smaller size (like a score displayer.. or something that Unity could not do with the fanciness of Flash)
My first try was using the <div> tag. Within the tag I could set the z-index of the Flash HTML container the Unity game would be in the main HTML, and then load the HTML containing Flash. I used z-index, to force the Flash container to be infront of the main page.
My next try was loading Flash and Unity into separate IFrames, and forcing each IFrame to have a specific z-index so I could be sure both of them having a strict order, but Unity was still on top.
Other try was a trick used by some annoying flash banners (those ones that pop out in front of the main content), the example I found was using FlashObject (yeah when it was called like that). The result was not succcessful.
I tested it in Firefox, Opera, Chrome and IE.
Technically everything went well about placing “my Flash” over the main HTML (the “Unity container”). If you take a closer look at the second image in this post, the SWF is in front of the red background (HTML Unity container) BUT the Unity game keeps being at the top… and I don’t know what else to do, I see that as some kind of “bug” on graphics processing (I don’t even know what I’m talking about). So… if someone has some idea about a workaround or something for placing Flash on top of Unity content please let me know 🙂
I’ll upload my source files soon (so you can have a look).
Update: Seems like someone had this problem too and no solution was found (except the one sayin “don’t place stuff on top of plugin rects” but that’s not quite a solution) http://forum.unity3d.com/viewtopic.php?t=9989