This should be simple

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
stjones
Posts: 13
Joined: Fri Dec 12, 2014 3:52 am

This should be simple

Post by stjones » Fri Dec 12, 2014 4:03 am

Very new to LiveCode here but have done a lot with HyperCard and SuoerCard, but it's been a while. Trying something that should be very simple. I have a stack (for iPhone 6). There are two cards: "splash" and "main_menu". I want the stack to launch, show the first card "splash" for 3 seconds and then go to card "main_menu". I have tried this script at both the stack and card levels:

Code: Select all

on openstack --  (or on opencard at the card level)
   wait 5 seconds
go to card "main_menu"
end openstack -- (or end opencard at the card level)
Both ways the stack opens in the iOS Simulator, the "app" zooms open, the screen stays black for a few seconds, and then the SECOND card (main_menu) appears. I never see the first "splash" card. I have a test button on the "main_menu" card that simply takes me back to the first card. That button works fine - I can see the card "splash" then just fine. This should be ridiculously simple. What am I doing worng?
Last edited by stjones on Fri Dec 12, 2014 4:22 am, edited 1 time in total.

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: This should be simple

Post by sefrojones » Fri Dec 12, 2014 4:21 am

For what it's worth, this script works as expected when deployed to android from LC 6.7. So the script theoretically should work the same way for iOS. Posting which OS version and LiveCode version you are using may be helpful as well...

stjones
Posts: 13
Joined: Fri Dec 12, 2014 3:52 am

Re: This should be simple

Post by stjones » Fri Dec 12, 2014 4:23 am

LiveCode Community Edition 7.0.0, Build 10018

iOS Simulator running as iPhone 6 and iOS 8.1

sefrojones
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 447
Joined: Mon Jan 23, 2012 12:46 pm

Re: This should be simple

Post by sefrojones » Fri Dec 12, 2014 4:29 am

Unless you *need* the new features included in LC 7(mainly unicode related), I'd say it might be worth a shot to download LC 6.7 and see if it works from that version.

http://downloads.livecode.com/livecode/

If that doesn't work, I'm sure someone else will be of more assistance.

Good Luck,

--Sefro

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am
Location: Bordeaux, France

Re: This should be simple

Post by Dixie » Fri Dec 12, 2014 10:22 am

Make a stack with two cards... call them 'Splash' and 'Main..
In the card script of card 'Splash'...

Code: Select all

on opencard
   send "goMain" to this stack in 5 seconds
end opencard
In the script of the stack...

Code: Select all

on goMain
   go card "main"
end goMain
This works for me LC 7.0, iOS 8.1
Attachments
splashtest.livecode.zip
(1.74 KiB) Downloaded 156 times

stjones
Posts: 13
Joined: Fri Dec 12, 2014 3:52 am

Re: This should be simple

Post by stjones » Sat Dec 13, 2014 12:18 am

Thanks! That worked. Not sure why the original method didn't. I think it should have.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”