Type Function Return value none Revision 2017.3060 Keywords ads, advertising, AdColony, show See also adcolony.init() adcolony.isLoaded()
Shows an AdColony video interstitial or rewarded video.
Before calling this function, you must call adcolony.init() and ensure that the "init" event phase occurs.
adcolony.show( zoneName )
String. The user-defined AdColony zone name to be displayed. Zone names should be specified in the call to adcolony.init().
For developers migrating from the Corona Ads incarnation of the AdColony plugin, the following parameters have been removed from this new plugin:
params.prePopup and params.postPopup; these options are now specified during adcolony.load().local adcolony = require( "plugin.adcolony" )
-- AdColony listener function
local function adListener( event )
if ( event.phase == "init" ) then -- Successful initialization
print( event.provider )
end
end
-- Initialize the AdColony plugin
adcolony.init( adListener,
{
appId = "YOUR_ADCOLONY_APP_ID",
adZones = {
interstitial = "YOUR_ADCOLONY_ZONE_ID_1",
rewardedVideo = "YOUR_ADCOLONY_ZONE_ID_2"
}
})
-- Sometime later, show an ad
if ( adcolony.isLoaded( "interstitial" ) ) then
adcolony.show( "interstitial" )
end