animate light to dark
Michael J. Lew
michaell at unimelb.edu.au
Tue Sep 13 22:12:42 EDT 2005
Dear all,
I am trying to get a smooth animation of a background going from
light to dark (and vice versa), but I'm having trouble making it fast
enough, smooth enough and flicker-free. I think it is something to do
with screen redraws in OS X (see Jim Hurley's BZ entry 2639), but
maybe it's more general.
What I need is to have a large dark region behind some images get
light over about half a second so that the transition doesn't look
too amateurish. I also need to be able to respond to messages while
the change in darkness is occurring. I've tried playing with fill
colors of buttons and fields and with blendlevels of an image. I also
tried the straightforward approach of simply stacking a sequence of
buttons with different fill colors and hiding or showing them in
sequence. For every approach I've tried the transitions are good
enough with small areas, but when the objects are made large enough
for my purposes they are slow and yukky.
I've tried fiddling with unlock screen commands and with wait
commands, and while they are necessary for intermediate stages to be
visible, they don't fix the problems. Does anyone have a suggestion
that might help?
I've experimented with timing screen redraws and found that when only
a small area is changed they occur almost instantly, but when a large
area is changed they take much longer (I don't want to say how long
because it will make me want a new Mac ;-) Does it seem strange that
the time needed for a screen redraw scales with the area of the
control that has changed its appearance? I would have thought a
redraw would be a redraw of the whole screen and so it wouldn't make
any difference whether the alteration was of a small area or large.
Thanks for any help.
Michael
--
Michael J. Lew
Senior Lecturer
Department of Pharmacology
The University of Melbourne
Parkville 3010
Victoria
Australia
Phone +613 8344 8304
**
New email address: michaell at unimelb.edu.au
**
More information about the use-livecode
mailing list