zoom image effect?
Klaus Major
klaus at major-k.de
Wed Jun 22 05:46:44 EDT 2005
Konichi-wa Nicolas-san,
> Hello List,
>
> I'm not sure if the zoom-like visual effect I'm after
> is easily done but, here goes.
>
> Basically, when a user enters an image with the mouse,
> that image will get larger, preferably gradually rather
> than instantly. And once the user exits the image, it'll
> return to its original size (again gradually).
>
> Also if possible, when an image object happens to be
> near the edge of the stack, the zoom effect will be
> cotained within the stack's edges.
>
> Of course, the resizing could be done by readjusting the
> width and height, and the "gradual" effect with a repeat
> loop. But I've no idea how to script the "within stack
> boundaries" limitation.
>
> (I guess I'm also hoping in part that there already exists a
> built-in command in Rev for this effect.)
>
> As always, thank you in advance.
What about this?
You could group the image, so the image will always stay (and be
visible only!)
within the rect of the group (lockloc!)
And you might use a setprop-handler to "trigger" the zoom-in/-out of
the image.
Like this in the image script:
on mouseenter
set the must_zoom of me to "in"
end mouseenter
on mouseleave
set the must_zoom of me to "out"
end mouseleave
setprop must_zoom what
if what = "in" then
## do your zoom-in routine here...
else
### do your zoom-out routine here
end if
end setprop
Simple, clean and elegant :-)
> Nicolas Cueto
Regards
Klaus Major
klaus at major-k.de
http://www.major-k.de
More information about the use-livecode
mailing list