magic settings for rollovers?

Cubist at aol.com Cubist at aol.com
Wed Aug 24 17:59:23 EDT 2005


sez ambassador at fourthworld.com:
>Chris Sheffield wrote:
>> I think it's a bug, and it seems to be worse if your buttons are in 
>> groups.  Is that the case by chance?  I remember running into the issue
>> a while back, and I think it's in Bugzilla, but to be honest I'm not
>> entirely sure.  We finally just gave up on having a rollover on our
>> buttons because I couldn't find any way around it.
>Hmmmm.  Not the answer I wanted to hear, since I need these buttons to
>be in groups.
>Anyone else have a magic recipe for reliable rollovers?
   Maybe. It's a bit brute-force-ish, but if it does what you want...

local ListOfControls, ListOfNeutralIcons, ListOfRolloverIcons

on CheckIcons
  put the mouseLoc into ML
  put 0 into Kounter
  repeat for each item II in ListOfControls
    add 1 to Kounter
    put item Kounter of ListOfNeutralIcons into DisNeutral
    put item Kounter of ListOfRolloverIcons into DisRollover
    if ML is within the rect of control II then
      if the icon of control II <> (item Kounter of ListOfRollovers) then
        set the icon of control II to DisRollover
      else
        set the icon of control II to DisNeutral
      end if
    end if
  end repeat
  send "CheckIcons" to me in 100 milliseconds
end CheckIcons

   Hope this helps...



More information about the use-livecode mailing list