Reputation: 83
I am using a third party Ad services.and they want me to track the impression url and all the tracking event's on 0% Ad playing, 25% ,50% and on after completion. Qsn: I have parsed the xml and calling the url in As3 ,Is that what Tracking is ? Qsn: I have calculated the Ad total time but unable to think how can we make an event on 0,25,50 and 100 percent
Upvotes: 0
Views: 85
Reputation: 447
I think you can do that pertcentage stuff using a number var and a detector loop with a if statement like this. var num:Number = 0; addEventListener(Event.ENTER_FRAME, loop); var tt:Timer = new Timer(1000,30); tt.addEventListener(TimerEvent.Timer, stCounting); function stCounting(e:TimerEvent):void { num += 1; } tt.start(); function loop(e:Event):void { if (num > 25) { do_this_function(); } }
Upvotes: 1
Reputation: 401
For your first question, it would help if you could show an example of the third party tracking. Secondly if you already know the total ad time then you have everything you need.
At ad load fire your impression tracking (your tracking call at 0%)
Divide total ad time by four is your quartile percentages. Then time it out to dispatch what you need at those intervals.
Upvotes: 0