I am trying to embed my Unity game into Fancybox using an iframe. It runs fine when I open it in a separate webpage, but when embedded it does not load. This is the code I have at the top of the page:
http://pastebin.com/embed_js.php?i=tJsjwVnH
And this is the code I’m using to try and bring up the game in fancybox:
http://pastebin.com/embed_js.php?i=dsHKVt4n
I would really appreciate any help, what am I doing wrong?
You are binding this class to fancybox:
fancybox_swf, but your anchor has this other class:fancybox_unity. Additionally, you don’t have anydata-attribute to pass the dimensions to fancybox.I guess your anchor should look like
Set
data-widthanddata-heightvalues as your convenience, then you can use your fancybox script.Notice that you have to set a HTML5
DOCTYPE.