Hello! I'm currently using libavg for creating a kind of enhanced slideshow, without interactivity. Now one thing I'm struggling with is the callback based approach of libavg. This is of course very valuable when creating interactive applications, where several things can run simultaneously. When creating an animation sequence, this adds some kind of overhead.
Let's say I want to create a simple photo slideshow that has a crossfade
of two images and shows each image for a given time. Therefore, I
created some custom functions that use libavg's API internally. Now I'd
like to be able to do something like this:
fadeIn(image1)
hold(dur=5000)
crossfade(image1, image2, dur=2000)
hold(dur=5000)
But since all animations are non-blocking, I have to do something like
this:
def step1():
fadeIn(image1, onStop=step2)
def step2():
hold(dur=5000, onStop=step3)
def step3():
crossfade(image1, image2, dur=2000, onStop=step4)
def step4():
hold(dur=5000)
Now this is of course much less convenient. So have I totally overseen
something, is there an easier way to create sequential animations with
libavg? I thought about at least using time.sleep() instead of
avg.Player.setTimeout() to get a blocking hold function, but I have the
impression that time.sleep() is much less exact than using libavg's
infrastructure.
If anyone has suggestions to make this kind of work easier, I'd be very
glad.
Thanks,
Frederik
--
Frederik Elwert, M.A.
Research Assistant
Centre for Religious Studies
Ruhr-University Bochum
Universitätsstr. 150
D-44780 Bochum
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ libavg-users mailing list [email protected] https://mail.datenhain.de/mailman/listinfo/libavg-users
