the grabbedObject?

Mark Swindell mdswindell at cruzio.com
Mon Dec 22 12:33:30 EST 2008


Eric, Richmond,

Merci.  Custom properties are indeed one of the handiest features of  
Rev.  (The grabbedObject ought to be a revProp, I think, but oh well.)

Unfortunately it appears that mouseEnter messages do not fire while an  
object is being dragged?  Using the scenario you propose (essentially  
what I wanted to do) I get no textColor change until I drop the  
object, leave the field, and then mouse back in.  Does "grab" stop  
certain messages from being passed? (Message watcher would indicate  
that it does.)

On the other hand, Richmonds solution works (mouseMove fires) but this  
is being sent constantly while the letter is being grabbed/dragged  
around, whereas it would seem simpler to set the color upon entrance  
to a new field and be done with it.

Thanks,
Mark

On Dec 22, 2008, at 1:45 AM, Eric Chatonet wrote:

> 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: http://www.sosmartsoftware.com/
> Email: eric.chatonet at sosmartsoftware.com/
> ----------------------------------------------------------------
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list