Standalone card problem

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
Peacfulrvr
Posts: 34
Joined: Mon Nov 03, 2014 7:11 pm

Standalone card problem

Post by Peacfulrvr » Sun Nov 23, 2014 9:32 pm

I finished a rough draft of my program and saved it as a standalone. I have two problems.

1. on the intro screen I move a image around the screen. If the user pushes an arrowkey it freezes the game.
2. When in the game if you lose you are taken to the final slide in the stack and it is the end of the game. But if you push an arrowkey you can switch to other cards in the stack.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10332
Joined: Wed May 06, 2009 2:28 pm

Re: Standalone card problem

Post by dunbarx » Sun Nov 23, 2014 10:09 pm

Hi.

For the second thing, the arrow keys do navigate if no control is in focus. You can trap the message in the card script if you want to stop that.

For the first, does this happen in the IDE as well, or only in the standalone?

Craig Newman

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Standalone card problem

Post by Klaus » Sun Nov 23, 2014 11:07 pm

Hi Peacfulrvr,

yep, I've been bitten by this feature before, too :D
Add this to your "openstack" handler:

Code: Select all

on openstack
  set the navigationarrows to false
  ## other opestack stuff here...
end openstack
This will prevent unwanted navigation between cards and stacks!

Best

Klaus

Peacfulrvr
Posts: 34
Joined: Mon Nov 03, 2014 7:11 pm

Re: Standalone card problem

Post by Peacfulrvr » Sun Nov 23, 2014 11:25 pm

Thanks Klaus, I think that solved the navigation midgame. I just noticed that this fixed both problems...
Last edited by Peacfulrvr on Mon Nov 24, 2014 12:28 am, edited 1 time in total.

Peacfulrvr
Posts: 34
Joined: Mon Nov 03, 2014 7:11 pm

Re: Standalone card problem

Post by Peacfulrvr » Sun Nov 23, 2014 11:29 pm

1. on the intro screen I move a image around the screen. If the user pushes an arrowkey it freezes the game.

Dunbarx it also happens in the IDE I need to accept the first key pressed and ignore subsequent ones pressed.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10332
Joined: Wed May 06, 2009 2:28 pm

Re: Standalone card problem

Post by dunbarx » Mon Nov 24, 2014 2:18 am

Hi.

If both problems were solved, how could the screen still be freezing?

Or is it just a separate issue that you want to pass only the first keypress? And if so, any keypress? In any case, this is all doable.

Craig

Post Reply