Moving the player


show more Moving the player provides you with in-depth training on Developer. Taught by Paul Trani as part of the Flash Professional CS5: Creating a Simple Game for Android Devices show less
please wait ...

Moving the player

The foundation of pretty much any game is going to be how the player moves, and in this case, what I want to do is I want the player to move from left to right, the X position, based on the mouse position. So again, I'm going to go ahead and move this player spaceship to the left and right based on the mouse position. But the first thing I need to do is I'm going to dynamically add this player to the stage when it's time to play the game, okay, and I'm going to use code snippets to do this.

So with the Code Snippets panel opened, I'm going to go down to Add from Library, because I want to add that player from the library, and I'll just double-click that code snippet and it adds it into my Actions frame1 is where it puts it. And let's go ahead and take a look at this code, because currently it defines a variable, because I need to give this a variable name and make sure Flash knows that it's a MovieClip. Okay, so right up here, I'm just going to call t...

Moving the player
Video duration: 8m 13s 3h 35m Intermediate

Viewers:

Moving the player provides you with in-depth training on Developer. Taught by Paul Trani as part of the Flash Professional CS5: Creating a Simple Game for Android Devices

please wait ...