Placing ad scripts in canvas

Get help using Construct 2

Post » Wed May 08, 2013 3:34 pm

Hello everyone,

I am incorporating ads inside my games and have run into a problem. For non-fullscreen games, it's easy enough to drop the script companies like Leadbolt provide onto the bottom of the <body> section of the html file. However, many of my games are fullscreen. I have designed my fullscreen games with ads in mind, so there is a space for a banner to appear in my UI but I cannot seem to get the scripts to load.

The ad scripts looks like this:
<script type="text/javascript" src="http://ad.leadboltmobile.net/show_app_ad.js?section_id=[my ad's unique id]"></script>

I have tried a couple methods, though I am not sure if I've reached the bottom of the well on any of them. The first attempt was made through Pode's HTML Div plugin. However I am not 100% clear on how this works, so I cannot be sure if I was just doing something wrong. Can a script like this be called in a div? Is the plugin just lacking some functionality?

The iframe plugin would work but is a no-go for ad companies' terms of service. It's much too easy for developers to generate views that way.

I also think C2's SDK might be of use, but since it is a deep deep hole I'd rather not follow that rabbit unless I'm sure it will be helpful.

Any ideas, suggestions, or experience?
B
10
S
2
Posts: 19
Reputation: 1,245

Post » Wed May 08, 2013 3:51 pm

Try the latest beta, which lets you export an 'ad bar' template specially designed with room for an advert.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Wed May 08, 2013 4:28 pm

I'm seeing the Adbar is on the side of the page? That wouldn't be very helpful for horizontal ads--is there support for choosing which margin to reserve for the Adbar?
B
10
S
2
Posts: 19
Reputation: 1,245

Post » Wed May 08, 2013 4:33 pm

There should have been a dropdown list letting you choose which side to use (top, right, bottom, left) when exporting.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Wed May 08, 2013 5:06 pm

Ok, thank you. I have yet to download the beta--I was going off of the description you wrote on the download page.

If I wanted to do more complicated ads, though (such as ones which appear on top of the entire layout), is there even a hackish way to accomplish that? My original question still stands here, I think,ryguydavis2013-05-08 17:17:44
B
10
S
2
Posts: 19
Reputation: 1,245


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 19 guests