aeCrossFade problem

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

Moderators: heatherlaine, kevinmiller, robinmiller, malte

Post Reply
niconiko
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 32
Joined: Mon Jul 17, 2006 2:28 am
Location: Motegi, Japan

aeCrossFade problem

Post by niconiko » Fri Jul 22, 2011 4:06 am

Hello.

The script below works during development, and it also works when it's part of a standalone stack (.exe).

But the very same script, when it is part of a stack that's been opened by another stack, will cause a crash when it gets to aeCrossFade gets.

Code: Select all

on mouseUp

   // Check if AE is available

   if "animationEngine" is not among the lines of the stacksInUse then exit mouseUp

   set the cpDigitFadeEffect of this card to true
   put "poz-" & field "poz" into tDigitPozGp
   put "pt-" & field "out" into tPrevDigitImg
   put "pt-" & field "in" into tNewDigitImage
   
   // Check that tPrevDigitImg & tNewDigitImage 
   // (the two images that will be cross-faded) exist.

   if there is not an image tNewDigitImage \
         of group tDigitPozGp of group "gpDigits" \
         of group "gpPointsAndAlldone2" then
      answer "no tNewDigitImage"
   else
      answer "there is a tNewDigitImage"
   end if
   if there is not an image tPrevDigitImg \
         of group tDigitPozGp of group "gpDigits" \
         of group "gpPointsAndAlldone2" then
      answer "no tPrevDigitImg"
   else
      answer "there is a tPrevDigitImg"
   end if
   

  // The two images exist and AE is running,
  // so do the fade.

   aeCrossFade \
         the long ID of image tNewDigitImage \
         of group tDigitPozGp of group "gpDigits" \
         of group "gpPointsAndAlldone2", \
         the long ID of image tPrevDigitImg \
         of group tDigitPozGp of group "gpDigits" \
         of group "gpPointsAndAlldone2", \
         200

   wait until the cpDigitFadeEffect of this card is false with messages

end mouseUp

on aeCrossFadeDone
   set the cpDigitFadeEffect of this card to false
end aeCrossFadeDone

At first I thought the problem might be references to image objects, which happen to be embedded in groups withing groups (withing groups!). Which is why the script includes "if there is" twice.

There are other AE functions in the same stack (aeChangeRect and aeFadeOut), and these work no problem.

Any ideas?

Thank you.

--
Nicolas Cueto

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Location: Ostenfeld germany
Contact:

Re: aeCrossFade problem

Post by malte » Fri Jul 22, 2011 7:56 pm

Hi Nicolas,

nothing I do in AE should crash the engine!!! It is all scripted, so if it crashes there is a problem that sits at engine level and should be reported as quickly as possible to runrev, best providing an example stack that shows the problem.

If you could send me the stack that crashes and also CC it to support at runrev that would be awesome.

Sorry I can not help here,

Malte

Post Reply

Return to “Animation Engine”