Page 1 of 1

Is it possible to show an animated GIF?

Posted: Tue May 19, 2015 8:10 am
by Peter
Hello,

i want to show a Wait-Window with an animated GIF:

Image

Code: Select all

Enumeration
  #WaitWindow
  #WaitWindowImage
EndEnumeration

Procedure Loaded(Type, Filename$, ObjectId)
  SetGadgetState(#WaitWindowImage, ImageID(ObjectId))
EndProcedure

BindEvent(#PB_Event_Loading, @Loaded())

OpenWindow(#WaitWindow, #PB_Ignore, #PB_Ignore, 150, 150, "", #PB_Window_ScreenCentered | #PB_Window_BorderLess)
ImageGadget(#WaitWindowImage, 0, 0, 128, 128, 0, #PB_Image_Border)
LoadImage(0, "loader.gif")
It seems, that SpiderBasic sets the background-image - Attribute so the GIF is not animated:

Image

Greetings ... Peter

Re: Is it possible to show an animated GIF?

Posted: Tue May 19, 2015 10:13 pm
by eddy
SpiderBasic did a DataToURL conversion.
In your screenshot, the file extension seems to be wrong: "image/png" instead of "image/gif"