But, unfortunately, you cannot store leftovers on the internet

26 October 2005 | 0

So, it seems that I tend to think in terms of food. Which is fine: I like to eat. But when I try to describe basic Flash concepts to my students, I inevitably begin the discussion of tupperware.

In Flash, you’ve got three types of Symbols: Movie Clips, Buttons and Graphics. Graphics are nothing more than 1 frame Movie Clips, so let’s conviently forget those. So now you’re left with Movie Clips and Buttons. Movie Clips are great, because you can store stuff in them. Buttons are great because you can put some fancy-pants text on them (in the biz, we call that “ActionScript”), and let people interact with your pages and animations. In order to make something into a Button or Movie Clip, we need to draw the object we want, then select it and do Modify > Convert to Symbol.

Here’s where things get tricky.

Upon doing this conversion, you just created a potential headache for yourself. You have now entered the territory of “nested timelines”. For newcomers to Flash, this always seems to trigger a host of incomprehensibilities about how Flash works:

“Where do I create my animations?”

“Where do I put my button’s ActionScript?”

“How do I change the color of my button?”

“Where am I?”

Repeat after me: It’s all tupperware. When you do that Convert to Symbol command, you basically take that little drawing you did and box it up like the leftover spaghetti you made last night. It’s contained. It’s enclosed. It’s symbol-ized. You can prove this is true because when you click on your object, you get a blue rectangle around it called a “bounding box”. To edit your freshly made symbol, you double click on the object, and you are now in that symbol’s timeline. Yes, just as you can put smaller tupperware in larger tupperware, you can put timelines within other timelines (in this case the timeline of your Movie Clip or Button within the main timeline).

Here’s where the tupperware analogy really pays off. When you want to bring that leftover spaghetti to work with you the next day, how do you move it? You don’t open up the tupperware, grab the noodles with your bare hands and slide them around. No — you move your conveniently packaged pasta through the real world via your tupperware container. Just like a Movie Clip. When you want to do motion tweens on a Movie Clip, you move the symbol around, not the object within the symbol. Thus, you are building the animation on the timeline that holds the Movie Clip, not the timeline within the Movie Clip.

Think of it this way:

Real World > Tupperware > noodles and marinera

Main Timeline > Movie Clip Symbol > original drawing

When you want to eat the spaghetti, you open the tupperware. When you want to edit the original drawing, you “open” the Movie Clip (by double clicking on the symbol).

Same deal with Buttons. When you want to label leftovers so you know what it is later, you put the label on the outside of the tupperware. When you want to put ActionScript on a Button so you can let people interact with it, you put the script on the Button symbol, not within the Button. You should be able to see that blue bounding box when you are adding scripts to a button — you should never see the Up, Over, Down and Hit states when you’re trying to add ActionScript to control buttons.

Okay, I should probably get back to my lunch… I think it’s starting to get cold…

Leave a Comment