aeFadeOutDone Callbackmessage Use

Create fast, sprite powered games with Animation Engine, co-developed with DerBrill Software!

Moderators: heatherlaine, kevinmiller, robinmiller, malte

aeFadeOutDone Callbackmessage Use

Postby gshearne » Sun Mar 12, 2017 12:25 am

Malte (or any other kind soul),

I am having a problem getting the below snippet to work. I keep getting a compile error. I am on build 8.13. I just want to wait till my image fade out is done before moving to a new card.

aeFadeOut the long ID of img "Picture", 2000
on aeFadeOutDone
go to card "Next Topic"
end aeFadeOutDone

I have tried a variety of things but none successful. Any guidance would be appreciated.
Thaks
Greg
gshearne
 
Posts: 20
Joined: Mon Jun 02, 2014 4:41 am

Re: aeFadeOutDone Callbackmessage Use

Postby qberty » Tue Mar 14, 2017 6:01 pm

A safer way to do this is without locking any messages. Try the send in time function:

Code: Select all
on mouseUp
aeFadeOut the long id of img "Picture",2000
send "FadedOut" to me in 2025 millisecs
end mouseUp

on FadedOut
go to card "Next Topic"
end FadedOut


The important thing to note here when using animationEngine and sending in time functions is that there needs to be some variance with the sending milliseconds (hence the 2025 instead of just 2000), so you don't cause conflicts just in case.
qberty
 
Posts: 11
Joined: Thu Dec 16, 2010 8:08 pm

Re: aeFadeOutDone Callbackmessage Use

Postby Klaus » Wed Mar 15, 2017 12:41 pm

Hi Greg,

Code: Select all
   aeFadeOut the long ID of img "Picture", 2000
   on aeFadeOutDone
       go to card "Next Topic"
   end aeFadeOutDone

if this is your code then a compile error isn't a surpise really! 8)

The "aeFadeOut" command should of course be wrapped in some kind of handler like "mouseup"!
I do not use AE but I guess the "aeFadeOutDone" will be sent to the object that invoked the "aeFadeOut" command.

In that case you should script:
Code: Select all
on mouseup
   ## or opencard or whenever you want to fire this one!
   aeFadeOut the long ID of img "Picture", 2000
end mouseup

## This needs to be in the same script or at least somewhere in the correct message hierarchy!
on aeFadeOutDone
    go to card "Next Topic"
end aeFadeOutDone


Best

Klaus
Klaus
 
Posts: 9183
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany

Re: aeFadeOutDone Callbackmessage Use

Postby gshearne » Sun Mar 19, 2017 12:23 pm

Thank you very much for both suggestions. At first neither worked for me in my stack but when I did a new stack it was fine. I think I have done to much experimenting in the first stack and have managed to corrupt something. Thanks again.
gshearne
 
Posts: 20
Joined: Mon Jun 02, 2014 4:41 am


Return to Animation Engine

Who is online

Users browsing this forum: No registered users and 1 guest