to reflect how much of the movie has loaded. To see how your movie will appear when it's downloading, choose View > Simulate Download Settings in the preview window. To change the simulation for different speeds, such as a 56K modem, DSL, or a T1 line, choose View > Download Settings. Animating the Preloader You used event listeners in earlier lessons. An event listener waits for an event, such as a mouse click, and then reports the event so that the appropriate response can occur. In this case, you want to monitor how much of the SWF file has loaded and display that information on the screen. That is, you're looking for progress. You'll add an event listener to register and report the progress of the preloader. Then, you'll define a function that will be called repeatedly as the file loads. The function will update the text box that reports how much of the file has loaded and raise the mask to reveal more of the liquid. 1. Add the following line to the ActionScript in the Actions panel: loaderObj.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, preloadProgress); This line adds an event listener of the ProgressEvent type that listens to the loaderObj variable you defined earlier. Once the file has started loading, ActionScript creates a LoaderInfo object. You're using the contentLoaderInfo property to access the information in that object. The event listener, which is also a function, is called preloadProgress. 2. Add the following lines to define the function called preloadProgress function preloadProgress(event:ProgressEvent):void { var loadedPercent:int = event.bytesLoaded /event.bytesTotal * 100; preloader_mc.loadingBar_mc.loaderText_txt.text = loadedPercent + "%"; preloader_mc.loadingBar_mc.loaderMask_mc.scaleY = loadedPercent / 100; } The first line identifies the function called preloadProgress as a ProgressEvent type of event, and identifies its data type as void, which means that it is undefined. The lines between the curly brackets define the function itself. First, you've declared a variable called loadedPercent; int indicates that it is an integer; its value equals the result of the bytes that have been loaded divided by the total bytes times 100. The next line provides the path to the dynamic text. You named the instance loaderText_txt, and it's nested inside the loadingBar_mc instance, which is in turn nested inside the preloader_mc instance. This line calls for text equal to the value of the loadedPercent variable plus the % sign, which is included in a string. Note You could put any text in the string. For example, you could add the word "loaded" or precede the loadedPercent variable with the words, "Please don't leave. You're at" so that it would appear on the screen as "Please don't leave. You're at 14%". The final line in the function traces the path to the mask, which you named loaderMask_mc. Like the text instance, it is nested inside the loadingBar_mc instance, which is nested inside the preloader_mc instance. This line scales the mask on its y axis (the vertical axis) to equal the value of the loadedPercent variable divided by 100. All functions are surrounded by curly brackets, so a closing curly bracket completes this function. 3.