Join Lee Brimelow for an in-depth discussion in this video Adding the play button, part of Building Flash Games with Starling.
- View Offline
So the next thing we need to add to our menu state is our Play button, and…this is obviously what you're going to click on when you want to actually…start playing the game.…So Starling actually has a class called Button which makes it very easy…obviously to create buttons.…So I'm going to come under our logo here, create a new variable called play, I'm…going to set that equal to a new instance of the Starling.display.button class.…Into this you can pass in different textures for the up and the down states,…we're not going to deal with that, we're just going to do an up state to keep it simple.…
And for the texture, again, we're going to use a texture which is in that texture atlas.…So Assets.ta.getTexture and the texture is called "playButton", and let's go…ahead and create that playButton as an instance variable.…Now when we're dealing with buttons there is a special event in Starling called…a triggered event and that's essentially going to be fired whenever you click on the button.…So let's listen for that now, so play. addEventListener (Event, and again make…
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.
- Downloading and installing Starling and Flash Builder
- Creating the project
- Creating the main game class, static assets class, and other classes
- Building the state machine
- Creating a static assets class
- Adding images
- Creating sprite sheets with Texture Packer
- Creating and importing bitmap fonts
- Detecting collisions
- Adding particle effects
- Adding sound effects