AFComponents.com

Adding Content to Media List: Through Component Inspector
Updated: Jan 24, 2008   Views: 951  
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 Media List AS3.0 Component.
Components Used in this Tutorial: Media List AS3.0.

The Completed Project:



Adding an Image Using Component Inspector


To begin make sure that you have the Media List Component installed using the extension manager, have created a new Flash ActionScript 3.0 File and have dragged an instance of the Media List onto the stage from the Component Panel (Window > Components).

Next, select your instance of the Media List 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 Title of the new item.
  • In Title enter the title of content
  • In the Path enter either the local or full URL path to the image. 
  • Description enter the description of your content
  • Data enter your data path, for example if you are using media list for video enter the path to your .flv video.
Adding an External .SWF

Loading a .swf file from an URL path is similar to loading an image.
  • In Title enter the title of content
  • In the Path enter either the local or full URL path to the swf
  • Description enter the description of your content
  • Data enter your data path, for example if you are using media list for video enter the path to your .flv video.
Adding a Movie Clip

Another type of content that you can load into the Media List is a movie clip that is internal to your flash file.
  • In Title enter the title of content
  • In the Path enter either class name that will give the movie clip in Linkage (directions follow). We use DisplayObjectName in this example
  • Description enter the description of your content
  • Data enter your data path, for example if you are using media list for video enter the path to your .flv video.
The other important step is exporting the Movie Clip for ActionScript. Now, inside of flash create you movie clip however you would like. Once you have create a movie clip, find it in the library (Window > Library). Right click on the movie clip and select Linkage. In the pop-up define the class as the same name you used in the XML document - DisplayObjectName. Also make sure Export for ActionScript and Export in First Frame are both selected.

Media List API Documentation

If you want to change how other things such as the containers in the Media List, there are other properties that you can customize: Media List API.


© 2005-2007 advanced flash components