Back to Entry Page

Two Hierarchy Projects

Here are two demonstration projects showing techniques for manipulating the visual content hierarchy in Flash. Click on the screenshot to run each movie in a new window.

screenshot from Level Change demo

Project 1: Level Change

Roll over any of the characters in the line to pull him or her out from the crowd. This example uses loadMovie() to place a separate Flash movie into a level above that of the main movie (the black-and-white lineup).

I've used this technique mainly by way of illustration. The same visual effect could have been accomplished--without the need to load a new file from the server--simply by resetting visibility on a movie clip in a higher layer of the main movie.

The source file for this project is called levelChangeDemo.fla and may be found in MMShare/levelChange.

screenshot from Depth Swap demo

Project 2: Depth Swap

This project is more sophisticated--and perhaps a little buggy. Transformations require two mouse clicks. First click on a character, for instance the woman standing in front of the building. Next click on one of the characters behind the windows. The two characters will trade places.

The active ingredient here is not loadMovie() but rather the swapDepths() method of movie clips. This method works within levels of a single movie and so requires no transactions with the server.

Note, though, that two-click transactions are devilish to control: what if your user/player places his second click not on a character but on blank space? The system will eventually recover from such a mistake, but the results are confusing. There are probably better ways to work with this technique.

The source file for this project is called depthSwapDemo.fla and may be found in MMShare/depthSwap.


University of Baltimore Logo

Copyright © 2002 School of Information Arts and Technologies