Articles Archive
Articles Search
Director Wiki

Orderly Behaviors

February 3, 1999
by Alex Zavatone

Here's a quick tip that will help you separate and organize your behaviors. I'm sure you've seen the "endless popup of behaviors" in the score and behavior inspector when you try to add a behavior to a sprite. One of my current projects has over 500 scripts and this gets a bit well, less than effective. As it turns out, with a few creatively named scripts this problem can be turned into a nice organization layout of your scripts as in the illustration below:

The trick here is to use behaviors that contain nothing. They only need to be named what you need them to be named. For example, to generate a horizontal line in the popup, name your behavior "--" (sans quotes). To create an empty space, just name an empty behavior with one or two spaces. If you're wondering what this looks like in the cast, it's as simple as this:

This way, you can use horizontal divider lines and empty spaces to separate the scripts from different castlibs and find them in a snap when confronted with the "behavior popup from hell" in the behavior inspector.

A Director user since 1987, Alex (Zav) Zavatone has worked on the engineering teams for both Director and Shockwave, 4, 5, 6 and 7. Recent investigations find him developing foundation classes for Director with asynchronous process management and other life threatening activities. In its early days, he had something to do with this Internet thing known as "DOUG". A noted ne'erdowell, slacker and laggard, Mr. Zavatone is nonetheless is trusted by children, small animals and the elderly. In his spare time, Mr. Zavatone rehabilitates lame desert trout.

Copyright 1997-2019, Director Online. Article content copyright by respective authors.