system_info

by naokiryu
♥0 | Line 43 | Modified 2012-08-09 20:07:14 | MIT License
play

ActionScript3 source code

/**
 * Copyright naokiryu ( http://wonderfl.net/user/naokiryu )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/dTf3
 */

package {

    import flash.display.*;

    import flash.text.*;

    import flash.system.*;

    

    //システム情報の取得

    [SWF(width=240, height=480, backgroundColor=0xFFFFFF)]

    public class SystemEx extends Sprite {

        //コンストラクタ

        public function SystemEx() {            

            //System

            var text:String="トータルメモリ:"+System.totalMemory+"\n";

            

            //Capabilities 

            text+="カメラとマイクへのアクセス禁止:"+Capabilities.avHardwareDisable+"\n";

            text+="アクセシビリティの使用:"+Capabilities.hasAccessibility+"\n";

            text+="オーディオ機能の使用:"+Capabilities.hasAudio+"\n";

            text+="オーディオストリームでのエンコード:"+Capabilities.hasAudioEncoder+"\n";

            text+="埋め込みビデオの使用:"+Capabilities.hasEmbeddedVideo+"\n";

            text+="MP3のデコード:"+Capabilities.hasMP3+"\n";

            text+="印刷:"+Capabilities.hasPrinting+"\n";

            text+="スクリーンブロードキャストアプリケーションの開発:"+Capabilities.hasScreenBroadcast+"\n";

            text+="スクリーンブロードキャストアプリケーションの再生:"+Capabilities.hasScreenPlayback+"\n";

            text+="ストリーミングオーディオの再生:"+Capabilities.hasStreamingAudio+"\n";

            text+="ストリーミングビデオの再生:"+Capabilities.hasVideoEncoder+"\n";

            text+="デバッグ用のFlashかどうか:"+Capabilities.isDebugger+"\n";

            text+="言語:"+Capabilities.language+"\n";

            text+="ハードディスクへのアクセス禁止:"+Capabilities.localFileReadDisable+"\n";

            text+="FlashPlayerの製造元:"+Capabilities.manufacturer+"\n";

            text+="OS:"+Capabilities.os+"\n";

            text+="ピクセル縦横比:"+Capabilities.pixelAspectRatio+"\n";

            text+="FlashPlayerのタイプ:"+Capabilities.playerType+"\n";

            text+="画面の色:"+Capabilities.screenColor+"\n";

            text+="画面のDPI解像度(ピクセル単位):"+Capabilities.screenDPI+"\n";

            text+="画面の最大水平解像度:"+Capabilities.screenResolutionX+"\n";

            text+="画面の最大垂直解像度:"+Capabilities.screenResolutionY+"\n";

            text+="URLエンコード文字列: " + Capabilities.serverString+"\n";

            text+="バージョン:"+Capabilities.version+"\n";            

            

            //ラベルの生成

            addChild(makeLabel(text));

        }



        //ラベルの生成

        private function makeLabel(text:String):TextField {

            var label:TextField=new TextField();

            label.text      =text;                  

            label.autoSize  =TextFieldAutoSize.LEFT;

            label.selectable=false;
                       return label;

        }

    }

}