[REBOL] Re: Rollover effect
From: greggirwin:mindspring at: 19-Jun-2002 14:43
Hi Abdel,
<< I wrote these line to have a rollover effect, when the mouse is over a
button an image is suppose to switch its content:
...
instead the image disapear, what I am doing wrong? >>
You need to LOAD the image when you change it. Layout does it for you when
you specify the url originally, but not when you change it. If you don't
load it, you're assigning the url to city/image.
city-rio: http://www.struhscompany.com/tmp/rio.jpg
city-paris: http://www.struhscompany.com/tmp/paris.jpg
view layout [
city: image city-rio
button "Rio" feel [
over: func [face act pos] [
face/text: either act ["Paris"]["Rio"]
city/image: load either act [ city-paris ][ city-rio ]
show city
show face
]
]
]
--Gregg