Start learning with our library of video tutorials taught by experts. Get started
Viewers: in countries Watching now:
Join Lee Brimelow in this project-style course that teaches how to build a Flash-based game with Flash Builder 4.6, Flash Player 11, and the Starling framework. Starling, a pure ActionScript 3.0 library for advanced graphics, extends Flash Player 11's support for the modern GPU (graphic processing unit) to enable visual presentations and games in the browser or as a mobile app.
Starting with installation and configuration of Starling and creation of a Flash Builder project, the course shows how to prepare and import graphical assets, create MovieClip classes from sprite sheets, manage various gaming objects, detect collisions, and add both particle and sound effects. The finished game can be deployed to any browser or mobile device that integrates Flash Player 11, which was released in September 2011.
So now that we have our hero created, the next thing we are going to want to do with it is to be able to fire bullets. So the first thing we have to do is to create a Bullet class, and again, we are going to do it in our objects package, so I'm going to create a new ActionScript Class. It's going to be called Bullet. And again, the Superclass is going to be starling.display.Sprite. So this one is going to be pretty simple, all we need to do is to get that texture out of our Texture Atlas and feed it to an image object. So we are going to say var img, it's going to be of type image, it's equal to new Image, and let's reach out and grab that texture so it's in the Assets class to our ta, which is our Texture Atlas, call the getTexture method and pass in the string name for the texture which is bullet.
And let's set its pivotX and pivotY properties. So we want to do pivotX = img.width * 0.5, and set pivotY = img.height * 0.5, and then lastly we will add this image to this play list.
So now the Bullet class itself is not going to have an update method, and the reason is, we are going to create a bullet manager class, and this bullet manager is going to handle and keep track of all of our bullets, and it's going to handle animating the bullets, destroying the bullets and things like that. So for the actual Bullet class itself, it's simply just a visual representation of the bullet.
There are currently no FAQs about Building Flash Games with Starling.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.