Home
> FlashEff 1 (Discontinued version)
> Topic
onComplete Listener for Hide?
Posted by urbanlace
onComplete Listener for Hide? January 28, 2009 02:03AM | Registered: 15 years ago Posts: 2 |
Is there a way to apply a listener to an animation that listens for onComplete, onStart, etc...? For instance: If I apply a sparkle effect for Show, then the same sparkle effect for Hide, but once Hide effect is complete the listener fires off a command.
Hope this question makes sense. Thanks in advance.
Edited 2 time(s). Last edit at 01/28/2009 02:04AM by urbanlace.
Hope this question makes sense. Thanks in advance.
Edited 2 time(s). Last edit at 01/28/2009 02:04AM by urbanlace.
Re: onComplete Listener for Hide? January 28, 2009 11:44AM | Admin Registered: 15 years ago Posts: 310 |
Hello
Here is an example on how you can do that using the FLASHEFFEvents.TRANSITION_END:
import com.jumpeye.Events.FLASHEFFEvents;
myEffect.addEventListener(FLASHEFFEvents. TRANSITION_END, transitionEndHandler);
function transitionEndHandler(evtObj: FLASHEFFEvents):void {
if (myEffect.currentTransitionType=="hide" )
{
trace("The "+evtObj.target.currentTransitionType+" transition has ended." );
}
}
Here is an example on how you can do that using the FLASHEFFEvents.TRANSITION_END:
import com.jumpeye.Events.FLASHEFFEvents;
myEffect.addEventListener(FLASHEFFEvents. TRANSITION_END, transitionEndHandler);
function transitionEndHandler(evtObj: FLASHEFFEvents):void {
if (myEffect.currentTransitionType=="hide" )
{
trace("The "+evtObj.target.currentTransitionType+" transition has ended." );
}
}
Re: onComplete Listener for Hide? January 28, 2009 06:13PM | Registered: 15 years ago Posts: 2 |
Re: onComplete Listener for Hide? January 29, 2009 07:03AM | Admin Registered: 15 years ago Posts: 310 |
Hello
Your mistake was that you tried to add an Event Listener to the target of the flashEff . All you should do is to give an instance name to the FashEff instance and than add the Event Listener to it like this:
myFlashEffInstanceName.addEventListener(FLASHEFFEvents. TRANSITION_END, transitionEndHandler);
function transitionEndHandler(evtObj: FLASHEFFEvents):void {
if (myFlashEffInstanceName.currentTransitionType=="hide" )
{
trace("The "+evtObj.target.currentTransitionType+" transition has ended." );
}
}
Next time when you want to post an example please make sure that you do not have premium patterns imported in the library or if your issue is specific to a premium pattern than you can write to the support team (support [at] jumpeyecomponents [dot] com) with a detailed description of your problem and attach your source files to the mail.
Thank you for your inderstanding
Your mistake was that you tried to add an Event Listener to the target of the flashEff . All you should do is to give an instance name to the FashEff instance and than add the Event Listener to it like this:
myFlashEffInstanceName.addEventListener(FLASHEFFEvents. TRANSITION_END, transitionEndHandler);
function transitionEndHandler(evtObj: FLASHEFFEvents):void {
if (myFlashEffInstanceName.currentTransitionType=="hide" )
{
trace("The "+evtObj.target.currentTransitionType+" transition has ended." );
}
}
Next time when you want to post an example please make sure that you do not have premium patterns imported in the library or if your issue is specific to a premium pattern than you can write to the support team (support [at] jumpeyecomponents [dot] com) with a detailed description of your problem and attach your source files to the mail.
Thank you for your inderstanding
Sorry, you do not have permission to post/reply in this forum.