Game Development Reference
In-Depth Information
Figure 7-9. Make sure you add the Microsoft Advertising SDK as a reference in your game's pro-
ject.
That has the link to the SDK download and how to install it into VS and add it to your pro-
ject.
Now you should have everything linked up and ready to show ads. Add the following HTML
to your default.html file:
<div style="position: absolute; top: 50px; left: 0px; width: 100%; z-index: 1;">
<div id="ad" style="margin-left: auto; margin-right: auto; width: 500px;
height: 130px;" data-win-control="MicrosoftNSJS.Advertising.AdControl"
data-win-options="{applicationId: '52df6cc7-1ea5-477d-b607-bf7922f81259', adUnitId:
'10047026'}">
</div>
</div>
This will float the ad above everything else on the pages, assuming you don't have anything
higher than a z-index of 1. You can change the inline styles to suit your needs.
Search WWH ::




Custom Search