Flash Video Player

SWF to PNG using ByteArray class

by admin on September 28, 2007 · 0 comments

in Flash CS3, Mix, Tutorials

Greetings to all!

Today, I am proud of this very interesting article.
Not that the other ones are not interesting but this one beats them all from my point of view.

Have you ever thought on how to extract an image of format .png from a SWF?

With Actionscript 2.0, I personally had done it for an application using the BitmapData class and the library GD of PHP. It was certainly not very performing but it was the only way to do it at the time.

With Actionscript 3.0, we have the ByteArray class available that allows us to script a BitmapData into a ByteArray.

As my knowledge of binary programming are not sufficient to realise all of it on my own, I found on the web a script from Adobe, which scripts a BitmapData and returns a ByteArray.

I then realised that the ByteArray was not ready to be passed to a server side script and so I asked help to a friend of mine, an engineer named Daniele Lazzara of OrigamiStudio.it with a real virtue in informatics and a big passion for Flash. He used a codification created by Steve Webster & dynamicflash.com to convert the ByteArray to a String and implemented a PHP script to complete the job.
Finally, I implemented a call to the PHP script from Flash and…it works wonderfully!

Read more

Share This Post

Related posts

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

Older post: Apply a TextFormat to TextField

Newer post: Actionscript 3 Array