Type Function Return value none Revision 2017.3060 Keywords ads, advertising, KIDOZ, hide See also kidoz.show() kidoz.*
Hides a KIDOZ ad which was previously shown via kidoz.show().
kidoz.hide( adType )
String. The ad type to hide. Valid values include "panelView", "feedView", "flexiView", and "banner".
local kidoz = require( "plugin.kidoz" )
local function adListener( event )
if ( event.phase == "init" ) then -- Successful initialization
print( event.provider )
-- Load a KIDOZ panel view ad
kidoz.load( "panelView", { adPosition="bottom" } )
elseif ( event.phase == "loaded" ) then -- The ad was successfully loaded
print( event.type )
-- Show the ad
kidoz.show( "panelView" )
end
end
-- Initialize the KIDOZ plugin
kidoz.init( adListener, { publisherID="YOUR_PUBLISHER_ID", securityToken="YOUR_SECURITY_TOKEN" } )
-- Sometime later, hide the panel view
kidoz.hide( "panelView" )