Creating the Alien movie clip


show more Creating the Alien movie clip provides you with in-depth training on Developer. Taught by Lee Brimelow as part of the Building Flash Games with Starling show less
please wait ...

Creating the Alien movie clip

So in the last two movies we created our Bullet class and our BulletManager class which helps to keep track of all those bullets. Well we are going to do a very similar thing for our alien. We are first going to create an Alien class and then an AlienManager class. So I'm going to go to my Objects package, right-click, and say New > ActionScript Class and I'm going to call it Alien. Now for a Superclass, we don't want Sprite, we want MovieClip now, because again this actually contains an animation within itself and make sure you choose Starling.display.MovieClip.

Now you'll see that it expects two arguments to the constructor. First is a Vector of Texture objects, which we are going to get out of our Texture Atlas, and then a frames per second so this can actually have an independent frame rate different from the frame rate of our main game. So I'm going to remove these arguments from the constructor and we are going to send them into the super constructor. So first...

Creating the Alien movie clip
Video duration: 1m 58s 2h 57m Intermediate

Viewers:

Creating the Alien movie clip provides you with in-depth training on Developer. Taught by Lee Brimelow as part of the Building Flash Games with Starling

please wait ...