Embed animated gifs on flash using Flex Builder

5 01 2010

I’m playing with an actionscript library to load animated gif’s dynamically into a flash movie called AS3GifPlayer. This class loads an animated gifs from an URL and gives methods to control it(play, stop, gotoAndPlay/Stop, etc).

The problem is that I don’t wont to load it dynamically, I want to use embedded animated gif’s. So I made public the method readStream from the GifPlayer class and add the following code

[Embed(source="diego.gif", mimeType="application/octet-stream")]
private var Gif:Class;
.
.
.
myGIFPlayer.readStream(myGif);
addChild(myGIFPlayer);

And that’s it, you can use an animated gif in your flash games.

Cool!


Acciones

Informacion

2 respuestas a “Embed animated gifs on flash using Flex Builder”

13 01 2010
Mauricio Cortes (21:36:11) :

hola weremsoft! … Solo queria sugerirte a ver si podias hacer un TUTORIAL del flash-scumm desde cero,…. parece una buena libreria pero se me ha hecho un poco complicado iniciar… gracias

16 01 2010
Pablo(Spain) (14:03:54) :

Ánimos :)

Deje un comentario

usted puede usar estos tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>