Class : Capabilities
이클래스를 사용하면 클라이언트의 디바이스정보를 알수가 있습니다.
예를 들어 오디오기능을 지원하는지 또는 디스플레이가 컬러인지 흑백인지 등등입니다.
심지어 인쇄를 지원하는지도 알수 있습니다 ㅎㅎ
http://flexdocs.kr/docs/flex2/langref/flash/system/Capabilities.html#includeExamplesSummary
링크의 예제 소스 입니다
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);
}
}
}
ps. 한글화 사이트가 되는군요 ㅎㅎ 지돌스타님 감사합니다 ~ㅎㅎ
'Flex / AIR / AS' 카테고리의 다른 글
화면 Layout 구성시 참고할점 (0) | 2010.02.05 |
---|---|
[Actionscript3.0] Inner Class (0) | 2010.02.03 |
ListBase 선택된 아이템 선택 해제하기. (0) | 2009.11.12 |
[AS3.0] 소수점 절삭 (2) | 2009.11.06 |
클래스 생성시 주의할 점 (2) | 2009.11.03 |