Add ads to Windows Phone 8 game

Get help using Construct 2

Post » Mon Apr 01, 2013 3:42 pm

Hi all,

Is there anyone here have experiences with visual studio? I'm trying to integrate AdDuplex to my game. Here is the except from their document:

2. Add a namespace declaration to your Page
              
xmlns:adduplex="clr-namespace:AdDuplex;assembly=AdDuplex.WindowsPhone"
              
            
3. Add AdControl to your page:
              
<adduplex:AdControl x:Name="adDuplexAd"
                    AppId="YOUR_AppId_HERE"
                    />

I have added the line in step 2 to the MainPage.xaml file, but I'm not sure where to put the ad control element since the layout root only contains the phone:WebBrowser.

Thanks for helping me :)
B
12
S
4
G
1
Posts: 104
Reputation: 1,512

Post » Mon Apr 01, 2013 3:52 pm

Well, I have answered my own question. It's quite easy. For anyone looking for this in the future:

<Grid x:Name="LayoutRoot" Background="Transparent">
        <phone:WebBrowser x:Name="Browser"
                          HorizontalAlignment="Stretch"
                          VerticalAlignment="Stretch"
                          Loaded="Browser_Loaded"
                          ScriptNotify="Browser_ScriptNotify"
                          NavigationFailed="Browser_NavigationFailed" />
        <adduplex:AdControl x:Name="adDuplexAd"
                    AppId="your app id" Margin="163,0,157,400" IsTest="True"
                    />
    </Grid>
B
12
S
4
G
1
Posts: 104
Reputation: 1,512

Post » Tue Jul 09, 2013 7:58 pm

Any chance of making a tutorial out of this?

B
31
S
6
G
4
Posts: 160
Reputation: 5,998

Post » Wed Jul 10, 2013 8:49 am

@bon4ire the tutorial is in the second post
B
12
S
4
G
1
Posts: 104
Reputation: 1,512

Post » Wed Jul 10, 2013 3:17 pm

Ah ok, so the code was placed within the block. Didn't catch it for some reason.

B
31
S
6
G
4
Posts: 160
Reputation: 5,998

Post » Fri Feb 21, 2014 6:12 am

Can you help me with adding MS PubCenter advertising in my WP project?
thanks maybe with a tutorial!
B
3
Posts: 7
Reputation: 185

Post » Wed Apr 30, 2014 1:07 am

I'm done w/ my game... I've exported it out Windows (Universal app)... opened it in VS 2013, updated the Package Manifest, etc. But, I don't see any XAML files that can be modified w/ your example code in post 2 above... am I missing something? I only see a few .js files and html files. I'm trying to figure out how to put in the Windows Phone 8.1 ad banner to my game as well. After that, it can be published to the Windows Phone Store.

Thanks,
Stephen
B
20
S
6
Posts: 27
Reputation: 1,878


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests