The Workshop consists of quiz questions and answers to help you solidify your understanding of the material covered in this hour. You should try to answer the questions before checking the answers.
How many movies can you load into a single clip instance?
None. You need to use two clips.
As many as you want.
One at a time
If you're having trouble playing an external .wav sound file at runtime, what's the likely cause?
Your speakers are not cranked.
You can only play .mp3 files.
You have to use Publish Preview in the browser in order for sounds to play.
How many people can simultaneously edit the master version of a shared item?
As many people as you want
A number equal to how many user files you have
C. You can have only one loaded movie per clip (or level, for that matter).
B. Flash only supports the runtime import of sounds in .mp3 format and images in .jpg format.
A. Only one person can actually edit the master version of shared items. After the master version is turned into a .swf, you can share it throughout a network or just redistribute copies to everyone involved.
Back in the task "Use the MovieClipLoader Object to Display Progress," you displayed a progress bar by scaling from 0% to 100%. Instead, for this exercise, consider making a movie clip containing an animation. For example, you could do a shape tween or frame-by-frame animation of a glass filling up or a sand-timer emptying. The code really isn't too difficult. Instead of taking the percentage downloaded and setting the _xscale, you just do a gotoAndStop(). Imagine if the movie clip you create has 100 frames; you could simply jump to the frame that matches the percentage. In fact, you can jump only to whole number frames when using gotoAndStop(). The following code takes care of that. What's cool about this code is that your movie clip need not be exactly 100 frames.
So, make a movie clip with the multiple frame animation you want and put an instance on stage with the instance name progress_mc. Then, replace line 7 of step 7 of the task "Use the MovieClipLoader Object to Display Progress" with the following code:
progress_mc.gotoAndStop( Math.floor((bytesLoaded/bytesTotal) * progress_mc._totalframes ));