My account
Shopping cart
Knowledge base
Support


Usage and Code Samples for Loader Pro V1.2 Flash Component



Loader Pro V1.2 Usage

Usage:
1. Drag and drop the component to the stage.
2. Set the contentPath of the component.
3. Set the parameters to your movie needs.
4. Compile and go.
To access the loaded content use this linkage:
loaderinstance.content

Parameters:
1. _builtInPreloader:Boolean (default=true) if true will open the built In preloader; false will make it invisible.
2. _discard_old:Boolean (default=false) if true will discard last object loaded right when the new one starts loading; if false, will unload last object only when new object is arrived.
3. _preloaderColor:Color (default=0xFFFFFF) choose the color for the built in preloader from the colorpicker.
4. _scaleMode:String Enumeration (defaul="scale") modes available: scale, resize and none.
5. _alignH:String Enumeration (default=center) Horizontal alignment.
6. _alignV:String Enumeration (default=middle) Vertical alignment.
7. appear:String Enumeration (default=alpha) appearance modes available: alpha, transition, none.
8. contentPath:String Sets the link to the object that has to be loaded in the loader component.
9. speed:Number (default=10) the number of frames of the appearance transition tween.

Functions:
1. loader.onLoad(boolvar); will be called when new content is loaded (boolvar = true) or when error occurs (boolvar = false). The onLoad function will also be called with no parameters when component draws.
2. loader.onProgress(percentage); will be called on every frame of the loading progress. Use this instead of using the built in preloader. use the percentage to animate loader bars, or to display in textfields.

Code Samples

loader.onLoad = function(success) {
if (success) {
trace("loaded");
}
};
btn.onRelease = function() {
loader.contentPath = "poza3.jpg";
};
loader.onProgress = function(proc){
pregressbar._xscale=proc
}