Page 1 of 1

First card with visual effect not accessible (SOLVED)

Posted: Tue Sep 02, 2014 8:21 pm
by Tukcedo
Coders, here's another peculiar thing I noticed: I'm trying to create some sort of a splash screen by placing an image on the first card using the same background as the rest and then jump to the next card after a set delay using visual effect:

Code: Select all

on openCard
   visual effect dissolve
   wait 3 seconds
   go to card "MainMenu"
end openCard
1. in the IDE (Ubuntu 14.04 using LCC 6.6.2) this works beautifully BUT even in edit mode the visual effect is activated and there's no way I can edit the card script anymore, it always goes to that next card. How do I now edit this first card's script?

2. On Android the 1st card is presented at only 1/4th of the screen in the top left. The visual effect does happen but only in this much smaller than expected card (it's shown complete, just much smaller). When the visual effect terminates the next card is displayed in the expected size (full screen exactFit as specified in the stack script).

Ideas anyone?

Re: First card ("splash") with visual effect not accessible

Posted: Tue Sep 02, 2014 8:38 pm
by Klaus
Oops, wrong syntax actually :D

Code: Select all

on openCard
   wait 3 seconds
   lock screen for visual effect
   go card "MainMenu"
   unlock screen with visual dissolve
end openCard

Re: First card ("splash") with visual effect not accessible

Posted: Tue Sep 02, 2014 8:40 pm
by Tukcedo
OK fair enough, now how to get at the code? ;-)

Re: First card ("splash") with visual effect not accessible

Posted: Tue Sep 02, 2014 8:50 pm
by Tukcedo
Got it!! Just disable "messages" from the top menu does the trick ... Thanks for the suggestion Klaus, just about to try that.

Re: First card ("splash") with visual effect not accessible

Posted: Tue Sep 02, 2014 9:02 pm
by Tukcedo
Hmmm unfortunately same thing: 1/4 size first card with the right effect, just wrong size.

I tested a little and it appears that e.g. "iris close" does exactly the same thing. When I use it on the 2nd card to jump to the 3rd, it works well. It appears as if it's the first card (i.e. the opening of the stack?) that is the problem.

Re: First card ("splash") with visual effect not accessible

Posted: Tue Sep 02, 2014 9:05 pm
by Klaus
Try this approach:

Code: Select all

on openCard
   send "go2next" to me in 3 secs
end openCard

command go2next
   lock screen for visual effect
   go card "MainMenu"
   unlock screen with visual dissolve
end go2next

Re: First card ("splash") with visual effect not accessible

Posted: Tue Sep 02, 2014 9:11 pm
by Tukcedo
Klaus, you are a gem!! That works ...

Still wondering how that makes bringing up that first card any different, but using "send" is a cunning trick indeed :D

Re: First card ("splash") with visual effect not accessible

Posted: Wed Sep 03, 2014 12:50 pm
by Klaus
Dag Michel,
Tukcedo wrote:Klaus, you are a gem!
I hear that very often... :D
Tukcedo wrote:Still wondering how that makes bringing up that first card any different, but using "send" is a cunning trick indeed :D
I also don't know exactly what happens here, but I think this has to do with the way LC loads its libraries etc... when the stack starts.
Obviously not everything is available yet "on pre-/openstack" and "pre-/opecard" so this trick is only neccessary for the first card of a mainstack :D


Groetjes

Klaus

Re: First card ("splash") with visual effect not accessible

Posted: Wed Sep 03, 2014 1:27 pm
by Tukcedo
Vielen Dank Klaus! ;-)

Yes, the startup obviously has to do with it. Anyway I learned about something nice and practical about "send" in the process :-)

How can I add "Solved" to the title?

Wiederschauen!

Mich.

Re: First card with visual effect not accessible (SOLVED)

Posted: Wed Sep 03, 2014 1:45 pm
by Klaus
Dag Michel,

I did it :D


Best

Klaus