I’m trying to have a banner show in one scene but be hidden in another. I’m able to get the banner to show at first and then hide when I go to the next scene… but when I return back to the scene where I want the banner to show again it won’t. I use this to show the ad:
[lua]
local revmob = require( “plugin.revmob” )
local placementID = “My_ID”
local function adListener( event )
if ( event.phase == “sessionStarted” ) then – Successful initialization
– Load a RevMob ad
revmob.load( “banner”, placementID )
elseif ( event.phase == “loaded” ) then – The ad was successfully loaded
– Show the ad
revmob.show( placementID, { yAlign=“bottom” } )
end
end
– Initialize RevMob
revmob.init( adListener, { appId=“My_AppID” } )
[/lua]
I use this to hide the ad when leaving the scene:
[lua]
revmob.hide( placementID )
[/lua]
The banner doesn’t return to the scene when it’s reloaded for some reason.