Code: Select all
@REQUIRE "RapaGUI"
@REQUIRE "moviesetter"
@ANIM 1, "Pogo",{Loader = "moviesetter|inbuilt"}
@DISPLAY {Width = 320, Height = 200}
Function p_AnimFunc()
Local numframes = GetAttribute(#ANIM, 1, #ATTRNUMFRAMES)
curframe = Wrap(curframe +1 , 1, numframes +1)
DisplayAnimFrame(1,0,0,curframe)
EndFunction
Function p_EventFunc(msg)
Switch msg.Class
Case "Button":
Switch msg.Attribute
Case "Pressed":
Switch msg.ID
Case "play":
SetInterval(1,p_AnimFunc,50)
Case "stop":
ClearInterval(1)
EndSwitch
EndSwitch
EndSwitch
EndFunction
InstallEventHandler({RapaGUI = p_EventFunc})
moai.CreateApp(FileToString("GUI.xml"))
Repeat
WaitEvent
Forever
When trying to run the code I get an
Code: Select all
Error in line 4 (AnimViewer.hws): Animation file "Pogo" is in an unknown/unsupported format!
Thanks for any guidance