Movieplayer with animated GIF

I have an animated GIF that I want to use in my splash screen. So, I threw in a movieplayer and had it load and play the animated GIF. And it worked…mostly.

The issue I see is that the movieplayer plays each frame of the GIF without clearing the previous one. Therein is my question. Is there a way to force the movieplayer to blank its display area between frames? I would really rather not have to break the animated GIF into individual images and paint them, in order, to a canvas.

Full disclosure: Xojo 2019r3.1, Windows 10

I’d try an htmlviewer with the gif embedded on it as raw data so you dont need a URL etc

I’ve never tried that. In fact, I’m not even sure how to embed it as raw data.

the src tag in an html image should do it

cant say I’ve done it but I know its possible

I did a quick test with Canvas, ImageWell, HtmlViewer, and MoviePlayer. The HtmlViewer and MoviePlayer worked perfect. The Canvas and ImageWell did not. HtmlViewer displayed it the best.

I had this on a button to grab and display the image

[code]Sub Action()
Dim fType As New FileType
fType.Name = “image/gif”
fType.MacType = “GIF”
fType.Extensions = “gif”
Dim f As FolderItem = GetOpenFolderItem(fType)

If f Is Nil Then
//user cancelled
ImageWell1.Image = Picture.Open(f)

Canvas1.Backdrop = Picture.Open(f)


MoviePlayer1.Movie = f.OpenAsMovie

End If

End Sub[/code]

I had this on the HTMLViewer

Sub DocumentComplete(URL as String) HTMLViewer1.ExecuteJavaScript("['overflow-y'] = 'hidden';") End Sub

And this on the MoviePlayer

Sub Open() MoviePlayer1.AutoPlay = True MoviePlayer1.Looping = True End Sub

None of this is truly my code. I just extracted from the following:

Thanks for the suggestions. After some experimentation, I have decided that the most flexible method is to break the animated GIF into individual images and use a canvas to display the images in sequence. The speed of the animation can be controlled by a timer.