Playing an image sequence in reverse
Status: Alpha
Brought to you by:
cwalther
From: James W. <jfc...@ya...> - 2009-09-11 17:49:10
|
Hi all, I'm trying to run a JPEG image sequence in reverse order, but am running into problems: Code: cubic { "dummy1024.png", "dummy.png","dummy.png", "dummy.png", "dummy.png", "dummy.png" } local anim = patch {face=1, x = 0, y = 0, image = "patches/anim_100.jpg" } local animpos = 100 hotspotmap "hotspotmap.png" hotspot { onmousedown = function() pipmak.schedule( 0.04, function() animpos = math.mod(animpos - 1, 101) anim:setimage ("patches/anim_" .. animpos .. ".jpg") return 0.04 end ) end } This playes it backward, but once it gets to frame "anim_0.jpg", it goes on to output continusly "Cannot find file "anim_-1.jpg" Cannot find file "anim_-2.jpg", and so on. How do I make it loop? Thanks, James |