the grabbedObject?

Eric Chatonet eric.chatonet at
Mon Dec 22 04:45:16 EST 2008

Bonjour Mark,

Actually, I think you wrote the answer to your question already :-)

on mouseDown -- in the button's script
   set the GrabbedObject of this cd to the long ID of me
   grab me
end mouseDown
on mouseEnter -- in a field's script
   set the backColor of (the GrabbedObject of this cd) to <color>
   set the opaque of (the GrabbedObject of this cd) to true
end mouseEnter
on mouseLeave
   set the opaque of (the GrabbedObject of this cd) to false
end mouseLeave

Custom properties are really useful ;-)

Le 22 déc. 08 à 06:36, Mark Swindell a écrit :

> I've got a transparent button.  I'm grabbing it.  When the button  
> goes over a white field I want its color to change to black, when  
> it moves over a green field I want it to change to yellow.
> Is there a way to refer to such an object from within a script so that
> on mouseEnter
> set the textColor of the grabbedObject to "yellow"
> end mouseEnter
> Currently I have it change color on mouseUp based on whether the  
> loc of "me" (the grabbedButton) is within the rect of field "white"  
> or field "yellow" but it's not what I want.

Best regards from Paris,
Eric Chatonet.
Plugins and tutorials for Revolution:
Email: eric.chatonet at

More information about the Use-livecode mailing list