Page 1 of 2
Help with Splash Screen
Posted: Sat May 31, 2014 4:56 pm
by dazza the stag
Looking at the various forums and on line there seems to be a couple of ways that I could create a splash screen, i.e. just a simple screen that will appear for around 5 seconds when the stack is opened.
I decided to go along the route of creating a card which is Number 1 and called it Splash1, In the Stack Script I have
on openstack
go to card "Splash1"
end openstack
on preOpenStack
mobileSetKeyboardType "decimal"
set the fullscreenmode of me to "exactFit"
end preOpenStack
on keydown k
if k is in "0123456789" then pass keydown
if k is "." then pass keyDown
end keydown
and then on the card Splash1 I have
on openstack
wait 5 seconds
go to "Main Menu"
end openstack
The odd thing is that when the app starts it clearly waits the 5 seconds but instead of showing the card Splash1 it just shows a black screen. After which it then moves onto the Splash Screen permanently, I guess that this is because the Splash1 card is the first in the list.
But why does it show a Black screen and not the actual Splash1 card ?
Re: Help with Splash Screen
Posted: Sat May 31, 2014 5:05 pm
by Klaus
Hi Dazza,
no idea what i going on there, but here some useful hints:
Code: Select all
##on openstack
##go to card "Splash1"
##end openstack
this is not neccessary at all, since, if not scripted otherwise, the first card is ALWAYS displayed first
Save a line:
Code: Select all
on keydown k
if k is in "0123456789." then pass keydown
end keydown
Code: Select all
on openstack
wait 5 seconds
## WHAT is "Main menu"? A card or a stack?
## You need to tell Livecode! cd = abbrev. for card
go cd "Main Menu"
end openstack
Best
Klaus
Re: Help with Splash Screen
Posted: Sat May 31, 2014 5:09 pm
by richmond62
I have a splash screen (admittedly for Mac, Windows and Linux; not building for mobile machines) and it works like this:
I have an image on the first card of my stack; let's call it "SPLOSH", and this code in the openCard script of card number 1
on openCard
set the vis of img "SPLOSH" to true
wait 5 seconds
set the vis of img "SPLOSH" to false
end openCard
I would be grateful if you could give that "a whirl" and let
me know if you end up with a black screen.
Re: Help with Splash Screen
Posted: Sat May 31, 2014 5:19 pm
by [-hh]
Klaus,
- NEW TOPSCORE .... 6000
Flowers for you !
flowers4Klaus.jpg
Re: Help with Splash Screen
Posted: Sat May 31, 2014 5:47 pm
by Klaus
Oh, thank you

Re: Help with Splash Screen
Posted: Sat May 31, 2014 5:50 pm
by Klaus
Hi Dazza,
completely overlooked this one:
This:
dazza the stag wrote:...
and then on the card Splash1 I have
on openstack
wait 5 seconds
go cd "Main Menu"
end openstack
should be:
Code: Select all
on openCARD
wait 5 seconds
go cd "Main Menu"
end openCARD
Best
Klaus
Re: Help with Splash Screen
Posted: Sat May 31, 2014 6:15 pm
by dazza the stag
richmond62 wrote:I have a splash screen (admittedly for Mac, Windows and Linux; not building for mobile machines) and it works like this:
I have an image on the first card of my stack; let's call it "SPLOSH", and this code in the openCard script of card number 1
on openCard
set the vis of img "SPLOSH" to true
wait 5 seconds
set the vis of img "SPLOSH" to false
end openCard
I would be grateful if you could give that "a whirl" and let
me know if you end up with a black screen.
Thanks
This is what I did the new card being card id 1282 and I used Klaus new bouquet of flowers and named the file Splosh
Is that correct ?
Re: Help with Splash Screen
Posted: Sat May 31, 2014 6:41 pm
by Klaus
When it works, then it is correct!

Re: Help with Splash Screen
Posted: Sat May 31, 2014 6:52 pm
by dazza the stag
Klaus wrote:When it works, then it is correct!

Lol - but it doesn't quite, yes I do get that screen up with the flowers on but i was expecting it to move to the next card after 5 seconds but it doesn't it just remains on that card. I have tried adding the line
Go to card "Main Menu"
both before and after the end Opencard command but that doesn't seem to do anything
And the reason I asked was what I had done correct was that surely by putting that photo onto card 1 it was going to show anyway as you mentioned earlier - so I couldn't see the relevance of "set the vis of ing" etc, I therefore wanst sure that i had followed the instructions properly
Sorry for being such a newbie but I seemed to be doing really well and then decided to add what seemed to be a really simple splash screen and the whole thing has gone pear shaped ! lol
Re: Help with Splash Screen
Posted: Sat May 31, 2014 10:17 pm
by dazza the stag
Here is an update on the issue after several more hours of "playing"
I added
on openCard
set the vis of img "Splosh.jpg" to true
wait 5 seconds
set the vis of img "Splosh.jpg" to false
Go to card "Main Menu"
end open card
to the first card. If I double click on the first card in the application Browser it does as I would expect, I have also added a button onto another card that takes me to this same initial card so that I can see how it performs getting to it from a different method and that works ok too.
However when i run it through the iPhone simulator I get the black screen again instead of viewing the lovely flowers. Using the button i created on another card in the same stack to take me to that card again works fine though the simulator.
So any other ideas on why I am getting this black screen instead of the flowers ?
I do seem to have solved the issue of moving on to the next card though - thank you
Re: Help with Splash Screen
Posted: Sat May 31, 2014 10:28 pm
by Simon
Is "Splosh.jpg" on cd 1?
From the other card with the button "go to cd 1" should show you the flowers, if not then something is wrong.
Simon
Re: Help with Splash Screen
Posted: Sat May 31, 2014 10:34 pm
by dazza the stag
Simon wrote:Is "Splosh.jpg" on cd 1?
From the other card with the button "go to cd 1" should show you the flowers, if not then something is wrong.
Simon
Simon - thanks - yes i believe that it is all like you say - I have attached a screenshot just in case i am misunderstanding you.
As i said the button works to take me to that card it is just when i open the app in the simulator it doesn't appear properly at the beginning - as a splash card
Re: Help with Splash Screen
Posted: Sat May 31, 2014 11:18 pm
by Simon
.Hi,
Ok this has gone on long enough for a simple splash screen.
First check that your stack scripts don't point you to cd Splash1 or anything else.
Then post your stack.
Simon
Re: Help with Splash Screen
Posted: Sat May 31, 2014 11:33 pm
by dazza the stag
Simon wrote:.Hi,
Ok this has gone on long enough for a simple splash screen.
First check that your stack scripts don't point you to cd Splash1 or anything else.
Then post your stack.
Simon
Sorry Simon
I have deleted any test cards just to ensure they were not messing anything up and there is nothing on the stack
Just tried to attach the zipped file and it says its too big - not my day ! it says max file size is 256kb
Re: Help with Splash Screen
Posted: Sun Jun 01, 2014 1:34 am
by Simon
Make a copy and start deleting cards until it's small enough to post and still shows the error.
Simon