Showing/Hiding Images on mouseLeave...

Igor de Oliveira Couto info at pixelmedia.com.au
Wed Nov 13 23:55:00 EST 2002


Dear Terry,

Thank you for your reply! - and suggestions:

> How about using a referenced image control and change the fileName of 
> the image to reflect the different states? I tried several approaches 
> using separate object and like you couldn't get any of them to work 
> satisfactorily (although I was using  buttons rather than images for 
> testing). Placing the mouseLeave handler in the 'idle' object and 
> sending a message to it from the 'over' object worked inconsistently. 
> The other approach I tried was to group the objects and place all the 
> handlers in the group's script - seemed to work as intended for a few 
> mouseEnters and mouseLeaves but then descended into some sort of 
> hyperactive state switching that eventually locked out (temporarily) 
> any mouse activity (command "." seemed to do the trick).
>

Hmmm, that doesn't sound very good... This really is starting to sound 
like a bug, isn't it?

About your suggestion: the images must be saved inside the stack, so 
that the stack can later be saved as a 'self-contained' document - that 
does not need to access any external data. Therefore, using 'fileName' 
is a no-no...

I have now also tried several different things:

a) first I thought it might be because my images were '.png', so I 
re-exported them as '.gif', but obtained the same result (just with 
less levels of transparency! :-P)

b) then I thought it might be the order in which I was showing one 
image and hiding the other, so I tried several permutations, but that 
had no effect either

c) I then thought that maybe the 'over' image HAD to receive a 
'mouseEnter' in order to be able to get a 'mouseLeave', so I tried 
sending a 'mouseEnter' from inside the 'idle' image, as soon as the 
'over' image was shown, but still... no difference...

Perhaps this really is a bug?... What are other people's experiences? 
Are we overlooking something basic? Are we going about it the wrong way?

Any suggestions are immensely appreciated!

Kind Regards,
--
Igor de Oliveira Couto
----------------------------------
info at pixelmedia.com.au
----------------------------------




More information about the use-livecode mailing list