Need help!

Get help using Construct 2

Post » Sun Sep 25, 2011 10:47 am

That would be nice !
B
21
S
5
G
5
Posts: 163
Reputation: 5,028

Post » Mon Sep 26, 2011 1:13 pm

hello there,

how can i embed a game made with c2 ? is it possible? i have strong knowledge of html and css, by the way i would like to generate a embed code for other sites that would place my game in their website, is it possible?
B
12
S
3
G
5
Posts: 174
Reputation: 4,018

Post » Mon Sep 26, 2011 3:24 pm

[QUOTE=mrsponkie]by the way i would like to generate a embed code for other sites that would place my game in their website, is it possible?[/QUOTE]

Mostly because of cross-domain, I'd say it is not.
You can always try to link to the JS from another website, but I'm pretty sure it will fail when trying to load/reach for the game's assets.

New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Mon Sep 26, 2011 4:46 pm

[QUOTE=Kyatric] [QUOTE=mrsponkie]by the way i would like to generate a embed code for other sites that would place my game in their website, is it possible?[/QUOTE]

Mostly because of cross-domain, I'd say it is not.
You can always try to link to the JS from another website, but I'm pretty sure it will fail when trying to load/reach for the game's assets.

[/QUOTE]
Make your game use 'fullscreen in browser' and upload it to your server somewhere.

Then, on a different website, use an iframe of the game's intended size, and set the iframe URL to the game's URL. The game should fill the entire iframe with no annoying scrollbars.

Finally, it's secure because browser cross-domain security limitations prevent the game accessing the page that is containing it.

I haven't tried that myself but it ought to work!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Sep 27, 2011 8:22 pm

Make your game use 'fullscreen in browser' and upload it to your server somewhere.

Then, on a different website, use an iframe of the game's intended size, and set the iframe URL to the game's URL. The game should fill the entire iframe with no annoying scrollbars.



Thanks for the tip. It works and is exactly what I wanted


By the way I use this code generator if someone need something like this

http://www.meine-erste-homepage.com/iframe/iframe.cgividi2011-09-27 20:24:22
B
21
S
5
G
5
Posts: 163
Reputation: 5,028

Post » Tue Sep 27, 2011 9:34 pm

@vidi, would you mind sharing the link to the embedded game? Would love to see it in action!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Tue Sep 27, 2011 10:00 pm

That is only a embed test not a game   I'm still learning




http://weclonemaniacs.de/test/vidi2011-09-27 22:03:45
B
21
S
5
G
5
Posts: 163
Reputation: 5,028

Previous

Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 26 guests