Quick Tip

Display CPMStar ads at the start of HTML5 game

Create a css file as following

Create game HTML as following

Replace cpmstar_pid with your pid The ad is initialized and loaded as soon as HTML is loaded. The ad is positioned on top of HTML5 game area. We will initialized a timer which will enable closeAd button after a predefined interval (normally 5 or 10 secs)

Below is the skeleton game code.