This content has been marked as final. Show 21 replies
I havent test it, but always you can transform an animated gif to a SWF file, there are many programs to do it. (IE Gif Movie Gear)
In my example the gif is from an external source so converting is not an option. Sounds like animated gifs are not supported in Flex/Flash?
We don't support animated GIFs. Normally people import them into Flash which automatically converts them into a movie. You can then load that SWF into your Flex application.
Thanks. Since my animated Gif is from an external link... is there a way to import/convert the Gif on the "fly" to a movie?
I was afraid you'd ask that. I don't know of such an application. You would more than likely do it on the server rather than the client. Check places like Sorenson, or Flex Coders or some of the other Flash sites.
> Peter -
> Thanks. Since my animated Gif is from an external link... is there a way to import/convert the Gif on the "fly" to a movie?
There is a workaround if you do it in PHP, but think in the response
time for the final user.
From PHP get the remote Gif, then convert it into a swf, there are any
class to do it (i cant remember wich) then serve the swf to the Flex
I've not tested it of course, but if you want try it, sure isnt the
I did find a server-side Java solution called JGenerator ( http://jzox.com) which can convert on the fly.
But since Flash can import and convert animated gif to movies... what's the technical challenge to add same capabilties to Flex/AS 3.0?
That would be a good enhancement request. I'll file it.
The support of animated GIF will be really appreciate.
We have to write a chat in Flex2, so we uses the RichTextEditor, and smileys are animated Gif, but Flex2 show only the first frame.
There is a way to solve this problem ?
Check this out:
It uses an IFrame.
Here's an animated gif using IFrame:
Click on Radar tab
Interresting, so it's possible to create an Iframe composant and to push in this frame the dialogs with smileys, it's directly interpretted by the browser ?
But this doesn't seems to works under Firefox 2.0 / Flash Player 9 beta2.
I have a blue screen on IFrameDemo & IFrameDemo2, and when on the weather radar tab, the container don't show anything...
Hmmm I'm using FireFox 2 (Mac & Windows) with 9.0 r18.
Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy)
Shockwave Flash 9.0 d78
It's not the first time I have this blue screen bug, I have already see that on somes Flex2 application (this remember me the BSOTD of MS ;-)
But I have found a version 3.0 here :
and this version works :-)
So I'll try to uses the IFrame composant.
Thanks a lots for your help !
This thread's a few months old but I thought I'd mention that I have developed a Flex component for loading and playing animated gif files. Now there's no need to hack together some weird IFrame solution, or figure out how to do the server-side conversion of all your GIFs. You can try the demo version for free and the commercial version is $50.
Here's the description I posted on Flex Exchange:
The AnimatedGifLoader loads and plays animated GIF files. This component adds support for animated GIFs, a feature that has been lacking from Flex.
This works just like the SWFLoader component from the Flex Framework. Use it inline in your MXML code or by using Actionscript. This component supports everything the SWFLoader component does, with a few additions.
New methods: play(), pause()
New properties: autoPlay, playing, currentFrame, delay
Test it out with your own animated GIFs to see how it works by clicking on the sample URL.
I've written up the full details on my blog. There are some examples and you can even test out any GIF you want by uploading it and seeing it loaded by the component instantly:
Here's the Flex Exchange posting:
http://www.adobe.com/cfusion/exchange/index.cfm?view=sn610#view=sn611&viewName=Flex%20Exte nsion&loc=en_us&authorid=61303741&page=0&scrollPos=0&subcatid=0&snid=s\n611&itemnumber=0&e xtid=1103970&catid=0
Feedback is always appreciated!
Does The AnimatedGifLoader work via an external URL for the animated gif?
The Animated Gif Loader component loads GIFs using either a URL (relative or absolute) or by using an embedded asset. You can use the @Embed format for inline MXML or the [Embed] format for AS. I've posted about this here: http://dougmccune.com/blog/2007/01/19/how-to-load-animated-gifs-using-adobe-flex-20/
This is almost exactly the same as how you can load anything into the SWFLoader component (I say almost because you have to specify the mime-type of the embedded gif, see the post for details).
Your component interrest me, but is it possible to include theses GIF in a TextArea.htmlText ?
No, unfortunately this component does not enable animated GIFs within Text components that support htmlText. The root reason for this is that the htmlText property is part of the flash.text.TextField class, and the classes in any of the flash.* packages are not available. So to enable animated gifs in a TextField or TextArea, I'd have to be able to see how flash.text.TextField handles the <img> tag.
Is it possible to adapt the TextArea ?
Is yes, can you do this quickly ? and how much do you sell it ?
After taking an initial look, I don't think I'm going to be able to get a new component based off TextArea to support animated gifs. I'll let you know if I come up with anything, but I wouldn't hold my breath. Modifying anything that uses the htmlText property would require access to classes that are built into the flash player, instead of classes available in the flex framework. So while it's probably not impossible to figure out a solution, it's going to pretty difficult.
Is anyone can do this, I can paid for this job.