This doesn't seem to have been asked before.
Can a gif being loaded into a picture object be restarted when it does so? I am using a button and a variable to load and unload a gif. as the Variable is changed from true to false.
Button has this - If(V11 = false,Set(V11,true),Set(V11,false))
Image has this - If(V11 = false,"",giphy)
So when V11 is false nothing loads and if true giphy loads.
My problem is that when the gif loads for the first time it plays from the beginning. But every successive load of the gif, has it start from a different frame. What I need is for it to start from the beginning again. Is there a way to reset the gif on load?
This does not appear to be possible.
Can you share more about your scenario? Is this a loading spinner as a GIF or another kind of GIF?
Thanks for replying.
It's not a spinner, It is a gif animation I am testing. I am looking into game sprites for eLearning games. I wish to load looping gifs but they need to start at the beginning of each loop so that I can sync each sequence correctly.
Is there any way to crop to coordinates in Power Apps?
My hunch is this is the browser trying to be performant and not bothering to reload the GIF from the start. Even when I blanked out the image and waited a few seconds before returning the image box to the GIF, it resumed the animation from when it started.
My preferred way to animate right now is:
It's more work, but I can do interesting things like slow down an animation and speed it up since I control every frame. I can also start an animation at any frame in the middle depending on my needs.
I am going to try a slightly different solution... I'm going to put each frame on a separate slide that never gets seen. number them sequentially and use a timer to change the numbered item loaded over time. I'll use an if statement to allow the animation to pick up the right frame for any sequence being changed at any time. I'll let you know how I got on and post the result here. It s a similar set up to yours I just don't have to stack the images.
Ah, the reason I show every image at once is for smoothing. When the image changes from one to another, any delay in loading the new content causes a blank to appear for a fraction of a second. It kind of flickers.
Hi @lukeo25 ,
Could you please share a bit more about your scenario?
Do you want to reset the GIF load using a variable?
Based on the needs that you mentioned, I afraid that there is no way to achieve your needs in PowerApps currently. If you would like this feature to be added in PowerApps, please consider submit an idea to PowerApps Ideas Forum:
Currently, within PowerApps, there is no way or function supported to control the load of a GIF image.
I see what you mean.
Any idea how I can convert a text type to an image type is it image( Variable that holds text )?
I'm not sure what you mean by converting text to image. Did you want to animate text? HTML Text control may have more ways to transform text. And you can create an SVG image that contains text, though it works best for single lines of text.
So my variable that is changing the image loading is SprIte1 which is set to the image R1 - I assume this is an image data type. I am concatenating a string and a number like this Set(SprIte1,Concatenate("R",Text(2)) so that results in a text data type. I want it to be an image data type. Or is that not right also?
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!