'플래시 플레이어'에 해당되는 글 1건

  1. 2008.06.08 시스템을 검사하는 Capabilities클래스

AS3에서는 이전 버전에 이어 시스템의 정보를 읽어오는 Capabilities라는 클래스와 Stage나 Security등을 제공하고 있다. 이들 중에 시스템 환경 검사에 관련된 Capabilities클래스를 다루어보자.
이 클래스는 시스템 정보를 반환하는 여러가지 속성이 있다

[ 속성 : 도움말 참조 ]
avHardwareDisable : Boolean
[static] [read-only]
사용자의 카메라와 마이크에 대한 액세스가 금지되었는지(true) 또는 허용되었는지(false) 여부를 지정합니다.

hasAccessibility : Boolean
[static] [read-only]
플레이어가 실행되는 환경에서 액세스 가능성 도구와의 통신을 지원하는지(true) 또는 지원하지 않는지(false)를 지정합니다.

hasAudio : Boolean
[static] [read-only]
플레이어가 실행되는 시스템에 오디오 기능이 있는지 여부를 지정합니다.

hasAudioEncoder : Boolean
[static] [read-only]
플레이어에서 마이크 입력 등의 오디오 스트림을 인코딩할 수 있는지(true) 또는 인코딩할 수 없는지(false)를 지정합니다.

hasEmbeddedVideo : Boolean
[static] [read-only]
플레이어가 실행되는 시스템에서 포함된 비디오를 지원하는지(true) 또는 지원하지 않는지(false)를 지정합니다.

hasIME : Boolean
[static] [read-only]
플레이어가 실행되는 시스템에 IME가 설치되어 있는지(true) 또는 설치되어 있지 않은지(false)를 지정합니다.

hasMP3 : Boolean
[static] [read-only]
플레이어가 실행되는 시스템에 MP3 디코더가 있는지(true) 또는 없는지(false)를 지정합니다.

hasPrinting : Boolean
[static] [read-only] 플레이어가 실행되는 시스템에서 인쇄를 지원하는지(true) 또는 지원하지 않는지(false)를 지정합니다.

hasScreenBroadcast : Boolean
[static] [read-only]
플레이어에서 Flash Media Server를 통해 실행되는 스크린 브로드캐스트 응용 프로그램 개발을 지원하는지(true) 또는 지원하지 않는지(false)를 지정합니다.

hasScreenPlayback : Boolean
[static] [read-only]
플레이어에서 Flash Media Server를 통해 실행되는 스크린 브로드캐스트 응용 프로그램 재생을 지원하는지(true) 또는 지원하지 않는지(false)를 지정합니다.

hasStreamingAudio : Boolean
[static] [read-only]
플레이어에서 스트리밍 오디오를 재생할 수 있는지(true) 또는 재생할 수 없는지(false)를 지정합니다.

hasStreamingVideo : Boolean
[static] [read-only]
플레이어에서 스트리밍 비디오를 재생할 수 있는지(true) 또는 재생할 수 없는지(false)를 지정합니다.

hasTLS : Boolean
[static] [read-only]
플레이어가 실행되는 시스템에서 NetConnection을 통한 네이티브 SSL 소켓을 지원하는지(true) 또는 지원하지 않는지(false)를 지정합니다.

hasVideoEncoder : Boolean
[static] [read-only]
플레이어에서 웹 카메라 입력 등의 비디오 스트림을 인코딩할 수 있는지(true) 또는 인코딩할 수 없는지(false)를 지정합니다.

isDebugger : Boolean
[static] [read-only]
플레이어가 특수 디버깅 버전인지(true) 또는 정식으로 출시된 버전인지(false)를 지정합니다.

language : String
[static] [read-only]
플레이어가 실행되는 시스템의 언어 코드를 지정합니다.

언어
체코어 cs
덴마크어 da
네덜란드어 nl
영어 en
핀란드어 fi
프랑스어 fr
독일어 de
헝가리어 hu
이탈리아어 it
일본어 ja
한국어 ko
노르웨이어 no
기타/알 수 없음 xu
폴란드어 pl
포루투갈어 pt
러시아어 ru
중국어 간체 zh-CN
스페인어 es
스웨덴어 sv
중국어 번체 zh-TW
터키어 tr



localFileReadDisable : Boolean
[static] [read-only]
사용자의 하드 디스크에 대한 읽기 액세스가 금지되었는지(true) 또는 허용되었는지(false)를 지정합니다.

manufacturer : String
[static] [read-only]
Flash Player의 제조자를 "Adobe OSName" 형식으로 지정합니다.

os : String
[static] [read-only]
현재 운영 체제를 지정합니다.

pixelAspectRatio : Number
[static] [read-only]
스크린의 픽셀 종횡비를 지정합니다.

playerType : String
[static] [read-only]
플레이어 유형을 지정합니다.

screenColor : String
[static] [read-only]
스크린 색상을 지정합니다.

screenDPI : Number
[static] [read-only]
스크린의 dpi(인치당 도트 수) 해상도를 픽셀 단위로 지정합니다.

screenResolutionX : Number
[static] [read-only]
 스크린의 최대 수평 해상도를 지정합니다.

screenResolutionY : Number
[static] [read-only]
스크린의 최대 수직 해상도를 지정합니다.

serverString : String
[static] [read-only]
각 Capabilities 속성의 값을 지정하는 URL 인코딩 문자열입니다.

version : String
[static] [read-only]
Flash Player 플랫폼 및 버전 정보를 지정합니다.


다음은 trace()를 몇 차례 호출하여 flash.system.Capabilities 객체에 있는 값을 출력합니다.
package {
    import flash.display.Sprite;
    import flash.system.Capabilities;

    public class CapabilitiesExample extends Sprite {
        public function CapabilitiesExample() {
            showCapabilities();
        }
       
        private function showCapabilities():void
        {
            trace("avHardwareDisable: "     + Capabilities.avHardwareDisable);
            trace("hasAccessibility: "      + Capabilities.hasAccessibility);
            trace("hasAudio: "        + Capabilities.hasAudio);
            trace("hasAudioEncoder: "     + Capabilities.hasAudioEncoder);
            trace("hasEmbeddedVideo: "     + Capabilities.hasEmbeddedVideo);
            trace("hasMP3: "         + Capabilities.hasMP3);
            trace("hasPrinting: "       + Capabilities.hasPrinting);
            trace("hasScreenBroadcast: "    + Capabilities.hasScreenBroadcast);
            trace("hasScreenPlayback: "     + Capabilities.hasScreenPlayback);
            trace("hasStreamingAudio: "     + Capabilities.hasStreamingAudio);
            trace("hasVideoEncoder: "     + Capabilities.hasVideoEncoder);
            trace("isDebugger: "       + Capabilities.isDebugger);
            trace("language: "       + Capabilities.language);
            trace("localFileReadDisable: "    + Capabilities.localFileReadDisable);
            trace("manufacturer: "      + Capabilities.manufacturer);
            trace("os: "          + Capabilities.os);
            trace("pixelAspectRatio: "      + Capabilities.pixelAspectRatio);
            trace("playerType: "        + Capabilities.playerType);
            trace("screenColor: "       + Capabilities.screenColor);
            trace("screenDPI: "        + Capabilities.screenDPI);
            trace("screenResolutionX: "     + Capabilities.screenResolutionX);
            trace("screenResolutionY: "     + Capabilities.screenResolutionY);
            trace("serverString: "       + Capabilities.serverString);
            trace("version: "         + Capabilities.version);
       
        }
    }
}





Posted by 버터백통