Ejecta iAds

0 favourites
  • 8 posts
  • Hi,

    Does anyone know why when I click iAd banners when testing my app it also triggers other unrelated touch events?

    I've searched high and low and can't resolve this annoying issue.

    Any help much appreciated,


  • You may want to put some conditions in your code to make other touch events not work when the iAd is showing. For example set a variable called adShowing and then in your touch events add a condition that checks if it is true or false. Only allow other events to run if it is false. In the logic that shows the add add some extra events to set the variable to True when the add is shown, and false when it is closed.

  • Ahh makes sense I'm a noob I'll give it a try and let you know. Thanks.

  • Sorry thinking about it further I don't think this will work.

    It's not when the ads are displayed. It's basically when a user initially clicks on the iad banner it triggers other touch events.

    For example, I have an event which on game over if the user touches an object that gets created it restarts the game and the iad banner click will incorrectly trigger this.

    Initially I thought it might be to do with the object overlapping the banner so I tried inverting the conditions and even resized the object neither of which worked. No matter where the object is on the screen if the iAd banner is clicked it will also trigger the game restart.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What I describe will work perfectly for that. Create a global variable called bannerShowing. In the same bit of code that shows the banner, also set bannerShowing to true. In the event for touch to reset the level, add a condition that says bannerShowing = False. That way the only time that touch will restart the level is if the banner is not showing. Add an event when the banner is closed that sets the bannerShowing variable back to False.

  • Hi,

    Thanks for your help apologies if I'm being thick.

    I still don't see how this will work as I still want the player to be able to restart the level while the ad banner is showing if they decide they don't want to click on the banner.

  • Magpie

    can you please upload a small screen shot showing:

    • how iAd banner is showing up on the screen
    • where is the object that restarts the game on screen


    a screenshot that showing the actions you trigger restart the game

    with this way we can be more helpful

  • Hi Magpie, BluePhaze and Aleq (and anyone else who could help!),

    I am having somewhat of the opposite issue. I am trying to trigger a pause when the iAd banner is touched. Basically I cannot figure out how to trigger an event when the banner is touched (and a full page ad is displayed). I did create a touch area the size of the banner, however this would not work since the touch area (an probably everything) is below the ad banner (I believe).

    My intention is to pause the game if a full page is open. Currently only testing with Apple's test ads.

    I have also enabled the "Pause on unfocus" property, but this, I believe only works on browsers.

    Thank you!

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