How to create a barrier/wall for graphics

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
pmatthews
Posts: 1
Joined: Mon Apr 01, 2013 4:50 pm

How to create a barrier/wall for graphics

Post by pmatthews » Mon Apr 01, 2013 4:59 pm

I'm new to LiveCode, and I'm trying to make an app that will help me explore kids' counting. I've designed a basic program that allows kids to drag balls into a cardboard box. The thing is, currently, the program allows them to drag balls through the side of the box as though the walls don't matter. How can I turn all but the top of the box into something impenetrable so that the only way to get balls into the box is through the top (which is open)?

Randy Hengst
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 157
Joined: Thu Jun 29, 2006 4:16 pm

Re: How to create a barrier/wall for graphics

Post by Randy Hengst » Mon Apr 01, 2013 7:23 pm

Scott Rossi's Tutorials might help. Take a look at Drag Sampler.... http://www.tactilemedia.com/site_files/ ... rials.html

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

Re: How to create a barrier/wall for graphics

Post by dunbarx » Mon Apr 01, 2013 7:27 pm

Hi.

So much fun coming...

Go to the dictionary and look up "intersect". It is a function that will return a value if any portion of one object overlies another. So if you had a graphic made of lines, you could, using perhaps the "mouseMove" message, determine whether or not the objects you are dragging ever contact those lines. If they did, you simply self destruct the computer.

Do you know what the "rect" of an object is? Write back if you need more.

Craig Newman

Post Reply