on mouseUp
put the loc of btn "mover" into startloc
repeat until intersect (btn "mover", btn "theTarget") = "true"
get the loc of btn "mover"
set the loc of btn "mover" to (item 1 of it + 1) & "," & (item 2 of it)
-- adding 1 to this item 2 makes it move diagonally EG (item 2 of it +1)
wait 0.25
end repeat
set the loc of btn "mover" to startloc
end mouseUp
This script I culled from a tutorial by Dave from 2012 when I was looking up about two objects colliding instead of passing through each other, I understand the tutorial he gives except for this one point here below:
As you can see the intersect here is actually a function, but the problem here is that when I click on the word in the IDE the documentation brings it up as a Command.
thankyou
chris
Intersect
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Intersect
Good catch Chris.
Try looking up "intersect" in the dictionary, use the dictionary search box not the pop-up from the documentation tab.
Intersect is a keyword, command and function. You are using it as a function.
You can study the command and keyword types.
Simon
Try looking up "intersect" in the dictionary, use the dictionary search box not the pop-up from the documentation tab.
Intersect is a keyword, command and function. You are using it as a function.
You can study the command and keyword types.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Intersect
wow, you mean I actually did something right?
Re: Intersect
I am afraid that this sort of thing will happen more and more often.wow, you mean I actually did something right?
But to Simon's point, it is very instructive to read about this single word and how it manifests itself in three ways. You will soon become more familiar, and more comfortable, with the nuances of the language. In English, one of the most powerful aspects of its syntax is that a word may be a noun, a verb or an adjective. This give enormous power and flexibility, once you know it.
When you have the opportunity, and I might suggest it when it comes up, you simply must write a handler that uses a custom command, and then rewrite that very thing as a function. Then you will no longer be a newbie.
Craig