aeFadeOutDone Callbackmessage Use

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

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
gshearne
Posts: 36
Joined: Mon Jun 02, 2014 4:41 am

aeFadeOutDone Callbackmessage Use

Post by 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

qberty
Posts: 14
Joined: Thu Dec 16, 2010 8:08 pm

Re: aeFadeOutDone Callbackmessage Use

Post by 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.

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

Re: aeFadeOutDone Callbackmessage Use

Post by 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

gshearne
Posts: 36
Joined: Mon Jun 02, 2014 4:41 am

Re: aeFadeOutDone Callbackmessage Use

Post by 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.

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: aeFadeOutDone Callbackmessage Use

Post by kdjanz » Mon Sep 14, 2020 11:46 pm

Spam, spam, spam, spam,

(sung to the Monty Python tune)

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

Re: aeFadeOutDone Callbackmessage Use

Post by Klaus » Tue Sep 15, 2020 10:04 am

with bacon and Eggs! :-)

SparkOut
Posts: 2839
Joined: Sun Sep 23, 2007 4:58 pm

Re: aeFadeOutDone Callbackmessage Use

Post by SparkOut » Tue Sep 15, 2020 10:20 am

Spam, egg, chips, beans and spam!

But, probably best not to add more comments to the thread - you can use the ! icon by each post to report it, a moderator (likely Klausimausi) will handle it appropriately.

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

Re: aeFadeOutDone Callbackmessage Use

Post by Klaus » Tue Sep 15, 2020 10:35 am

No need to flag anything here, I have a lot of time (unemployed) and read every posting every morning.
And due to years of experience I can smell a spammer from afar! 8)

Post Reply

Return to “Animation Engine”