Eight Versions Later…
Ten months after the eighth version of Flash was released, Macrodobe (this is my clever way of saying it’s really Macromedia but OK we’ll call it Adobe sort of) realized that the flexibility in their coding model was leading to some sloppy coding! I got a PSA from Adobe the other day with some Flash programming best practices:
- Put your ActionScript in a single location. If you put code in an FLA file, put ActionScript on Frame 1 or Frame 2 in a layer called “actions” on the top-most layer in the Timeline.
- Avoid attaching ActionScript to objects in an FLA file. ActionScript that is written on the Timeline or in classes is more elegant and easier to build upon.
It’s like I’ve been teaching all along! The lesson usually goes something like, “This is the crazy way Flash lets you do it, but it keeps things orderly if you do it this way.” People who take my advice say, “Yeah, that was easier!” People who don’t say, “Where the f*ck’s my ActionScript?” And so it goes.
Another issue that’s come about in my Flash teaching is the crazy behavior of the library when creating a tween. Try it for yourself… I’ll walk you through it step by step:
- Draw a circle on the stage.
- Add a keyframe later on the timeline… let’s say, Frame 15.
- Move the instance of the circle in Frame 15.
- Right / Ctrl + Click on one of the in between frames, and select “Create Motion Tween.” Be sure to do it this way! Selecting a Tween from the Properties panel won’t produce this behavior, which is a very strange inconsistency.
That should do it. Now scope out your library. Notice some symbols that you didn’t put there? If you have Flash 7 or earlier, there’s one symbol, which is problematic - Flash converted the Frame 1 circle to a Graphic (ewww… Graphics… yuck) and the Frame 15 instance was left a circle, breaking your tween. In Flash 8, Macrodobe decided that broken tweens were bad… so they made two graphics instead of one, and cluttered up the library some more.

Now, apart from really annoying me, the anal library organizer, these graphics tend to be hellish if you’re collaborating with someone else… if you both have 15 tween graphics named “Tween1, Tween 2, …” and then merge the files, someone’s tweens are getting overwritten. And it will screw things up.
After my friend Ricardo asked me what was up with that behavior, I decided I’d send Adobe a bug report, and I got an interesting response:
I’m guessing the automatic creation of graphic symbols is simply a convenience feature for optimizing the movie. Hopefully there isn’t some legacy issue that will prevent us from removing the Tween symbols.
Fantastic. So some random guy decided that random Graphics showing up in your library might be a good idea, and unknowingly caused countless numbers of flash developers (and students!) to suffer as a result. Thanks, Macrodobe.