[30 Mar 2010] Bug in MoveAnim/PlayAnim
Posted: Sat Jun 13, 2020 5:32 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 30 Mar 2010 05:55:02 -0000
Hm. My last email seems not to have reached this list. So, one more try.
The following Code does some weird thing.First, the GIF-anim is correctly moved, but then after a short distence, the TextOut-Layer jumps to the position where the gif-anim is, and then is moved instead to the gif-anim.
if i comment the line:
the GIF-anim movement works correctly, although, "animHandle" isn't used at all in the example below.
Actually, what i tried to do (or tried to learn how to do it) is, to permanently have a GIF-Anim running which i then move from one position to another (not yet known) position as soon as some certain event occurs.
Let me know, how you would do that
(PS: Meanwhile, i've found the NextFrame()-function in the Layers section, which is quiet handy for this job, although I would have expected to find it in the animation section
)
regards, Tom
Hm. My last email seems not to have reached this list. So, one more try.
The following Code does some weird thing.First, the GIF-anim is correctly moved, but then after a short distence, the TextOut-Layer jumps to the position where the gif-anim is, and then is moved instead to the gif-anim.
if i comment the line:
Code: Select all
Local animHandle = PlayAnim(id,100,100,{times=0,Async=True})
Actually, what i tried to do (or tried to learn how to do it) is, to permanently have a GIF-Anim running which i then move from one position to another (not yet known) position as soon as some certain event occurs.
Let me know, how you would do that
regards, Tom
Code: Select all
Function p_play2(msg)
If (AsyncDrawFrame(msg.userdata.handle))
ClearInterval(msg.userdata.intid)
EndIf
EndFunction
TextOut(200, 200, "some text", {name="sometext"})
Local path = FullPath(#DEFPICSDIR, "some.gif")
Local id = LoadAnim(nil,path,{Transparency=#WHITE})
Local animHandle = PlayAnim(id,100,100,{times=0,Async=True})
Local moveHandle = MoveAnim(id,100,100,500,400,{Async=True})
SetInterval(1,p_play2,40,{handle=moveHandle,intid=1})
Repeat
WaitEvent
Forever