Tutorio.us
Another project by Pixelwelders.

Setting Up Your Project

Creating a New Document

You probably know how this works. When you’ve got Flash up and running, select File > New…, ensure that the “General” tab at the top of the dialog is selected (as opposed to “Templates”), and choose “Flash File (ActionScript 3.0)” under the Type label. Press Okay. You now have a brand new empty project.

Create a new Flash Document.

Where Your Code Goes

Let’s start with the theory. As you know, Flash started life as a frame-based animation tool that just sort of evolved into the massive program it is now. There are still remnants of the old Flash hanging around (like a vestigial tail or appendix), as well as the old way of doing things, but they are for the weak. Repeat that: they are for the weak. In the real world, they are for the type of developer that doesn’t get hired.

One of those remnants is the Flash developer’s ability to put code on any frame he/she pleases. The idea is that Flash will play through an animation frame by frame, executing code as it comes to it. This sounds like a neat idea, but think about this: but what about the project with dozens of nested timelines, each containing hundreds of frames? Your scattered pieces of code becomes difficult to find, let alone debug. This is the old way of doing things, and it does not jive with Best Practices.

SIDENOTE: In previous versions of Flash, you could also attach code directly to MovieClips and Buttons on the timeline. This was handy, but it also increased the possible places that code might be, which means that editing poorly-structured projects was even more of a nightmare. This is why you should avoid older tutorials that even mention such a practice.

If you’re still not convinced, take a read through A Flash Horror Story over at Pixelwelders.

Pages: 1 2

Link down? Let us know.