objects in loc
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Thu May 8 05:35:59 EDT 2008
Bonjour Serge,
Le 8 mai 08 à 11:06, serge BRAMI a écrit :
> I need a function whose name could be objectinloc returning from
> a specified loc the list of objects whose rect include this loc
The intersect Rev function can't help you in such a case but:
on mouseUp
local tRefLoc
-----
put "100,100" into tRefLoc -- or whatever: the mouseLoc, etc.
put objectInLoc(tRefLoc)
end mouseUp
---------------------------------------
function objectInLoc pLoc
local tControl,tControls
-----
repeat with i = 1 to the number of controls
if pLoc is within the rect of control i then
put the long name of control i & cr after tControls
end if
end repeat
delete last char of tControls
return tControls
end objectInLoc
You'll get a list of the long names of all controls in the current
card that match the condition.
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------
More information about the use-livecode
mailing list