In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

system.Capabilities

Get Adobe Flash player
by Jack-Bauer 07 Apr 2015

    Talk

    YoupSolo at 13 Apr 2015 13:41
    made this : http://www.yopsolo.fr/wp/capabilities/ with a setClipBoard ! really usefull when you have to deal with tester or end user
    Embed
/**
 * Copyright Jack-Bauer ( http://wonderfl.net/user/Jack-Bauer )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/prbr
 */

package {
    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.system.Capabilities;
    
    public class HelloWorld extends Sprite {
        public function HelloWorld() {
            var asCap:Array = new Array("avHardwareDisable", "cpuArchitecture", "hasAudio", 
                "hasAudioEncoder", "hasEmbeddedVideo", "hasIME", "hasMP3", "hasPrinting", 
                "hasScreenBroadcast", "hasScreenPlayback", "hasStreamingAudio", "hasStreamingVideo",
                "hasTLS", "hasVideoEncoder", "isDebugger", "isEmbeddedInAcrobat", "language", "languages", 
                "localFileReadDisable", "maxLevelIDC", "screenColor", "screenDPI", 
                "supports64BitProcesses", "touchscreenType");

            var asCapText:String = "";
            for each(var cap:String in asCap) {
                var tmpOut:String = cap + ": " + Capabilities[cap] + "\n";
                asCapText += tmpOut; 
            }

            // Add version on non-linux
            if((Capabilities.os.indexOf("Linux")  == -1)) {
                asCapText +=  "os: " + Capabilities.os;
            }
            
            var tf:TextField = new TextField();
            tf.x = tf.y = 0;
            tf.width = 300;
            tf.height = 450;
            tf.text = asCapText;
            addChild(tf);
        }
    }
}