Get ready for BLACK FRIDAY shopping starting in

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.selectedIndex

Usage

galleryInstance.selectedIndex

Description

Property; the selected index of the gallery. If you assign a value to selectedIndex, the indicated item is selected.

Using the selectedIndex property to change selection doesn't dispatch a change event and will not animate to the item but will change directly. To dispatch the change event, use the following code:

my_gallery.dispatchEvent({type:"change", target:my_gallery});

Example

The following example selects the second item in the gallery and displays the index of the currently selected whenever the user navigates. To try this example, drag a Gallery component to the Stage and give it the instance name my_gallery. Add the following code to Frame 1 in the timeline:

var my_gallery:com.flzone.imageflow.Gallery;
my_gallery.addItem({url:"me.jpg", description:"This is me"});
my_gallery.addItem({url:"colleagues.jpg", description:"My colleagues"});
my_gallery.addItem({url:"office.jpg", description:"The office"});
my_gallery.selectedIndex = 1;
var galleryListener:Object = new Object();
galleryListener.change = function(evt_obj:Object) {
    trace("selectedIndex = " + evt_obj.target.selectedIndex);
};
My_gallery.addEventListener("change", galleryListener);


Comments

Be the first to write a comment

You must me logged in to write a comment.