Re: Playing an image sequence in reverse
Status: Alpha
Brought to you by:
cwalther
From: Urs H. <ur...@an...> - 2009-09-30 14:36:17
|
James Wilson wrote: > However, I still got the same output when I used this, Pipmak tried to > find "an_anim_-1" and so on. pipmak.schedule runs the function you give it as an argument after the given time. So, what is run again and again is only the function() below, not the whole code of onmousedown of the hotspot. So the if..then I gave you in my previous post has to be placed in the function() below: > pipmak.schedule( > 0.04, > function() > animpos = math.mod(animpos - 1, 100) > an_linkingBook:setimage ("an_linkingBook/an_linkingBook_" .. animpos .. > ".jpg") return 0.04 > end > ) Just change this to pipmak.schedule( 0.04, function() if animpos < 0 then animpos = 100 end an_linkingBook:setimage ("an_linkingBook/an_linkingBook_" .. animpos ..".jpg") return 0.04 end ) or similar. Now it loops automatically. I hope this is what you want. Then you also don't need the if..then..else in the onmousedown function. Greetings Urs |