General Intersect

Roger Guay irog at mac.com
Mon Aug 22 11:04:22 EDT 2005


Thanks to all who responded.  I was hoping that I wouldn't have to  
use a repeat loop as I do have a time-critical situation.  However  
your suggestion of storing IDs as custom properties will perhaps save  
the day.

Cheers, Roger


On Aug 22, 2005, at 4:30 AM, use-revolution-request at lists.runrev.com  
wrote:

> as saied before you would do this with a repeat structure.
>
> eg:
>
> repeat with i=1 to the number of buttons
>    if the short name of btn i="targetButton" then next repeat
>    if intersect(btn "targetButton", btn i) then
>      --do stuff
>    end if
> end repeat
>
> However, if it is a time critical script and you have many buttons to
> check, I suggest that you store the ID of all buttons you need to  
> check
> in a custom property and use repeat for each from there:
>
> Assuming you have stored the IDs in a customProperty called
> allButtonsToCheck, each ID on a seperate line:
>
> repeat for each line theButtonToCheck in the allButtonsToCheck of this
> card
>    if theButtonToCheck=the ID of button "targetButton" then next  
> repeat
>    if intersect(button "targetButton", button ID theButtonToCheck)  
> then
>      --do stuff
>    end if
> end repeat
>
> All the best,
>
> Malte




More information about the use-livecode mailing list