Basic Instructions


1. First ensure that you have installed the uniLoader or uniLoader-AS3 component using Adobe Extension Manager.

2. Drag and drop the uniLoader or uniLoader-AS3 component from the components panel onto the stage.


3. Click on the uniLoader component that you just dragged onto the stage in order to view its parameters in the properties panel. The parameters should be set using the Component Inspector. If you view the properties panel, you will see a "Launch Component Inspector" button. Press this button in order to open the Component Inspector.

 

4. Enter the following parameters in the component inspector panel:

PROPERTY
EXAMPLE
ActionScript EXAMPLE
DESCRIPTION
Load Location
movieclip instance, XML object
myLoader.loadFile("file.jpg", mc, "jpg");
Target movieClip or xml object name to load the content in.
Content type
n/a
myLoader.loadFile("file.jpg", mc, "jpg");
Type of content to be loaded
File to load
n/a
myLoader.loadFile("file.jpg", mc, "jpg");

URL of the content to load

onLoad group
n/a
myLoader.afterLoad("gotoAndPlay", 2);
myLoader.afterLoad("gotoAndStop", 2);
myLoader.afterLoad("play");
myLoader.afterLoad("nextFrame");
myLoader.afterLoad("handler","handler_name");1
5 options to choose from. In the input fields of the gotoAndPlay/Stop you could type both the number of the frame or the frame's label. onLoadedHandler is the name of the function to call.
Preloader text
n/a
myLoader.preloaderText = "%bl% from %bt%";
Text to be displayed in the loader label. Have several regular expressions:
%pl% - percents loaded
%bl% - bytes loaded
%bt% - bytes total
%kbl% - kilobytes loaded
%kbt% - kilobytes total
Load up to frame #
n/a
myLoader.setStream("loadUpToFrame", 5);

Number of frames to be loaded before start playing the loaded SWF. (default is 0, which means all frames)

Bytes to load
n/a
myLoader.setStream("bytesToLoad", 50000);

Number of bytes to be loaded before start playing the loaded SWF. (default is 0, which means all bytes)

Percentage of total bytes to load
n/a
myLoader.setStream("prcntToLoad", 50);

Percents to be loaded before playing the loaded SWF.

Load fully
n/a
myLoader.setStream("fullLoad");
Loads the content entirely.
Preloader position
n/a
myLoader.valign = "top";
myLoader.valign = "center";
myLoader.valign = "bottom";
myLoader.valign = "custom";
myLoader.halign = "left";
myLoader.halign = "center";
myLoader.halign = "right";
myLoader.halign = "custom";
Horizontal align of the preloader bar. (left, center, right, custom)
Vertical align of the preloader bar. (top, center, bottom, custom)
Custom horizontal position of the preloader bar. (works only if horizontal align is set to "custom")
Custom vertical position of the preloader bar. (works only if vertical align is set to "custom")
Label align
n/a
myLoader.loaderLabelAlign = "above";
myLoader.loaderLabelAlign = "below";
Vertical align of the loader label. (above,/below the preloader bar)
Label to preloader space
n/a
myLoader.labelSpace = 10;
Vertical distance between preloader bar and preloader label
Colors
n/a
myLoader.loaderBarColor = "0xFF00FF";
myLoader.loaderBackgroundColor = "0xCCFFAA";
myLoader.loaderTextColor = "0xCCCCCC";
myLoader.labelBackgroundColor = "0xFFFFFF";

Loader bar color - color of border and filler of preloader bar
Loader background color - color of preloader bar's background
Label color - color of the loader label text
Label background color - color of the label's background

Show loader bar
n/a
myLoader.showLoaderBar = true;
Shows/hides preloader bar
Show loader label
n/a
myLoader.showLoaderLabel = true;
Shows/hides loader label
Loader style
n/a
myLoader.loaderStyle = "basic";
myLoader.loaderStyle = "bounce";
myLoader.loaderStyle = "thermo";
myLoader.loaderStyle = "pie";
myLoader.loaderStyle = "equalize";
myLoader.loaderStyle = "glass";
myLoader.loaderStyle = "fill";
myLoader.loaderStyle = "custom";

Drop-down list with different styles for preloader bar.

If custom is selected, you can define your own function to create a custom preloader.

* Bounce acceleration
n/a
myLoader. _loaderBounceAcc = 5; 
Acceleration of the bounce effect for some of the styles of preloader bar. (bounce, fill, equalize, thermo)
* Bounce ratio
n/a
myLoader. _loaderBounceRatio = 5;
Ratio of the bounce effect for some of the styles of preloader bar. (bounce, fill, equalize, thermo)
** Bounce Duration
n/a
myLoader.bounceDuration = 5;
Duration of the bounce effect for some of the styles of preloader bar. (bounce, fill, equalize, thermo)
Percentage step
n/a
myLoader.loaderPrcntStep = 10;
Step to display in the preloader bar while loading content.
Loader width/scaleX/diameter
n/a
myLoader.loaderWidth = 100;
Width/scaleX of the preloader bar(scaleX is for glass and thermo styles, diameter is for pie style)
Loader height/scaleY
n/a
myLoader.loaderHeight = 10;
Height/scaleY of the preloader bar(scaleY is for glass and thermo styles)
Label width
n/a
myLoader.loaderLabelWidth = 100;
Width of the label text field.
Show label's border
n/a
myLoader.showLabelBorder = true;
Shows the border of the label
Auto start
n/a
myLoader.autoStart = true;
Indicates if preloader should start automatically or via method startLoad()

Note: Please note that in this sample "handler" is reserved word for this action, "handler_name" is the name of the function to call. back

* uniLoader only
** uniLoader-AS3 only

5. If you set "Auto start" to "No", you may enter the following code in the frame where you would like the uniLoader to start loading:

myLoader.startLoad()

Where 'myLoader' is the instance name of the uniLoader.

The uniLoader-AS3 should now work correctly. Please see the advanced instructions for information on loading the root timeline and xml files.