Skip to main content
Participating Frequently
August 1, 2009
Answered

loadMovie won't play animated gifs but swf plays fine

  • August 1, 2009
  • 1 reply
  • 1514 views

I am using Flash CS3 with ActionScript 2.

My program so far succesfully can load into a movieClip (using loadMovie) external .jpg & .png & .gif (non-animated) and displays them properly. I can also have it load in an external .swf and get it to play properly. The only problem I have is with animated gifs... they load in but then only show the first frame/animation (even when using play() ).

Is there a different method besides play() to get a movie clip with an animated gif loaded into it to play?

This is only a sample, this is not the working code (it's very long so did not want to post it)... these are just the main calls that will work for the .swf file, so I thought they would work for the animated gif as well.

this.createEmptyMovieClip("myMC", 1);

myMC.loadMovie("filename.gif",1);

myMC.play();

Again, my 'real code' will load and display static .jpg .png or .gif files fine, as well it will load and play .swf files fine... it's just animated gifs that don't play.

My full code is here, if you want to look at it:

http://forums.adobe.com/thread/467815

Thanks

This topic has been closed for replies.
Correct answer Ned Murphy

As far as I know, you cannot play an animated gif file in Flash.  Only the first image of it will display.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
August 1, 2009

As far as I know, you cannot play an animated gif file in Flash.  Only the first image of it will display.

Participating Frequently
August 1, 2009

Thanks for the reply Ned Murphy... when you initially answered my first thought was "that can't be right", but a search for 'animated gif' in the Flash CS3 Help turns up multiple occurences of "If you load an animated GIF, only the first frame is displayed."

So I guess I don't have a problem to solve after all... just a feature request!!!