How to Create Flash Football Games

Written by mark stansberry
  • Share
  • Tweet
  • Share
  • Pin
  • Email
How to Create Flash Football Games
A football icon is essential to creating a Flash football game. (Football image by Brian Garvey from

Flash football games are not only fun to play but are fun to create. And that is because you only need to know a few ActionScript commands to get the game rolling. However, before you add these commands, it is essential that you determine the size of the game to avoid unnecessary layout work. After you have ensured that the football game is the right size for your webpage, you can begin importing football icons and adding football game interactivity with the startdrag, stopdrag, addEventListener and hitTestObject methods.

Skill level:

Things you need

  • Adobe Flash Professional

Show MoreHide


  1. 1

    Size the dimensions for the game in pixels. Ensure that the dimensions you choose will fit into the dimensions of your computer screen or webpage. Use a pixel-to-inch conversion factor of 72 pixels per inch.

  2. 2

    Start Adobe Flash Professional and select Flash ActionScript as the file type. "Click" the "Windows" menu. Check to see if the properties option in the window's menu is checked. Click the "Properties" option if it is not checked to display the properties panel.

  3. 3

    Click the "Edit" button in the properties panel. Select "pixels" from the ruler units list box. Set the width and height dimensions in pixels in the width and height dimensions text box. Use the values you decided on in Step 1.

  4. 4

    Find a graphic file of a football that is in either GIF or JPG format. Click the "Import" command from the "File" menu, then "click" the "Import to Stage" command from the "Import" menu and "click" the graphic file name from the file dialogue box and then "click" the "OK" button. "Click" the "Convert to Symbol" command in the "Modify" menu. Type in "football" in the "instance name" text box in the "Properties" panel.

  5. 5

    Click "Actions" in the "Window" menu so you can assign drag interactivity to the football with the startdrag method. Type the commands: football.addEventListener(MouseEvent.Down, startfootball_fn); function startfootball_fn(event:MouseEvent):void{football.startdrag()}; football.addEventListener(MouseEvent.UP, stopfootball_fn); function stopfootball_fn(event:MouseEvent):void{football.stopdrag();} into the Actions Editor.

  6. 6

    "Click" the "Test Movie" option in the "Control" menu. Position your mouse cursor over the football, press down the mouse button and drag the football. Release the mouse button to stop dragging.

  7. 7

    Import football players and a football into to your football game. Use the same procedure as in Step 4. Use either Flash's hitTestPoint or hitTestObject commands to display a text Field that will display the message, TACKLED, when the football icon you drag hits a football object. Type these commands in the action editor along with the commands needed to stop the drag function when you are tackled. Follow the syntax that Adobe specifies for these ActionScript commands provided in the reference manual for your particular version of Flash.

Tips and warnings

  • Build up your football game in steps. For the next step, you may want to make the football players chase the football as you drag it. Flash ActionScript has the move To command for this purpose. For another step, consider adding a score board that keeps track of the downs in the command. Consider using Adobe Flash's datagrid component for the scoreboard.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.