views:

5332

answers:

4

Believe it or not I need a way of displaying animated gifs in Flex 3. This guy has a component for sale but it's Flex 2 only: http://dougmccune.com/blog/2007/01/19/how-to-load-animated-gifs-using-adobe-flex-20/.

And I’ve implemented this example: http://www.bytearray.org/?p=95, but for larger gifs it’s very CPU intensive and causes the UI to hang.

Does anyone know of any alternative solutions? Failing that, I may have to look at re-factoring the second example to use pseudo-threading. Eugh.

A: 

Does this help?

Edit: I've no idea how well that suggestion works on a larger GIF, but if you're still having issues, it might be worth importing the GIF into Flash and turning it into its own SWF.

Flex should be more than able to play that without any issues.

Oli
the google code project seems to be the same code as the one from bytearray.
grapefrukt
+1  A: 

Thanks for the response. The google code project in that link (http://code.google.com/p/as3gif/) is the same as the one on bytearray (http://www.bytearray.org/?p=95) which I implemented.

I knocked up a quick pseudo-threading example using this code and it's far too slow.

Looks like I will need to SWF the GIFs on the fly...

A: 

Check out swfmill for going for creating swf's. I believe they support animated gif's

http://swfmill.org/

Marc Hughes
Not directly, but see http://blog.thehippo.de/2009/09/tools-and-software/how-to-convert-a-animated-gif-into-a-flash-movie/#more-97
Eddie Sullivan
+2  A: 

i bought and used the mccune product but have now changed to flex 3. i found your question by searching for the same answer as you and have just come across this

http://flexology.wordpress.com/2008/09/30/loadinganimated_gif_in_flex/