spacer

Actionscript 3: Export Screenshot as PNG

17. December - 2009 || Tags: , || Geschrieben in: Allgemein

Taking screenshots of your stage in is quite easy. For my example you just need kaourantin’s PNGEnc Class.

Download the PNGEnc class here

The guys who did the as3corelib have a PNG and JPG encoder class as well, you can download as3corelib here if you want to use their classes instead.

Here my example:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
private function takeScreenshot():void 
{
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.utils.ByteArray;
import flash.net.FileReference;
import net.kaourantin.PNGEnc;
 
 
var bmd:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight, true, 0);
var bm:Bitmap = new Bitmap(bmd, "auto",true);
 
bmd.draw(this); // i wrote my example code in my document class, so "this" refers to my document class and the whole stage is drawn into the bitmapdata
 
var bild:ByteArray = PNGEnc.encode(bmd);
 
var file:FileReference = new FileReference();
 
file.save(bild, "screenshot.png");
 
trace("Taken Screenshot");
 
}
- jonas

RichFLV – Flash Video Editor

30. July - 2008 || Tags: , , || Geschrieben in: Allgemein

Endlich habe ich eine Möglichkeit gefunden, Dateien auf einfache Art und Weise zu bearbeiten. Witzigerweise ist das Programm um das es sich handelt auch noch in Flex geschrieben ;)

http://www.richapps.de/files/richflv/RichFLV.air

via Ted On Flex

- jonas

Neues Tutorial auf gotoandlearn.com

30. July - 2008 || Tags: , , || Geschrieben in: Allgemein

Introduction to AMFPHP 1

Learn how to install AMFPHP and create a simple service that sends email.

http://www.gotoandlearn.com/

- jonas

Meine Lektüre für die Semesterferien

29. July - 2008 || Tags: , || Geschrieben in: Allgemein

Essential Actionscript 3

Essential Actionscript 3

- jonas

Actionscript 3 “one day workshop”

29. July - 2008 || Tags: , || Geschrieben in: Allgemein

Über den Flash Blog bin ich auf einen sehr nützlichen Actionscript 3 Workshop für Anfänger gestossen:

http://gskinner.com/talks/as3workshop/

- jonas

Actionscript 3: SoundManager Class

29. July - 2008 || Tags: , , || Geschrieben in: Allgemein

“The SoundManager is a Singleton that does exactly what it says. It has a host of methods to choose from that should make adding sounds to your projects super simple. It has a dependency to TweenLite for the fading (which can be taken out but I use TweenLite in a lot of projects so I just made it easy on myself). For a complete list of methods, please review the documentation.”

Link

via Flash Enabled Blog

- jonas
© Jonas Jaeger - 2009