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

Usage

Usage 1:

var listenerObject:Object = new Object();
listenerObject.motionFinished = function(eventObject:Object) {
    // Your code here
};

Usage 2:

on (motionFinished) {
    // Your code here
}

Description

Event; triggered when the tween animation finished.

The first usage example uses a dispatcher/listener event model. A component instance dispatches an event (in this case, motionFinished) and the event is handled by a function, also called a handler, on a listener object (listenerObject) that you create. You define a method with the same name as the event on the listener object; the method is called when the event is triggered. When the event is triggered, it automatically passes an event object (eventObject) to the listener object method. Each event object has properties that contain information about the event. You can use these properties to write code that handles the event. For more information, see EventDispatcher class (API).

Finally, you call the addEventListener() method on the component instance that broadcasts the event to register the listener with the instance. When the instance dispatches the event, the listener is called.

The second usage example uses an on() handler and must be attached directly to a Gallery instance. The keyword this, used inside an on() handler attached to a component, refers to the component instance

Example

The following example displays a message in the Output panel when a motion is finished. 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"});
var galleryListener:Object = new Object();
galleryListener.motionFinished = function(evt_obj:Object) {
    trace("Finished with the motion to index " + evt_obj.target.selectedIndex);
};
my_gallery.addEventListener("motionFinished", galleryListener);


Comments

Be the first to write a comment

You must me logged in to write a comment.