Re: Playing an image sequence in reverse
Status: Alpha
Brought to you by:
cwalther
|
From: James W. <jfc...@ya...> - 2009-10-01 05:36:57
|
Thanks, I think this last little problem is my fault:
I click on the hotspot and nothing happens. I think it's because I closed "hotspot" incorrectly. What do you think? Sorry to drag this out.
CODE************************
hotspot {
onmousedown = function()
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
)
end
}
END CODE********************
Thanks,
James
--- On Wed, 9/30/09, Urs Holzer <ur...@an...> wrote:
From: Urs Holzer <ur...@an...>
Subject: Re: Playing an image sequence in reverse
To: pip...@li...
Date: Wednesday, September 30, 2009, 9:33 AM
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
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Pipmak-Users mailing list
Pip...@li...
news://news.gmane.org/gmane.games.devel.pipmak.user
https://lists.sourceforge.net/lists/listinfo/pipmak-users
|