Article
Co-ordinate Your Flash Site
Anyway, to give you an idea of the kind of interactivity involved in coordinating your buttons with one another, here's a list of the commands that are now issued from my "Home" button:
on(release) {
\\ 1. these commands turn off the music, if it's already been turned on.
_root.music_holder. unloadMovie("miles_and_john.swf");
_root.music_holder. unloadMovie("love_supreme.swf");
_root.music_holder. unloadMovie("cannonball_adderley.swf");
_root.music_holder. unloadMovie("finding_forrester.swf");
_root.music_holder. unloadMovie("tribute_to_miles.swf");
_root.music_holder.music.gotoAndStop("back");
\\ 2. these commands make the images, which are designed to automatically
\\ pop-up for certain songs (above), invisible.
_root.music_holder.music.miles._visible = false;
_root.music_holder.music.herbie._visible = false;
_root.music_holder.music.john._visible = false;
_root.music_holder.music.jazzfestival._visible = false;
_root.music_holder.music.sax._visible = false;
\\ 3. if any of the navigational buttons are currently in their "display"
\\ positions, these commands will bring them back to their
\\ original positions.
_root.movieholder.button_rack.gotoAndStop("start");
_root.movieholder.button_rack.teaching.gotoAndStop("start");
_root.movieholder.button_rack.research.gotoAndStop("start");
_root.movieholder.button_rack.info.gotoAndStop("start");
_root.movieholder.button_rack.contact.textAnimation.gotoAndStop("start");
\\ 4. these commands turn off the background images that are associated
\\ with each one of the (above) navigational buttons.
_root.movieholder.mc_button_1_holder.unloadMovie();
_root.movieholder.mc_button_2_holder.unloadMovie();
_root.movieholder.mc_button_3_holder.unloadMovie();
_root.movieholder.mc_button_4_holder.unloadMovie();
\\ 5. this command turns on the background image that comes up
\\ when the website initially loads.
_root.movieholder.mc_picture_base._visible = true;
\\ 6. in case the user had previously clicked "credits," this command
\\ makes the credits display go to its initial (off) position.
_root.clock_holder.credits.gotoAndStop("off");
\\ 7. this command unloads any previously loaded movie, in case it
\\ had been displayed.
_root.wipe1_holder.unloadMovie();
\\ 8. this command unloads yet another sub-movie, in case it
\\ had been displayed.
_root.movieholder._level1.unloadMovie();
\\ 9. finally, this command loads a very small movie that appears
\\ when the website initially loaded, telling the user that
\\ they are now "back home."
loadMovie("wipe1.swf", "wipe1_holder");
}
As you can see, there's a lot going on -- at least potentially -- which is why you have to issue so many commands. Keep in mind that a similar slate of commands will need to be issued to other buttons so that they are similarly informed on how they should operate in a given situation. Again, the buttons need to interact with their "environment" -- however that environment might be configured when the user decides to do whatever it is they do.
As you might imagine, several of the above commands will probably go nowhere, but that's alright. Effective coordination is all about thinking through, and addressing up-front, the various possible interactions. You constantly need to ask yourself "what if?"
While several commands will probably go "unused," it's important that they're there so the user can do what they want to do, when they want to do it, "without the water going on every time they turn on the gas."