Clicking anywhere takes me to the mainstack.

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
Omar319
Posts: 14
Joined: Sun Apr 27, 2008 10:57 am

Clicking anywhere takes me to the mainstack.

Post by Omar319 » Wed Dec 31, 2008 12:32 pm

Hi,
I've created a stack made up of several cards, but clicking in a blank area or anywhere that is not a button or a link takes me back to the first card. I inported a video and this won't play. Clicking it only takes me to the home card.

Why does it do this and how do I stop it?

Thanks.
Omar

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Dec 31, 2008 12:37 pm

Hi Omar,

Apparently, you have a script somewhere, similar to

Code: Select all

on mouseUp
  go cd 1
end mouseUp
Where do you have this script?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Omar319
Posts: 14
Joined: Sun Apr 27, 2008 10:57 am

Post by Omar319 » Wed Dec 31, 2008 3:35 pm

Hi,
I have this sort of script for every button on each card. But When I click outside any button it takes me back. I've checked all of the card and stack scripts and there's nothing. I haven't made any.
There is one thing that might be causing it.
I have an image that I use as a banner, and that is a hyperlink to the first card. As it is grouped it appears on every card, but it shouldn't make the whole card a hyperlink should it?

Omar

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Dec 31, 2008 3:49 pm

Hi Omar,

Apparently, you accidentally edited the script of the group rather than the script of the image. The hcBehavior of the group is probably set to true. As a result, all card messages are also sent to that group before they arrive at stack level and when you click on the card, the group gets a mouseUp message, which executes its script.

You should be able to solve it by moving the group script to the script of the image object.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Omar319
Posts: 14
Joined: Sun Apr 27, 2008 10:57 am

Post by Omar319 » Fri Jan 02, 2009 6:19 pm

Hi thanks for replying.
Ungrouping the picture solved the problem, even though the banner disappeared from all slides it's easier to copy and paste them.

Thanks for your help,
Omar :)

Post Reply