only US$ 20.00
about SCOTT
SCOTT is very easy to use and requires no programming unless you want to add some action when an image is clicked. SCOTT also resizes the images for you, you only need to wory about the correct pathes...

In order to allow you to create your own style, you can draw the MovieClips that are used for the progress display and the image slider yourself. You need to export them for ActionScript use and enter their names in the component inspector. That's it, SCOTT will use your MovieClips from now on.

If you need a function that is called whenever an image is clicked, just write the function in the same frame as the component and enter the name of the function in the "click_action" parameter of your component. SCOTT will call this function and pass in the whole XML node, meaning you can have any number of arguments inside your XML nodes.
SCOTT reference
Scott has a couple of functions you can use to manipulate the component.

acceleration:Number
set the acceleration at the point when SCOTT starts moving the images. This number can be positive or negative, and zero

initial_speed:Number
the amount of pixels to move when SCOTT starts moving the images. This number should be greater than zero, otherwise SCOTT will behave strangely.

click_function:String
the name of a function to call when an image is clicked. The function must be in the same MovieClip as the component.

image_spacing:Number
the amount of pixels between one image and the other

next_image_load_treshold:Number
SCOTT delays the loading of the next image until the already images don't move anymore. Because the easing can be very slow, you probably want to load the next image earlier. If so, define a higher number here.

scott_progressbar_mc:String
the linkage name of the MovieClip that SCOTT will use as progress display

scott_scrollbar_instance:String
the runtime name of the slider instance in order to allow SCOTT to tell the image position

xml:String
the full path to the XML file to load. This path can be relative or absolute, but we suggest using something like "/scott/images.xml"
If you reset this property at any time during execution, SCOTT will clear all loaded images and start loading the XML from the newly defined file (even if it is the same file)

move(amount:Number)
lets SCOTT move the images by amount, which can be positive or negative to define the direction.

about the movement
This graphic should explain how the
(de-)acceleration works.

 
Follow these steps to learn how to use SCOTT.
After having downloaded SCOTT, extract the ZIP file to some folder of your choice and double click the MXP file.
Start with an empty project or open the project you want to use SCOTT in. From the components panel (CTRL-F7), drag scott_image_slider to your stage.
Go to the properties panel (CTRL-F3). You can set the position and dimension of your image slider there. Also, you can give your instance of SCOTT a name.
Open the Component Inspector (ALT-F7). Look for an entry called "XML", where you put a relative or absolute path to your XML file (see next step). You can set some other parameters for SCOTT there. For example, you can set values for the moving.
You should now create the XML file you defined in the step above. Easiest way is to start with the example file you can download here. The src attribute is necessary, but you can add any other attribute.
You probably want your own loader MovieClip. Download this file, and move the MovieClip "scott_image_progress" to your Flash project.
Make sure this MovieClip is exported for ActionScript use. To check, open the library (CTRL-L), right-click "scott_image_progress", choose "Linkage..." and check "Export for ActionScrip"
Also make sure that in the properties of SCOTT, parameter "scott_progressbar_mc", the correct linkage name of your progress MovieClip is defined.
Your SCOTT image slider is working now, but is still lacking the scrollbar. If you need a slider, drag "scott_scrollbar" to your stage.
You now need to tell the components about each other. Give the two components a (different) name, and set the name of the other one in the component inspector of each component.
If you want to modify the scrollbar, do it the same way as the slider. Just create your own MovieClips for the track and the slider and define the linkage names of them in your slider.

Gianni Frey
Gianni Frey
Gianni Frey is a ColdFusion, C#, and Flash Programmer, and a Layout Designer. He currently studies Computer Science at ETH Zurich.

gianni@frogstyle.ch

 
188 ms
© 2000 - 2004 frog style web engineering, all rights reserved