Kongregate sharing game to blog

Ideas and discussion about publishing and distributing your games

Post » Sat May 10, 2014 11:02 am

How to do it? i want it looks like scirra arcade, using embed iframe from kongregate.com but i don't know how to do it,anyone know?
~Everyone can make GAMEs~
B
57
S
12
G
1
Posts: 414
Reputation: 5,936

Post » Sat May 10, 2014 11:39 am

In short, you can't. An iFrame doesn't allow only calls to part of a page to render. When you embed another page in an iFrame, the entire page gets rendered. I looked it it up though and someone else had the idea of putting the iFrame in a div element and styling that element to only show part of a page. Still, it would have issues and it sounds like a very clumsy work around at best.

Here's a link to read a bit more: http://stackoverflow.com/questions/5676672/how-do-i-crop-the-contents-of-an-iframe-to-show-a-part-of-a-page
Kurieus
Come visit and play Blast Box!
B
15
S
3
Posts: 205
Reputation: 1,349

Post » Sat May 10, 2014 12:00 pm

So,i must do like this?
<div style="position: absolute; left: 0px; top: 0px; border: solid 2px #555; width:594px; height:332px;">
<div style="overflow: hidden; margin-top: -100px; margin-left: -25px;">
</div>
<iframe src="my link?" scrolling="no" style="height: 490px; border: 0px none; width: 619px; margin-top: -60px; margin-left: -24px; ">
</iframe>
</div>
</div>
~Everyone can make GAMEs~
B
57
S
12
G
1
Posts: 414
Reputation: 5,936

Post » Sat May 10, 2014 1:58 pm

I don't know the pixel measurements for your intent, but more or less that should work. You'll have to adjust the numbers to fit the game properly.

Still, keep in mind, it's kind of a hacky workaround. iFrames aren't meant to behave like this. I would test it heavily with a lot of browsers with a lot of various versions. Some browsers, or versions of browsers, might behave kind of funky.
Kurieus
Come visit and play Blast Box!
B
15
S
3
Posts: 205
Reputation: 1,349


Return to Distribution and Publishing

Who is online

Users browsing this forum: No registered users and 0 guests