MIAWs: Better than Cats

After the last monster module, you might be thinking you have a pretty good program going, and you’re right. You might also think you have a good grasp of Director, and you’re right about that, too. But before you go for the pebble in my hand, I have just a little more to tell you.

You may recall from Part 2 that you can take any stand-alone Director movie you make and drop it into Director’s Xtras folder, and then select it from the Xtras menu in the Director program. The file you made will then appear on the screen, ready for you to use in your programming environment. I referred to this (in Module 6, when we made the Keyster program) as a MIAW Xtra, and by now, it’ll be no surprise to you that your movies can call MIAWs on their own.

Why would you want to do this? There are actually multiple reasons; for instance, you might have an "info" window that you want to pop up from time to time to offer assistance or commentary on a program; or you might want to create a kind of navigation or control panel, perhaps containing a clickable table of contents; or you might want to ask the user for some more information about some choice without having to leave a primary program screen. Of course, those are just some examples; as you become more familiar with the concept of MIAWs, you will probably find yourself using them for lots of applications that I’ve not listed here, things no one has really thought of before. In that sense, a MIAW is a lot like the other subtle, powerful tools you’ve worked with so far, such as lists and object code. While the applications I’ve mentioned for each of these types of tool are all quite legitimate, there are literally hundreds, or perhaps even thousands, of other uses to which they can all be applied.

The beauty of doing this stuff in Director is that the engine itself takes care of a lot of the low-level work for you. If you wanted to create even a simple dialog box in a lower-level language, you’d have to write the code to define what buttons you wanted, where you wanted them, what their dimensions were to be, the fonts to use, and so on and so on, and even then you’d have to run it multiple times and tweak the code to finesse the look and feel. With Director, you write maybe three dozen lines of Lingo (assuming you’re using the MUI Xtra) and test-fire the dialog box live; odds are you’ll have to rework it only once, and you’ve spent 30 minutes doing what would take a day in other languages to get done.

So yes, Lingo can be abstruse, and it can be hard to learn how to think in terms of programming, but you’re still getting a lot of help from the folks at Macromedia.

With this module, we’ll explore more the idea of creating custom Director movies that let us do some useful things with image files, as we did in the last one. We’re going to be building largely on the code we’ve already written, so you don’t have to learn a whole lot of new things, but you’re also going to be introduced to some keywords specific to MIAWs.

A MIAW is simply any given Director movie that has been loaded by another movie in a simultaneous session. To clarify, the second movie is not being loaded by the first via a go to movie call; it is loaded and running at the same time as the first, in a separate window that you can largely control the looks of, as an enhancement or extension of your main Director movie. It’s taking the concept of a MIAW Xtra and extending it into the user environment, by creating something that can be accessed and used while your main movie is running in a projector.

Often, the main movie is referred to as the parent movie, while the second file being called as a MIAW is referred to as the child movie, or a child MIAW. This is reminiscent, of course, of parent scripts, which is probably how this nomenclature came to be.

Note: MIAWs do not work in Shockwave. Don’t plan on making Shockwave files that use MIAW! There’s not even a simple way to get two Shockwave movies to communicate with each other under normal circumstances, let alone have a parent movie call a child MIAW. MIAWs were introduced with version 4 of Director, and at first it didn’t seem to catch on, probably because most Director programmers were not used to the idea of thinking in these terms yet. Now it’s hard for me personally to imagine how I’d be able to get anything done without MIAWs.