Article

Flash 101 - Part 5: Spiralling Out Of Control

Page: 1 2 3

Remote Control

The basic actions available to you in the Actions panel allow you to add very simple interactivity to your movie. For example, the Go To action allows you to jump to a specific frame, while the Play and Stop actions allow you to pause and resume the animation sequence respectively. You can toggle the quality of the movie with the Toggle High Quality action, or send commands to the Flash player (assuming you're using the standalone Flash player to play back the clip) with the FSCommand action.

In order to illustrate these actions, I've put together a simple animation sequence (you may remember it from one of the previous articles) and added buttons to it in order to allow the user to control the movie. All actions are triggered when the user clicks a button, or hits the key corresponding to the first letter of the command.

The first button uses the Play action, the second uses the Go To And Play action, the third uses the Stop action, and the last one uses the FSCommand action to send a quit message to the standalone player (if it exists).

You can also assign these actions to a specific keyframe - I'll leave you to experiment with this on your own.

You can do a lot more with ActionScript, including writing your own scripts to alter the size, shape and appearance of the objects in your Flash movie; however, I'm not going to be covering ActionScript syntax in this tutorial. Keep an eye out for a separate tutorial on the subject, or take a look at the ActionScript reference guide which ships with Flash 5.

Projecting Your Image

Once you've created a Flash movie, it's common to immediately export it as an SWF file and embed it into a Web page. However, Flash also allows you to export your movie in various other formats. For example, if you take a look at the File -> Export Movie command, you'll see that Flash allows you to export your movie as a Windows AVI file, an animated GIF, a sequence of standalone GIF, JPEGs or bitmaps, an Adobe Illustrator document, an AutoCAD document, and a Windows Metafile.

Similarly, if all you want is a single still from the movie, you can select the frame and use the File -> Export Image command to export the selected frame as a GIF, JPEG, PNG or BMP image.

And finally, you can also export your Flash movie to a standalone executable, which can be played back on any PC. In order to do this, you need to use something called a Projector, which provides a "wrapper" capable of playing back a Flash movie.

To create a Flash projector, first export the movie as an SWF file, and then open the exported file in the standalone player which ships with Flash 5. Use the File -> Create Projector command to create a single executable which contains a stripped-down Flash player and your movie clip. You can then distribute this Projector to friends, clients and old girlfriends.

And that's about it for this week. Next week, I'll be wrapping this tutorial up with a explanation of how you can add sound to your Flash movie, and use GIF, JPEG and other pixel-based images in your Flash movies. See you then!

Note: All examples in this article have been tested on Macromedia Flash 5.0. Examples are illustrative only, and are not meant for a production environment. YMMV!
Copyright Melonfire, 2000. All rights reserved.

If you liked this article, share the love:
Print-Friendly Version Suggest an Article

Rate This Article

  • 1
    Poor
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
    Great

Post A Comment

You need to be a member of the SitePoint Forums to comment on this post. Sign Up

Already a member? Post using your SitePoint Forums account: