3 Things To Get Us Rolling
Before we pick a type of ad we will implement and make some good old fashion green we need to nail a few things down. We need to save our game id; import the MochiAds class, and we need to create a movieclip to be used to hold our ads.
Before implementing any ads, we have to nail down our initial set up. This requires us to: save our Game ID, import the mochiads class, and create a movie clip.
Video Transcript
00:00Alright, so there are three steps that we want to do before we can actually start working
00:05with the Mucci ads.
00:07And those three things are first we have to make, we want to make sure that we're using
00:10our game ID before we even start playing around with the different ad types, because we want
00:15to make sure that we're the ones that are going to get paid.
00:18The second thing we want to make sure is that we have a movie clip, that where in that
00:23movie clip we're going to store our ads as we render them, as Mucci Media requires
00:27that when you're working in ActionScript 3 to provide the movie clip, the stage
00:32instance, a movie clip that's on the stage that is dynamic so you could add properties
00:38into it.
00:39And the third thing is that we're going to do is we're going to import the Mucci
00:43Media ad class and that is the three things we're going to need to do to get
00:47our application starting.
00:49So let's start off by first setting our game ID.
00:53So we saw earlier in an earlier video and I'm going to make it, actually I'm going
00:57to make it a private constant because we know our game ID is not going to change
01:02throughout the game.
01:03We're only going to have one game ID.
01:05And how you find your own game ID, you just go into your game profile and as we saw
01:10earlier the game ID should be very predominant somewhere there in the side.
01:15Copy that game ID, return to your game and paste that URL.
01:20And we've finished with the first step of setting up of our application to run
01:26the ads.
01:27Step number two, we said we want to create a movie clip.
01:32So the reason is because Mucci Media and deliberately I'm creating a movie clip and
01:36not a sprite because Mucci Media expect us to send it a variable that is dynamic that
01:42would enable it to add properties dynamically.
01:46Now Mucci Media with this MC ad is actually going to also use it as our display object
01:50and put its ads inside of that movie clip enabling us to position and set where we want
01:56our ad to be.
01:58So with that said, I want to actually, with our constructor when we create our
02:03main end, I want to just create a new, I want to just assign a value to our MC ads
02:09by adding a child to the stage which would be a new movie clip.
02:12I'm sending a new movie clip to the stage.
02:15And because ad child returns back that display object, it returns it back as a
02:19display object which Flash would then throw a compiling error so I have to make
02:23sure that my Flash knows that it's a movie clip.
02:27So basically I've stripped down two lines and did it in one line in this way.
02:32So we have our movie clip on the stage.
02:35We set up our game ID and the last item that we want to do is actually import
02:39our Mucci ad, right?
02:43So we're going to import our Mucci AS3 and Mucci ad.
02:48And there we go.
02:49We're going to import our Mucci.as3.mucci ad and we're ready to roll.
