Placing ad scripts in canvas

  • 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?

  • Try the latest beta, which lets you export an 'ad bar' template specially designed with room for an advert.

  • 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?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There should have been a dropdown list letting you choose which side to use (top, right, bottom, left) when exporting.

  • 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,

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)