Advanced Flash Components
Search!
Search!
Home >  Components >  IMG Loader (Pixelate) >  API Documentation
API Documentation
IMG Loader (Pixelate) V. 3.0 Documentation
Properties
Name Type Description
autoLoad Boolean Property indicates whether to automatically load the content (true), or wait until Loader.load() is called (false). The default value is true.
autoSize Boolean Property indicates whether the component is resized to match the image size (true). The default value is false.
content Object Property defines content parameters.
  1. path:String – path to the file
  2. description:String – content description
  3. data:Mixed – misc data parameter
Example

var contentObj = new Object();
contentObj.path = "image.jpg";
contentObj.description = "My Image";
myLoader.content = contentObj;
easingSpeed Number Property (1-10) indicates transition easing speed.
easingType String Property indicates transition easing type.
  1. none:String
  2. in:String
  3. out:String
maintainAspectRatio Boolean Property that, if true, maintains the image aspect ratio. The default value is true.
preloader String Property defines whether the preloader is displayed. The default value is set to on.
  1. on:String
  2. off:String
preloaderColor Number Property defines preloader color.
scaleContent Boolean Property indicates whether the content scales to fit the loader (true), or the loader scales to fit the content (false). The default value is true.
transition String Property defines whether the transition is displayed. The default value is on.
  1. on:String
  2. off:String
transitionPixelateAmount Number Property (0-10) indicates transition blur amount.
description String Property (on, off, autohide) indicates how description bar is displayed.
descriptionAlign String Indicates description bar alignment (top-left, top-center, top-right, bottom-left, bottom-center, bottom-right).
descriptionColor Number Hexadecimal color value (0x000000) of the image description window background.

Note: The description background is always displayed with 50% opacity.
descriptionFont String Indicates the description font. Please note that specified font is not embedded automatically.

Note: in order to prevent problems use “safe fonts”.
descriptionFontColor Number Hexadecimal color value (0x000000) that defines description font color.
descriptionFontSize Number Defines description font size.
descriptionPadding Object Defines vertical and horizontal padding.
  1. horizontal:Number – Horizontal Padding
  2. vertical:Number – Vertical Padding
descriptionTextAlign String Defines description text alignment (left, center, right).
descriptionWidth Number Determines description bar width (0-100).

Note: this is a percentage value based on the component width.
Methods
Name Return Type Description
load( path:String,
[description:String,
data:String]
)
Void Loads specified content.

Example

loader.load("image.jpg", "My Image Description", "my_data.flv");
unload( ) Void Forces unload of current content.
Events
Name Return Value Description
INITIALIZE target
type
Triggered after component initializes.

Example

var eventListener = new Object();
eventListener.INITIALIZE = function (evnt){
    trace("Component is ready to go");
}
myLoader.addEventListener("INITIALIZE",eventListener);
ERROR target
type
message
Triggered once an error occurs. If there is an error loading an image this event fired.

Example

var eventListener = new Object();
eventListener.ERROR = function (evnt){
    trace(evnt.message);
}
myLoader.addEventListener("ERROR",eventListener);
LOAD_START type
target
Triggered after loading starts.

Example

var eventListener = new Object();
eventListener.LOAD_START = function (evnt){
    trace("Loading...");
}
myLoader.addEventListener("LOAD_START",eventListener);
LOAD_PROGRESS type
target
bytesLoaded
bytesTotal
Triggered while image is being loaded.

Example

var eventListener = new Object();
eventListener.LOAD_PROGRESS = function (evnt){
    trace(evnt.bytesLoaded);
    trace(evnt.bytesTotal);
}
myLoader.addEventListener("LOAD_PROGRESS",eventListener);
LOAD_COMPLETE type
target
Triggered after the image as been loaded.

Example

var eventListener = new Object();
eventListener.LOAD_COMPLETE = function (evnt){
    trace("Loaded");
}
myLoader.addEventListener("LOAD_COMPLETE",eventListener);
TRANSITION_START type
target
Triggered after transition starts.

Example

var eventListener = new Object();
eventListener.TRANSITION_START = function(evnt){
    trace("Transition started");
}
myLoader.addEventListener("TRANSITION_START",eventListener);
TRANSITION_PROGRESS type
target
Triggered during the transition.

Example

var eventListener = new Object();
eventListener.TRANSITION_PROGRESS = function(evnt){
    trace("Transition is rocking");
}
myLoader.addEventListener("TRANSITION_PROGRESS", eventListener);
TRANSITION_END type
target
Triggered once transition completes.

Example

var eventListener = new Object();
eventListener.TRANSITION_END = function(evnt){
    trace("Transition is done");
}
myLoader.addEventListener("TRANSITION_END",eventListener);
ON_ROLL_OVER type
path
description
data
Triggered once mouse enters the area of the component.

Example

var eventListener = new Object();
eventListener.ON_ROLL_OVER = function (evnt){
    trace(evnt.path);
    trace(evnt.description);
    trace(evnt.data);
}
myLoader.addEventListener("ON_ROLL_OVER",eventListener);
ON_RELEASE type
path
description
data
Triggered on onRelease button event.

Example

var eventListener = new Object();
eventListener.ON_RELEASE = function (evnt){
    trace(evnt.path);
    trace(evnt.description);
    trace(evnt.data);
}
myLoader.addEventListener("ON_RELEASE",eventListener);
ON_ROLL_OUT type
path
description
data
Triggered on onRollOut button event.

Example

var eventListener = new Object();
eventListener.ON_ROLL_OUT = function (evnt){
    trace(evnt.path);
    trace(evnt.description);
    trace(evnt.data);
}
myLoader.addEventListener("ON_ROLL_OUT",eventListener);
ON_DRAG_OUT type
path
description
data
Triggered on onDragOut button event.

Example

var eventListener = new Object();
eventListener.ON_DRAG_OUT = function (evnt){
    trace(evnt.path);
    trace(evnt.description);
    trace(evnt.data);
}
myLoader.addEventListener("ON_DRAG_OUT",eventListener);