Page 1 of 1

StartUp Animation

Posted: Fri Nov 29, 2013 6:36 pm
by chelling
I am trying to add a simple animation when an app starts up. The card is visible only after the animated controls are in place. I even added two "dummy cards" in front of it to try to give it enough time to finish the animation sequence. On the second dummy card the controls are positioned:

set the loc of image "image1" of card "startScreenAction" to 512,2000
set the visible of image "image2" of card startScreenAction to false

on the next card, this is the script:

on openCard
wait 20 with messages
move image "image1" to the loc of grc "startRect" in 120
showImage2
end openCard

on showImage2
lock screen for visual effect
if there is an image "image2" then show image "image2"
unlock screen with visual effect "dissolve"
wait 20 with messages
if the environment is "mobile" then mobileClearTouches
go to card "menuCard"
end showImage2

If I comment the "go to card "menuCard" it still has the controls in place before the card is shown (the animations are done). The acceleratedRendering of the stack is true. This is happening both in the simulator and on an iOS device.

It is perfect in the LiveCode IDE. I am using 6.5.

This is frustrating because it's the first time I haven't been able to do this. Does anyone have suggestions for a workaround?

Re: StartUp Animation

Posted: Fri Nov 29, 2013 6:55 pm
by Mark
Hi,

Thre's a small problem with openCard running before the card is rendered. Try this:

Code: Select all

on openCard
  send "startAnimation" to me in 0 millisecs"
end openCard

on startAnimation
  move image "image1" to the loc of grc "startRect" in 120
  showImage2
end startAnimation
Kind regards,

Mark

Re: StartUp Animation

Posted: Fri Nov 29, 2013 8:22 pm
by chelling
That did it. Thanks Mark!