Class bgswitcher.BgImage

Description

This class is the backgound of the gallery into which the images load and all the cool masking transitions happen. The following events are dispatched by this class:

ImageLoaded - dispatched when the image is loaded

ImageLoading - Helps you keep track of the load progress of the image. The event has the following properties:
progress - It is a number less than or equal to one denoting the progress of the image.

Field Index

fadeEaseType, fadeTime, isVideo, loopVideo

Method Index

new BgImage()
addEventListener(), loadImage(), loadVideo(), removeEventListener(), resize()

Constructor Detail

BgImage

public function BgImage()

Field Detail

fadeEaseType

public fadeEaseType:String [Write Only]
Use this property to set the fade in/out ease type for the bg images. The value can be any of the supported ease types of tweener.

fadeTime

public fadeTime:Number [Write Only]
Use this property to set the fade in/out time for the bg images.

loopVideo

public loopVideo:Boolean
Use this property to get or set wether the video loops or not.

isVideo

public isVideo:Boolean [Read Only]
Use this property to know if the image currently being displayed is an image or video.

Method Detail

loadImage

public function loadImage(path:String)

Use this method to load any image.

Parameters

path- path of the image to be loaded

loadVideo

public function loadVideo(path:String)

Use this method to load a video.

Parameters

path- path of the video to be loaded

resize

public function resize(w:Number, h:Number)

Use this function to resize the background to certain dimensions

Parameters

w- value for the width
h- value for the height

addEventListener

public function addEventListener()

removeEventListener

public function removeEventListener()