. . . public function onEnterFrame(event:Event) { if(!started) { started = true; if (server domain != "armorgames") { #if flash showCPM(); #end } else { startGame(event:Event); // I don't know what to put in the ( ) } } } #if(flash && !air) private var ad:AdLoader; private var clickArea:nme.text.TextField; public function showCPM() { adFinished = false; var sWidth = stageWidth; var sHeight = stageHeight; clickArea = new nme.text.TextField(); clickArea.selectable = false; clickArea.x = 0; clickArea.y = 0; clickArea.width = sWidth; clickArea.height = sHeight; addChild(clickArea); ad = new AdLoader(CPMStarID); ad.x = (sWidth / 2) - 150; ad.y = (sHeight / 2) - 150; addChild(ad); clickArea.addEventListener(MouseEvent.CLICK, startGame); } private function startGame(event:Event) { clickArea.removeEventListener(MouseEvent.CLICK, startGame); removeChild(ad); removeChild(clickArea); adFinished = true; dispatchEvent(new Event(Event.COMPLETE)); } #end
I'm presuming the xxxxxx parts are where you have removed a valid code right?
I got an ad to show but not on the first test. I'm not sure why that is and don't see anything I can do about it.