AFComponents.com

Working with Properties in 2D Carousel: Creating a Preview Clip for Items
Updated: Dec 13, 2007   Views: 1899  
Description: This tutorial will show you how to take a MovieClip from your library and connect it to your 2D Carousel AS3.0 Component so that it displays as a placeholder immediately at the start until your images load
Components Used in this Tutorial: 2D Carousel AS3.0.

The Completed Project:



Set-Up and Add Content Using through XML

Before you begin make sure that you have successfully installed the component inspector have been able to load content into the Carousel component using XML. Also if plan on using ActionScript make sure that you give your Carousel an instance name of myCarousel.

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.

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. Check the box Export for ActionScript, make sure Export for first frame is checked, and give it a Class name of PreviewClip.

Setting the Preview Clip Property of the Carousel Component

Next, we need to connect our preview clip to our Carousel Component. We do this by selecting our Carousel Component on the stage and opening either the Parameters Panel (Window > Propeteries) or Component Inscpector (Window > 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:

myCarousel.previewClip = "PreviewClip";


Other Properties for Carousel

For a complete list of the properties that the Carousel supports please see the properties section in the 2D Carousel API documentation.


© 2005-2007 advanced flash components