Animated gif and png in button


(moshe_caine) #1

Hi there.
It seems that animated gifs or animated png inside a button no longer work in Hype 3.6.1.
In the past this was the method I used to make them interactive. Now they no longer appear.
See attached example.
animated gif in button.hype.zip (54.3 KB)


(Mark Hunte) #2

Here is the download from above with the fixed link <a class=“attachment"href=”/uploads/db2156/original/2X/0/027a9113b68d390bb5df075f8d3616325a540468.zip">animated gif in button.hype.zip(54.3 KB)


(Mark Hunte) #3

I can confirm that this does happen with gifs.

What seems to be happening is the properties for all actions of the button are being changed when using an animated gif.
i.e if you set the fill to an animated gif on normal, and then go to Hover and set it to none then go back and check normal, you will see that that is now none also. This happens in the reverse order as described above also.

This does not happen for normal images.

One work around for now would be to use a css style in the head and give the button the class or ID of the style.

	<style>

.aniButton:hover {

background-image: url("${resourcesFolderName}/Untitled.gif")
}

</style>

(moshe_caine) #4

Thanks for the reply and advice.
I’ll try the workaround. Nevertheless, I hope they correct it, as the
button solution was very useful for gifs.


(Jonathan Deutsch) #5

Unfortunately it is a long standing bug that Hype buttons do not properly support different background types for the different states. For this to work, you should use a background image (even if it is a fully transparent gif) for the normal, hover, and pressed states.