3D ImageFlow Gallery Reference

Dazzle your viewers with 3D photo navigation. Create an amazing gallery with cool  perspective effects in seconds and give your photos stunning 3d and camera effects.  The component is fully ActionScript 2 compatible.
 

Make sure to take a look at the online documentation as well.

Gallery.replaceItemAt()

Usage

galleryInstance.replaceItemAt(index, itemObject)

Parameters

Index A number greater than or equal to 0 and less than Gallery.length that indicates the position of the item to place.

itemObject An item object that has an url property that is the path to the image to show, optionally an item can have a width and height property which contains the image size, a description property that is used to describe the image and is shown when the image is selected and a link and target property that contains the url where to go to when the selected image is double clicked.

Returns

Nothing.

Description

Method; Removes the item at the specified index position. The gallery indices after the specified index collapse by one.

Example

The following example replaces the current selected item in the Gallery. To try this code, drag a Gallery component to the Stage and give it the instance name my_gallery. Next, drag a Button component to the Stage and give it the instance name replace_button. Add the following code to Frame 1 in the timeline:

var my_gallery:com.flzone.imageflow.Gallery;
var replace_button:mx.controls.Button;
replace_button.label = "Replace";
my_gallery.addItem({url:"photo1.jpg"});
my_gallery.addItem({url:"photo2.jpg"});
my_gallery.addItem({url:"photo3.jpg"});
var buttonListener:Object = new Object();
buttonListener.click = function(evt_obj:Object) {
    my_gallery.replaceItemAt(my_gallery.selectedIndex, {url:"photo4.jpg"});
};
replace_button.addEventListener("click", buttonListener);


Comments

Be the first to write a comment

You must me logged in to write a comment.