Derfder
Derfder

Reputation: 3324

How to insert gif inside flash?

Is it possible? If so, how can I write such code?

E.g. I have files called image.gif, image2.gif, someother.gif etc. and these files are all animated gifs.

I would like to import it somehow in flash using actionscript, so actionscript grab all gifs in the folder he is located and display them below each other automatically.

The problem is is it possible so they are doing they own animation inside flash?

I would like to make a protected flash container for my gif banners.

thanks for any suggestion how can I do such thing.

Upvotes: 0

Views: 1920

Answers (1)

George Profenza
George Profenza

Reputation: 51867

I recommend using Thibault Imbert's GIF Player library.

GIF Player

Follow the examples/documentation that come with the library, it's fairly straight forward:

var gifImage:GIFPlayer = new GIFPlayer();
addChild ( gifImage );
gifImage.load ( new URLRequest ("animation.gif") );
gifImage.play();

I've used it about 4 years ago for a uni project and remember it was easy to pickup.

Regarding the use, it doesn't look like fun:

  1. I imagine a lot of people use browser extensions to block ads or flash anyway.
  2. I'm not sure how protected the gifs would be. By default it should be easy to monitor the browser's network activity(files downloaded) or use any sort of swf decompiler or simply the path to the gifs. I imagine it might be possible to write an image scrambler which would convert your .gif before loading on the server and in the swf you'd use code to unscramble the image, but you'd also need to scramble the actionscript code as well which would make this task a bit harder, but not impossible. Overall sounds overkill for something as 'exciting' as gif banners.

Upvotes: 2

Related Questions