[REBOL] Re: Rollover effect
From: nitsch-lists:netcologne at: 19-Jun-2002 22:53
Hi Abdel,
Am Mittwoch, 19. Juni 2002 21:54 schrieb Abdel Belkasri:
> This should be easy for you guys!
>
> I wrote these line to have a rollover effect, when the mouse is over a
> button an image is suppose to switch its content:
>
> 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: either act [ city-paris ][ city-paris ]
> show city
> show face
> ]
> ]
>
> ]
>
> instead the image disapear, what I am doing wrong?
>
city-rio: LOAD http://www.struhscompany.com/tmp/rio.jpg
city-paris: LOAD 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: either act [ city-paris ][ city-rio ]
show city
show face
]
]
]
layout loads image if you give an url.
but if you change a face/image like
city/image: either act [ city-paris ][ city-rio ]
by hand, you have to give an image.
> --Abdel.
-Volker