StartUp Animation

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
chelling
Posts: 100
Joined: Tue Mar 06, 2007 3:14 am

StartUp Animation

Post by chelling » Fri Nov 29, 2013 6:36 pm

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?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: StartUp Animation

Post by Mark » Fri Nov 29, 2013 6:55 pm

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
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

chelling
Posts: 100
Joined: Tue Mar 06, 2007 3:14 am

Re: StartUp Animation

Post by chelling » Fri Nov 29, 2013 8:22 pm

That did it. Thanks Mark!

Post Reply