FlashEff Events


General | Patterns | Properties | Methods | Events | XML

FlashEff Events


Event Description
IOErrorEvent.IO_ERROR Dispatched when the FlashEff component instance encounters an error while the .xml setup file is being loaded.

Example
This example sets up the FlashEff component instance from an external .xml file and displays an error message if the .xml file cannot be read.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import flash.events.IOErrorEvent;
import com.jumpeye.Events.FLASHEFFEvents;

var myEffect:FlashEff = new FlashEff();
this.addChild(myEffect);
myEffect.xmlPath = "setup.xml";

myEffect.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
myEffect.addEventListener(FLASHEFFEvents.COMPLETE, completeHandler);

function errorHandler(evtObj:IOErrorEvent):void {
     trace("Could not read the XML data !");
}

function completeHandler(evtObj:FLASHEFFEvents): void {
     trace("XML data loaded completely");
     trace(evtObj.data);
}
FLASHEFFEvents.COMPLETE Dispatched when the FlashEff component instance is set up from a .xml file and the file has been completely loaded. The event object passed as an argument to the event handler function has a property called data, that gives you access to the XML object used to set up the component instance. This event is dispatched before the FLASHEFFEvents.INIT event.

Example
This example sets up the FlashEff component instance from an external .xml file and displays a text when the component finished reading the .xml file.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import flash.events.IOErrorEvent;
import com.jumpeye.Events.FLASHEFFEvents;

var myEffect:FlashEff = new FlashEff();
this.addChild(myEffect);
myEffect.xmlPath = "setup.xml";

myEffect.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
myEffect.addEventListener(FLASHEFFEvents.COMPLETE, completeHandler);

function errorHandler(evtObj:IOErrorEvent):void {
     trace("Could not read the XML data !");
}

function completeHandler(evtObj:FLASHEFFEvents): void {
     trace("XML data loaded completely");
     trace(evtObj.data);
}
FLASHEFFEvents.INIT Dispatched when the FlashEff component completes the initialization process. This event is dispatched after the FLASHEFFEvents.COMPLETE event.

Example
This example sets up the FlashEff component instance from an external .xml file and displays a traced message when the component finished initializing.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.Events.FLASHEFFEvents;

var myEffect:FlashEff = new FlashEff();
this.addChild(myEffect);
myEffect.xmlPath = "setup.xml";

myEffect.addEventListener(FLASHEFFEvents.INIT, initHandler);

function initHandler(evtObj:FLASHEFFEvents):void {
     trace(evtObj.target+" finished initializing.");
}
FLASHEFFEvents.DOUBLE_CLICK Dispatched by the FlashEff component when the target object has been clicked twice (double click action).

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The show transition will be executed with a 2 second delay and the FlashEff component instance will dispatch the mouse events executed on the target clip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff.symbol.alpha.FESAlpha;

var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
myEffect.showDelay = 2;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";
myEffect.addEventListener(FLASHEFFEvents. DOUBLE_CLICK, dblClickHandler);

function dblClickHandler(evtObj:FLASHEFFEvents): void {
     trace("DOUBLE CLICK on target object");
}
FLASHEFFEvents.MOUSE_DOWN Dispatched by the FlashEff component when a mouse button has been pressed to the target object.

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The show transition will be executed with a 2 second delay and the FlashEff component instance will dispatch the mouse events executed on the target clip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff.symbol.alpha.FESAlpha;

var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
myEffect.showDelay = 2;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";

myEffect.addEventListener(FLASHEFFEvents.MOUSE_DOWN, mouseDownHandler);
myEffect.addEventListener(FLASHEFFEvents.MOUSE_UP, mouseUpHandler);

function mouseDownHandler(evtObj:FLASHEFFEvents): void {
     trace("MOUSE DOWN on target object");
}

function mouseUpHandler(evtObj:FLASHEFFEvents):void {
     trace("MOUSE UP on target object");
}
FLASHEFFEvents.MOUSE_UP Dispatched by the FlashEff component when a mouse button has been released over the target object, regardless of whether the mouse down action has happened to the target object or on another DisplayObject.

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The show transition will be executed with a 2 second delay and the FlashEff component instance will dispatch the mouse events executed on the target clip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff.symbol.alpha.FESAlpha;

var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
myEffect.showDelay = 2;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";

myEffect.addEventListener(FLASHEFFEvents.MOUSE_DOWN, mouseDownHandler);
myEffect.addEventListener(FLASHEFFEvents.MOUSE_UP, mouseUpHandler);

function mouseDownHandler(evtObj:FLASHEFFEvents): void {
     trace("MOUSE DOWN on target object");
}

