« Return to Thread: objects in loc

Re: objects in loc

by Eric Chatonet :: Rate this Message:

Reply to Author | View in Thread

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@.../
----------------------------------------------------------------


_______________________________________________
use-revolution mailing list
use-revolution@...
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

 « Return to Thread: objects in loc

LightInTheBox - Buy quality products at wholesale price