Back to Entry Page

Buttons and Movies

A few weeks back, I noted the problems involved in getting buttons to behave like movie clips (e.g., to be invokable by name) and getting clips to behave like buttons (e.g., to localize mouseclicks within their dimensions). I proposed a script-based solution. Meanwhile a number of people, both in and out of our class, have suggested another obvious remedy: simply place a button within a movie clip. The clip can then be named in scripts and its various properties manipulated, while the button retains all its usual functions.

Thanks to Zahra Safavian, Drew Heles, and Jared Glasser for sharing their insights and examples.

Which solution should you use, scripting or embedding? The answer may depend on how much complexity you can tolerate. If you go the embedding route, you will end up placing buttons within clips, meaning you'll have to remember to open the clip in order to edit the script of a button. Naming can also get pretty messy this way--should the clip that contains a button have the same name as the button?

Though the script solution adds less complication to your file structure, it does require computation. In most cases, today's computers are fast enough to do the simple math involved many times per second without showing the strain, but in very large and ambitious projects you might see an impact.

As always, it's good to have options.


University of Baltimore Logo

Copyright © 2002 School of Information Arts and Technologies