Adding Content to 2D Carousel: Through Component Inspector
Updated: Dec 3, 2007
Views: 1120
Description: This tutorial will show you how to use the Component Inspector inside of flash to load various types of content (images, movie clips, .swfs) into the 2-D Carousel AS3.0 Component.
Components Used in this Tutorial: 2D Carousel AS3.0
The Completed Project:
Adding an Image Using Component Inspector
To begin make sure that you have the Carousel Component installed using the extension manager, have created a new Flash ActionScript 3.0 File and have dragged an instance of the 2D Carousel onto the stage from the Component Panel (Window > Components).
Next, select your instance of the Carousel and in the Component Inspector (Window > Component Inspector) or Parameters Panel (Window > Properties > Parameters) look for the property called Content. Double Click the "[]" in the value for content and new window will pop-up. Use the + to add an item. When you add an item you can define the Path, Description, Data, and Type of the new item.
Loading a .swf file from an URL path is similar to loading an image.
Another type of content that you can load into the Carousel is a movie clip that is internal to your flash file.
Properties of the Carousel That Will Affect How The Content Loads
After you have successfully loaded your content in the Carousel, you may want to change how your content is appearing in the Carousel. These can also be found in the component inspector (Window > Component Inspector) or parameters panel (Window > Properties > Parameters) under the property contentStyle:
The Completed Project:
Adding an Image Using Component Inspector
To begin make sure that you have the Carousel Component installed using the extension manager, have created a new Flash ActionScript 3.0 File and have dragged an instance of the 2D Carousel onto the stage from the Component Panel (Window > Components).
Next, select your instance of the Carousel and in the Component Inspector (Window > Component Inspector) or Parameters Panel (Window > Properties > Parameters) look for the property called Content. Double Click the "[]" in the value for content and new window will pop-up. Use the + to add an item. When you add an item you can define the Path, Description, Data, and Type of the new item.
- In the Path enter either the local or full URL path to the image.
- Description is optional but useful if you want a text description or if you are linking to another component.
- Data is also an optional field but is useful if you want to add a hyperlink or a large image link if you are using the Carousel in a gallery.
- In Type we will enter image since we are loading an image.
Loading a .swf file from an URL path is similar to loading an image.
- In the Path enter either the local or full URL path to the swf.
- Description is optional but useful if you want a text description or if you are linking to another component.
- Data is also an optional field but is useful if you want to add a hyperlink or a large image link if you are using the Carousel in a gallery.
- In Type we will still enter image.
Another type of content that you can load into the Carousel is a movie clip that is internal to your flash file.
- In the Path enter either class name that will give the movie clip in Linkage (directions follow). We use DisplayObjectName in this example
- Description is optional but useful if you want a text description or if you are linking to another component.
- Data is also an optional field but is useful if you want to add a hyperlink or a large image link if you are using the Carousel in a gallery.
- In Type we enter instance.
Properties of the Carousel That Will Affect How The Content Loads
After you have successfully loaded your content in the Carousel, you may want to change how your content is appearing in the Carousel. These can also be found in the component inspector (Window > Component Inspector) or parameters panel (Window > Properties > Parameters) under the property contentStyle:
- width to desired image width
- height to desired image height
- maintainAspectRatio to false
- scaleContent to true
- autoSize to false