How do I change to full screen in browers when using Iframe

Get help using Construct 2

Post » Fri Jan 09, 2015 3:12 pm

Hi all,
Sorry for a simple question, I'm having trouble getting my games to change to full screen mode when I play them on my website. I use Dreamweaver for my site and an iframe to view/play the games but I can't seem to get it to change to full screen. I have put the allowfullscreen="true" in the html code in Dreamweaver and I have tried to use the browser object to request full screen in my game code but nothing is working.
Any help is very much appreciated.
B
6
S
2
Posts: 20
Reputation: 548

Post » Tue Jan 13, 2015 4:24 am

The Iframe tag overrides the full screen. In fact full screen is actually working but being constrained by the window size used in the iframe tag. I was just trying to work this out myself. I haven't tried it yet but, here's a link to a solution I found.

http://stackoverflow.com/questions/22111267/how-to-click-on-an-iframe-to-remove-it

Let me know how it works out. Hope it helps.
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,293

Post » Fri Jan 16, 2015 8:13 am

Hi TheDom, Thanks for your reply, I have seamed to have got around the problem by making two buttons in construct 2 and using the browser object to request full screen and cancel full screen when these buttons are pressed. I have put this code into the iframe div to allow this to work, (allowfullscreen="true") it works great, hope this is of some help to you.
B
6
S
2
Posts: 20
Reputation: 548

Post » Sat Jan 17, 2015 12:52 pm

Thanks
Image
B
75
S
23
G
3
Posts: 673
Reputation: 9,293


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests