versione italiana versione italiana
FlepStudio logo

Actionscript 3.0 Blog with Tutorials and free resources for Flash

>> Free Flash files

Events Scroller | Images Scroller | Multi FLV Player | Flash CS3 GuestBook | News Scroller | Tortillas - creator of simple graphs for statistical data | 3D images visualization free utility | Flash CS3 Uploader - free utility | Mini Gallery | Flash CS3 puzzle | Hit counter Flash CS3 + XML + PHP | Multi Audio Player | Newsletter module | Bluring Slide | Monthly Calendar | ShoutBox | StripGallery - Flash CS3 and XML gallery | Email Form PRO | MaskMenu | Elastic Gallery | PhotoNavigator | Pixellation - SlideShow | Email form | Analogue clock | FullScreen images gallery | Rotating header | Flash Portfolio | Polls System | Products Exhibitor | Mini Navigator | Drag Menu | Horizontal Menu | Quizzer | Mini Navigator 2 | Reflect Gallery | Events Scroller - version 2 | Rotating header 2 | Magnifying Glass | Zoomify | MenuVibration | Email form Flash CS3 and ColdFusion 8 | News Scroller 2 | Simple GuestBook | Captcha for Flash CS3 | Email form with pictures - Flash CS3 and PHP | FlepCharCode | Mac Menu | Header | Memory Game - Flash CS3 game | Flash CS3 CountDown | FLV Slide Show Videos | Illusion - images gallery | Tell A Friend | Flash RSS reader | ToolTip Flash CS3 - CS4 | Sliding Email Form | ComboMenuHeader | ComboMenuHeader PRO | Mac Front Row in Flash CS3 | FlaTwit - Flash and Twitter - twit this | Store Locator | Multi Video Player MAC style | Flash XML editor | BlurSlideShow | ImagesViewer | Video Gallery | Flash XML editor gallery 1 | 15 numbers game | Tipper vertical scroller with Iphone effect | YouTube Video Player by categories | GuestBook Flash CS4 | tweened menu | Twitter RSS reader | Xmas Flash header | Events Scroller - version 3 | TripleBox | BlackComboBox | Inertial Photo Portfolio | Fullscreen Background | Multi Categories Images Gallery | DropDown menu | CountDown version 2 | Advertising Flash banner | Quizzer version 2 | UEFA RSS reader | Flash Scrolling Portfolio | Video Player | Flash Gallery | Images Scroller version 2 | Images Scroller version 3 | Images Scroller version 4 | Europe map | Events slide show | Banner Rotator | Flash and Flickr image gallery | Flash and Picasa image gallery

SWF to PNG using ByteArray class

by admin on September 28, 2007

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

{ 2 comments… read them below or add one }

1 Brian March 18, 2009 at 8:59 pm

Can anyone tell me if it is possible to save everything that is on the stage as a PNG and not only the lines drawn??? If i add any shape on the stage it doesnt include it in the PNG, only the lines that was drawn???

Please help me

2 admin March 18, 2009 at 10:07 pm

Hi Brian,
just use the draw() to stage.

Leave a Comment

Previous post:

Next post: