The
following document details the use of the properties and methods of the thumbNailer Component via ActionScript.
myThumbnailer.makeThumbnails(thumbNames, width, height,
distance, velocity, path);
Parameters
thumbNames - An array of text strings listing the names of thumbnail jpegs (with or without .jpg extension) or swf files (with the swf extension).
width - An integer specifying
the width of area that the thumbnailer will occupy.
height - An integer specifying
the height of area that the thumbnailer will occupy.
distance - An integer specifying the distance
between thumbnails.
velocity - An integer specifying the acceleration factor of
thumbnail movement.
path - An string holding relative path to the thumbnail
folder.
Returns
Nothing
Description
Resets
the component and reloads thumbnails
Example
The
following code will initialize Thumbnailer component:
var temp = ["thumb01", "thumb02",
"thumb03", "thumb04", "thumb05",
"thumb06"];
myThumbs.makeThumbnails(temp, 450, 100, 10, 10,
"thumbs”);
myThumbnailer.loadThumbnails(thumbNames, path);
Parameters
thumbNames - An array of text strings listing the names of thumbnail jpegs (with or without .jpg extension) or swf files (with the swf extension).
path - An
string holding relative path to the thumbnail folder.
Returns
Nothing
Description
Reloads
thumbnails
Example
The
following code will reload thumbnails:
var temp = ["thumb21", "thumb22",
"thumb23", "thumb24", "thumb25",
"thumb26"];
myThumbnailer.loadThumbnails(temp,
"thumbs2");
myThumbnailer.onThumbOver = function(mc)
{};
Parameters
mc - path to the MovieClip instance
that holds the thumbnail.
Returns
Nothing
Description
Event handler; invoked
when the pointer rolls over a thumbnail area.
You must define a function that executes when the event is invoked.
Example
The following example
defines a function for the onThumbOver method that sends a trace
action to the Output window:
myThumbnailer.onThumbOver = function(mc) {
trace ("onThumbOver called
-> " + mc);
}
myThumbnailer.onThumbOut = function(mc)
{};
mc - path to the MovieClip instance
that holds the thumbnail.
Returns
Nothing
Description
Event handler; invoked
when the pointer rolls out of a thumbnail area.
You must define a function that executes when the event is invoked.
Example
The following example
defines a function for the onThumbOut method that sends a trace
action to the Output window:
myThumbnailer.onThumbOut = function(mc) {
trace ("onThumbOut called
-> " + mc);
}
myThumbnailer.onThumbPress = function(mc)
{};
mc - path to the MovieClip instance
that holds the thumbnail.
Returns
Nothing
Description
Event handler; invoked
when the mouse pointer is clicked on thumbnail area.
You must define a function that executes when the event is invoked.
Example
The following example
defines a function for the onThumbPress method that sends a trace
action to the Output window:
myThumbnailer.onThumbPress= function(mc) {
trace ("onThumbPress called
-> " + mc);
}
onThumbRelease
myThumbnailer.onThumbRelease = function(mc) {};
mc - path to the MovieClip instance
that holds the thumbnail.
Returns
Nothing
Description
Event handler; invoked
when the mouse pointer is released on thumbnail area.
You must define a function that executes when the event is invoked.
Example
The following example
defines a function for the onThumbRelease method that sends a trace
action to the Output window:
myThumbnailer.onThumbRelease= function(mc) {
trace ("onThumbRelease called
-> " + mc);
}
onThumbReleaseOutside
myThumbnailer.onThumbReleaseOutside= function(mc) {};
mc - path to the MovieClip instance
that holds the thumbnail.
Returns
Nothing
Description
Event handler; invoked
when the mouse pointer is released while the pointer is outside the thumbnail
after the mouse is clicked inside thumbnail area.
You must define a function that executes when the event is invoked.
Example
The following example
defines a function for the onThumbReleaseOutside method that sends a trace
action to the Output window:
myThumbnailer.onThumbReleaseOutside =
function(mc) {
trace ("onThumbReleaseOutside
called -> " + mc);
}
onThumbLoad
myThumbnailer.onThumbLoad= function(mc) {};
mc - path to the MovieClip instance
that is loaded
Returns
Nothing
Description
Event handler; invoked
for each thumbnail jpeg loaded.
You must define a function that executes when the event is invoked.
Example
The following example
defines a function for the onThumbLoad method that sends a trace
action to the Output window:
myThumbnailer.onThumbLoad= function(mc) {
trace ("thumbnail loaded at
" + mc);
}
onThumbsLoaded
myThumbnailer.onThumbsLoaded= function(mc) {};
mc - path to the MovieClip instance
that is loaded
Returns
Nothing
Description
Event handler; invoked
when all thumbnails are loaded.
You must define a function that executes when the event is invoked.
Example
The following example
defines a function for the onThumbsLoaded method that sends a trace
action to the Output window:
myThumbnailer.onThumbsLoaded = function() {
trace ("All Thumbnails are
loaded!");
}