Adding a Preview Clip Before the Image Loads in the Loop AS3.0 Component
Updated: Nov 28, 2007
Views: 1510
Description: This tutorial will show you how to take a MovieClip from your library and connect it to your Loop AS3.0 Component so that it displays as a placeholder immediately at the start until your images load
Part II - Loop and XML
To proceed you need to have created an XML file and linked your Loop component on the stage in flash to the XML File. If you have not, please see the loading images through XML tutorial. Also make sure the Loop has an instance name of myLoop.
Part III - Creating the Preview Clip Movie Clip
Next, you will need to create your Preview Clip. Create a new movie clip (Insert > New Symbol). Give it a name: PreviewClip and select type: Movie Clip. You can now create your graphic or animation using the timeline.
Part IV - Export our Preview Clip for ActionScript
We now need to export our new preview clip for ActionScript. We do this by opening our library (Window > Library) and finding our Movie Clip that we created and right clicking and selecting Linkage. r Check the box Export for ActionScript, make sure Export for first frame is checked, and give it a Class name of PreviewClip.
Part V - Setting the Preview Clip Property of Loop Component
Next, we need to connect our preview clip to our Loop Component. We do this by selecting our Loop Component on the stage and opening either the Parameters Panel (Windows > Propeteries) or Component Inscpector (Windows > Component Inspector). We find the previewClip property and set this to the class name that we used in the last step: PreviewClip.
This can also be done in ActionScript:
myLoop.previewClip = "PreviewClip";