How to use Moviesetter plugin
Posted: Thu Apr 07, 2022 8:21 am
I cannot figure out how to use the Moviesetter plugin. Could not find a help file or example so have used an example from the RapaGUI help manual - an animation player.
This is my code. The "Pogo" file is in the same dir as the source and has been extracted from the archive (generously) provided by airsoftwair.
When trying to run the code I get an error so obviously I'm doing something wrong. The xml file worked fine when loading a .anim file. I am on Win11 64 bit using 64 bit plugin.
Thanks for any guidance
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
ForeverWhen 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