On Sun, Jan 06, 2008 at 08:35:12PM -0900, larry talley wrote:
> I feel like the "image" object should have some method to replace the
> current image with something different... but I don't know how to
> investigate the methods available on the image object.
Certainly, yes, it should and it does. The method is `path=`.
@image.path = "static/new-image.png"
I have done many rollovers in the new Hackety Hack and I can report
that it works with full confidence.
My code looks like this:
def rollover name
img = image "static/menu-#{name}-off.png", :click => "/#{name}", :margin =>
10
img.hover { img.path = "static/menu-#{name}-on.png" }
img.leave { img.path = "static/menu-#{name}-off.png" }
end
You can also use the `methods` method to investiage an object.
para @image.methods
_why