function mouseUpHandler(evtObj:FLASHEFFEvents):void {
     trace("MOUSE UP on target object");
}
FLASHEFFEvents.ROLL_OVER Dispatched by the FlashEff component when the mouse rolls over the target object's surface.

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The show transition will be executed with a 2 second delay and the FlashEff component instance will dispatch the mouse events executed on the target clip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff.symbol.alpha.FESAlpha;

var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
myEffect.showDelay = 2;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";

myEffect.addEventListener(FLASHEFFEvents.ROLL_OVER, rollOverHandler);
myEffect.addEventListener(FLASHEFFEvents.ROLL_OUT, rollOutHandler);

function rollOverHandler(evtObj:FLASHEFFEvents): void {
     trace("ROLL OVER on target object");
}

function rollOutHandler(evtObj:FLASHEFFEvents): void {
     trace("ROLL OUT on target object");
}
FLASHEFFEvents.ROLL_OUT Dispatched by the FlashEff component when the mouse rolls out of the target object's surface.

Example
The next example applies a show transition based on the Alpha pattern (FESAlpha), to a clip (symbol) called myClip. The show transition will be executed with a 2 second delay and the FlashEff component instance will dispatch the mouse events executed on the target clip.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.Events.FLASHEFFEvents;
import com.jumpeye.flashEff.symbol.alpha.FESAlpha;

var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
myEffect.showDelay = 2;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";

myEffect.addEventListener(FLASHEFFEvents.ROLL_OVER, rollOverHandler);
myEffect.addEventListener(FLASHEFFEvents.ROLL_OUT, rollOutHandler);

function rollOverHandler(evtObj:FLASHEFFEvents): void {
     trace("ROLL OVER on target object");
}

function rollOutHandler(evtObj:FLASHEFFEvents): void {
     trace("ROLL OUT on target object");
}
FLASHEFFEvents.TRANSITION_END Dispatched by the FlashEff component when the transition of a symbol or text pattern has ended.

Example
This example sets up the FlashEff component instance from an external .xml file and traces the start and end of the transition.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FESAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.symbol.alpha.FESAlpha;
import com.jumpeye.Events.FLASHEFFEvents;

var myPattern:FESAlpha = new FESAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
this.addChild(myEffect);
myEffect._targetInstanceName = "myClip";

myEffect.addEventListener(FLASHEFFEvents. TRANSITION_START, transitionStartHandler);
myEffect.addEventListener(FLASHEFFEvents. TRANSITION_END, transitionEndHandler);

function transitionStartHandler(evtObj: FLASHEFFEvents):void {
     trace("The transition has started.");
}

function transitionEndHandler(evtObj:FLASHEFFEvents): void {
     trace("The transition has ended.");
}
FLASHEFFEvents.TRANSITION_START Dispatched by the FlashEff component when the transition of a symbol or text pattern has started.

Example
This example sets up the FlashEff component instance from an external .xml file and traces the start and end of the transition.

Create a movie clip on the stage and give it an instance name of myClip. Next, from the Components panel drag the FlashEff component and the FETAlpha pattern into the Library. Bring up the Actions panel and paste the following code into it:

import com.jumpeye.flashEff.text.alpha.FETAlpha;
import com.jumpeye.Events.FLASHEFFEvents;

var myPattern:FETAlpha = new FETAlpha();
var myEffect:FlashEff = new FlashEff();
myEffect.showTransition = myPattern;
this.addChild(myEffect);
myEffect._targetInstanceName = "myTextField";

myEffect.addEventListener(FLASHEFFEvents. TRANSITION_START, transitionStartHandler);
myEffect.addEventListener(FLASHEFFEvents. TRANSITION_END, transitionEndHandler);

function transitionStartHandler(evtObj: FLASHEFFEvents):void {
     trace("The transition has started.");
}

function transitionEndHandler(evtObj:FLASHEFFEvents): void {
     trace("The transition has ended.");
}


General | Patterns | Properties | Methods | Events | XML




FREE Flash Components

Check out these free, fully functional AS3.0 Flash components by Jumpeye:

FlashEff 2.0 Free
(free for non-commercial use)

JC Panorama
(free for non-commercial use)

JC Play List
(fully free)

Basic Menu Pack V3
(free AS3 version)

MCTE V3
(free AS3 version)

JC Player
(free for non-commercial use)

JC Flash Map
(free for non-commercial use)

Flash Bookmarks
(fully free)

ActionScript Bridge AS2-AS3
(fully free)

JS Charts
(free for non-commercial use - JavaScript comp.)