splash screen

Klaus Major k_major at os.surf2000.de
Wed Mar 12 07:11:01 EST 2003


Bonjour Yves,

ca va bien?

> Hi,
>
>
> I'm in problems with a very simple question but find no way...
>
> I'd like a stack (main stack) with a splash screen
> then 1 substack in fact a substack with data i can save

Attention: a substack is part of another (main) stack and if you make a 
standalone
out of that stack, not only that mainstack cannot be saved but also all 
its substacks
can't!!!

So i am sure you mean a SEPARATE stack (file) :-)

> So I'd lik when I open the standalone that the splash screen comes on, 
> shows for 2 seconds then disappears and go to the substack "B"
>
> on this substack "B", there is a btn "Quit"
> when I hit the btn, the substack "B" save and close
> show once again the splash screen stack for 2 seconds and then quit
>
> I write a preopenstack handler in the splash screen stack to do the job
> but the splash screen comes again on the screen !!
>
> so can someone tell me how todefiitively  handle a splash screen and 
> the go automatically to a substack without having the splash screen on 
> the screen !
>
> thank you.
> -- 
> Greetings.
>
> Yves COPPE

try to use a global as a marker for the fact that the "splash" has 
already been opened
for the first time :-)

Like this:

Stack A ("El splasho", also know as "THE STANDALONE" ;-):

on openstack
    global onlyonce
    if onlyonce = true then
       wait 2 secs
       quit
    else
       wait 2 secs
       toplevel stack "B"
       close stack "A"
    end if
end openstack

Right after launching the app, the global "onlyonce" IS empty
and thus <> true, but the second time not... ;-)

##########################

Now the button "Quit" in stack "B":

on mouseup
    global onlyonce
    put true into onlyonce  ### !!! see above
    save this stack
    go stack "A"
    close stack "B"
end mouseup

Hope that helps.


Regards

Klaus Major
k_major at os.surf2000.de




More information about the use-livecode mailing list