Adding A Display Object in the Scroll Panel Component
Updated: Oct 19, 2007
Views: 2967
Description: This tutorial will show you how to load a display object into the Scroll Panel Component.
Part II - Changing the XML for an Instance
Please make sure you have reviewed the loading images through XML tutorial. The first step is adding an item in your XML that will load your display object.
Inside you <content></content> tags you will add an item as display object
<item>
<description>Item Description</description>
<path>DispObjExample</path>
<data>URL.html</data>
<type>instance</type>
</item>
The important keys in this step are the name you give the display object and that you that you define the type as instance.
Also make sure the Scroll Panel has an instance name of myScroll.
Part III - Creating the Display Object in Flash
Now in flash create your movie clip display object however you want. Create a little animation so that you notice the difference between images and the movie clip.
Now remove your display object from the stage and 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 - DispObjExample. Also make sure Export for ActionScript and Export in First Frame are both selected.
Make sure you have an instance of Scroll Panel on the stage and it's linked to your XML that you created