//將stage上之顯示元件轉成.PNG檔案,並存於本機端,包含stage也可轉存
<?xml version="1.0" encoding="utf-8"?>
<mx:Application applicationComplete="init()" xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.graphics.codec.PNGEncoder;
private var enable:Boolean;
private function init():void
{
enable = true;
}