Mixing FlashEff2 AS3 code with Effects already designed

Posted by djumeau 
Mixing FlashEff2 AS3 code with Effects already designed
July 11, 2009 08:32PM
I have been viewing the tutorials which seem to just apply to just code and other just design. I was wondering if there is something out there that do both?

I like to apply all my effects at design time, and then detect the transitions that have been completed via Actionscript.

For example I have two frames with two stop() actions on each. On each frame, I apply some text effects in each frame (The first frame, a "Show" effect, and the second frame a "Hide" effect.

How would I be able to use AS3 to detect the completion of the transition of the first effect to move on to the second frame? I assume that you need to have the FlashEff2Code component in the library correct?

Let say,

myEffInstanceFrame1.addEventListener("onTransitionComplete", onTransitionComplete);

function onTransitionComplete():void {
goNextFrame();
}

Thx,

David
Re: Mixing FlashEff2 AS3 code with Effects already designed
July 13, 2009 08:41AM
Hi David,

In the package you have downloaded from FlashEff.com you'll see a pdf file called ActionScript 3.0 Usuage, there you'll find all methods and properties that FlashEff2 has.
For example, to listen to the compelete or start event you'll use:

import com.jumpeye.Events.FLASHEFFEvents;
myEffect.addEventListener(FLASHEFFEvents.TRANSITION_START, effectStarting);
myEffect.addEventListener(FLASHEFFEvents.TRANSITION_END, effectEnding);
function effectStarting(evt:FLASHEFFEvents):void {
trace("The effect has started");
}
function effectEnding(evt:FLASHEFFEvents):void {
trace("The effect has endded");
}

Hope this helps,

Ionut.
Sorry, you do not have permission to post/reply in this forum.