This page was saved using jaction on 09/04/06 8:33:22.
Address: http://flexdocs.kr/docs/flex2/langref/flash/accessibility/AccessibilityProperties.html
Title: flash.accessibility.AccessibilityProperties (Flex™ 2 레퍼런스 가이드)  •  Size: 34766
Packageflash.accessibility
Classpublic class AccessibilityProperties
InheritanceAccessibilityProperties Inheritance Object

AccessibilityProperties 클래스를 사용하면, accessibility 보조 (screen reader등)에의 Flash object의 제시 방법을 제어할 수 있습니다.

임의 display object에 AccessibilityProperties object를 부가할 수 있습니다만, Flash Player 는 특정의 object에 관련한 AccessibilityProperties object만을 읽어냅니다. 이것에 해당하는 object는, SWF 파일 전체 (DisplayObject.root), 컨테이너 object (DisplayObjectContainer 와 서브 클래스), 버튼 (SimpleButton 와 서브 클래스), 및 텍스트 (TextField 와 서브 클래스)입니다.

accessibility 보조는 네비게이션의 기본적 방법으로서 object의 이름을 유저에게 제공하기 위해(때문에), 이러한 object의 name property는 지정하는 가장 중요한 property입니다. AccessibilityProperties.nameDisplayObject.name 를 혼동 하지 말아 주세요. 이 2 개은 서로 무관계한 별개의 property입니다. AccessibilityProperties.name property는 accessibility 보조로 읽어 내릴 수 있는 이름인데 대해,DisplayObject.name 는 기본적으로, ActionScript 코드에서만 인식되는 변수명입니다.

오쏘링시에는,AccessibilityProperties object의 property는 [accessibility] 패널 내의 대응하는 설정보다 우선됩니다.

Flash Player 가 accessibility 보조를 지원(support)하는 환경에서 실행되고 있는지 어떤지를 확인하려면 ,Capabilities.hasAccessibility property를 사용합니다. AccessibilityProperties object를 변경했을 경우, 변경 내용을 유효하게 하려면 ,Accessibility.updateProperties() Methods를 호출할 필요가 있습니다.

다음의 property표에는, 각각의 property의 이름과 데이터형,[accessibility] 패널 에서의 대응하는 설정,및 property의 적용 대상이 되는 object의 종류를 나타냅니다.

View the examples

See also

flash.accessibility.Accessibility.updateProperties()
flash.display.DisplayObject.accessibilityProperties
flash.display.InteractiveObject.tabIndex
flash.system.Capabilities.hasAccessibility


Public property
 property정의
 Inheritedconstructor : Object
특정의 object 인스턴스의 클래스 object 또는 constructor    함수에의 참조입니다.
Object
  description : String
accessibility 제시에 있어서의 이 표시 object의 기술을 제공합니다.
AccessibilityProperties
  forceSimple : Boolean
true 의 경우, Flash® Player 는 이 표시 object내의 child object를 accessibility 제시로부터 제외합니다.
AccessibilityProperties
  name : String
accessibility 제시에 있어서의 이 표시 object의 이름을 제공합니다.
AccessibilityProperties
  noAutoLabeling : Boolean
true 의 경우, Flash Player 의 디폴트의 자동 label 기능이 무효가 됩니다.
AccessibilityProperties
 Inheritedprototype : Object
[static] 클래스 또는 함수 object의 prototype object에의 참조입니다.
Object
  shortcut : String
이 표시 object에 관련한 키보드 쇼트 컷을 나타냅니다.
AccessibilityProperties
  silent : Boolean
true 의 경우, 이 표시 object는 accessibility 제시로부터 제외됩니다.
AccessibilityProperties
Public Methods
 Methods정의
  AccessibilityProperties ()
새로운 AccessibilityProperties object를 작성합니다.
AccessibilityProperties
 InheritedhasOwnProperty (name:String ):Boolean
object로 지정된 property가 정의되고 있는지 어떤지를 나타냅니다.
Object
 InheritedisPrototypeOf (theClass:Object ):Boolean
Object 클래스의 인스턴스가, Parameters로서 지정된 object의 prototype 체인내에 있을지 어떨지를 나타냅니다.
Object
 InheritedpropertyIsEnumerable (name:String ):Boolean
지정된 property가 존재해, 열거 가능한가 어떤가를 나타냅니다.
Object
 InheritedsetPropertyIsEnumerable (name:String , isEnum:Boolean = true):void
루프 처리에 대한 다이나믹 property의 가용성을 설정합니다.
Object
 InheritedtoString ():String
지정된 object의 string 표현을 돌려줍니다.
Object
 InheritedvalueOf ():Object
지정된 object의 원시적치를 돌려줍니다.
Object
property의 상세
descriptionproperty
public var description:String

accessibility 제시에 있어서의 이 표시 object의 기술을 제공합니다. 이 object에 관한 많은 정보를 제시하려면 , 이름을 간결하게 해, 대부분의 정보를 description property에 포함하는 것이 적절합니다. SWF 파일 전체, 컨테이너, 버튼, 텍스트가 대상이 됩니다.

forceSimpleproperty 
public var forceSimple:Boolean

true 의 경우, Flash® Player 는 이 표시 object내의 child object를 accessibility 제시로부터 제외합니다. 디폴트치는 false 입니다. SWF 파일 전체와 컨테이너가 대상이 됩니다.

nameproperty 
public var name:String

accessibility 제시에 있어서의 이 표시 object의 이름을 제공합니다. SWF 파일 전체, 컨테이너, 버튼, 텍스트가 대상이 됩니다. 이것과 DisplayObject.name 를 혼동 하지 말아 주세요.

noAutoLabelingproperty 
public var noAutoLabeling:Boolean

true 의 경우, Flash Player 의 디폴트의 자동 label 기능이 무효가 됩니다. 자동 label 기능은, 버튼 내부의 텍스트 object를 버튼명으로서 취급해, 텍스트 필드의 가까이의 텍스트 object를 텍스트 필드명으로서 취급합니다. 디폴트치는 false 입니다. SWF 파일 전체만이 대상이 됩니다.

shortcutproperty 
public var shortcut:String

이 표시 object에 관련한 키보드 쇼트 컷을 나타냅니다. 단축 키에 이미 관련지을 수 있었던 UI 컨트롤 에 대해서만, 이 string를 제공해 주세요. 컨테이너, 버튼, 텍스트가 대상이 됩니다.

메모 : 이 property를 할당해도, 특정의 키 조작의 편성이 자동적으로 이 object에 할당할 수 있는 것은 아닙니다. 그렇게 하기 위해서는, 예를 들어 KeyboardEvent 를 릿슨 해 수동으로 지정할 필요가 있습니다.

이 string의 문장구조법은 수식 키에 긴 이름을 사용해, 플러스 (+) 캐릭터를 사용해 키 조작의 편성을 나타냅니다. 유효한 string는, 예를 들어 Ctrl+F, Ctrl+Shift+Z 등입니다.

silentproperty 
public var silent:Boolean

true 의 경우, 이 표시 object는 accessibility 제시로부터 제외됩니다. 디폴트치는 false 입니다. SWF 파일 전체, 컨테이너, 버튼, 텍스트가 대상이 됩니다.

constructor    의 상세
AccessibilityProperties()constructor   
public 함수 AccessibilityProperties()

새로운 AccessibilityProperties object를 작성합니다.

Examples

다음의 코드의 예에서는,AccessibilityExample, CustomAccessibleButton,CustomSimpleButtonButtonDisplayState 클래스를 사용해, 일반적인 screen reader와의 제휴가 가능한 accessibility 준거 메뉴를 작성합니다. Accessibility 클래스의 AccessibilityProperties 클래스의 주된 기능은 다음과 같습니다.
  1. configureAssets 를 호출하는 것으로, custom 버튼을 작성해, 버튼의 label와 기술을 설정합니다. 이러한 값은 screen reader에 의해 최종 사용자에 전송됩니다.
  2. setTimeOut() 를 호출하는 것으로, property의 갱신전에 Flash Player 가 screen reader를 검출하기 위한 충분한 시간을 줍니다.

메모 : setTimeout() 은,Accessibility.active 의 검사전에 호출해 주세요. 이렇게 하면, Flash Player 가 screen reader (사용 가능한 경우)에게 접속하는데 필요한 2 초간을 확보할 수가 있습니다. 충분한 지연 시간을 지정하지 않는 경우, screen reader가 사용 가능해도,setTimeout 호출에서는, false 가 돌려주어집니다.

다음의 예에서는, Accessibility.updateProperties() Methods가 처리되는 것은,Accessibility.active 호출이 true 를 돌려주는 경우만입니다. 즉, Flash Player 가 액티브 상태의 screen reader에게 현재 접속하고 있는 경우만입니다. updateProperties 가 불려 갔을 때에 screen reader가 액티브 상태가 아닌 경우,IllegalOperationError 예외가 슬로우 됩니다.

package {
    import flash.display.Sprite;
    import flash.accessibility.Accessibility;
    import flash.utils.setTimeout;
    
    public class AccessibilityPropertiesExample extends Sprite {
        public static const BUTTON_WIDTH:uint = 90;
        public static const BUTTON_HEIGHT:uint = 20;
        
        private var gutter:uint = 5;
        private var menuLabels:Array = new Array("PROJECTS", "PORTFOLIO", "CONTACT");
        private var menuDescriptions:Array = new Array("Learn more about our projects"
                                                     , "See our portfolio"
                                                     , "Get in touch with our team");
        
        public function AccessibilityPropertiesExample() {
            configureAssets();
            setTimeout(updateAccessibility, 2000); 
        }
        
        private function updateAccessibility() :void {
            trace("Accessibility.active: " + Accessibility.active);
            if(Accessibility.active) {
                Accessibility.updateProperties();
            }
        }
        
        private function configureAssets() :void {
            var child:CustomAccessibleButton;
            for(var i:uint; i < menuLabels.length; i++) {
                child = new CustomAccessibleButton();
                child.y = (numChildren * (BUTTON_HEIGHT + gutter));
                child.setLabel(menuLabels[i]);
                child.setDescription(menuDescriptions[i]);
                addChild(child);
            }
        }
    }


import flash.accessibility.AccessibilityProperties;
import flash.display.Shape;
import flash.display.SimpleButton;
import flash.display.Sprite;
import flash.events.Event;
import flash.text.TextFormat;
import flash.text.TextField;
    
class CustomAccessibleButton extends Sprite {
    private var button:SimpleButton;
    private var label1:TextField;
    private var description:String;
    private var _name:String;
        
    public function CustomAccessibleButton(_width:uint = 0, _height:uint = 0) {
        _width = (_width == 0) ?  AccessibilityPropertiesExample.BUTTON_WIDTH : _width;
        _height = (_height == 0) ?  AccessibilityPropertiesExample.BUTTON_HEIGHT : _height;
            
        button = buildButton(_width, _height);
        label1 = buildLabel(_width, _height);
            
        addEventListener(Event.ADDED, addedHandler);
    }
        
    private function addedHandler(event:Event) :void {
        trace("addedHandler: " + name);
        var accessProps:AccessibilityProperties = new AccessibilityProperties();
        accessProps.name = this. _name;
        accessProps.description = description;
        accessibilityProperties = accessProps;
        removeEventListener(Event.ADDED, addedHandler);
    }
        
    private function buildButton(_width:uint, _height:uint) :SimpleButton {
        var child:SimpleButton = new CustomSimpleButton(_width, _height);
        addChild(child);
        return child;
    }

    private function buildLabel(_width:uint, _height:uint) :TextField {
        var format:TextFormat = new TextFormat();
        format.font = "Verdana";
        format.size = 11;
        format.color = 0xFFFFFF;
        format.align = TextFormatAlign.CENTER;
        format.bold = true;
            
        var child:TextField = new TextField();
        child.y = 1;
        child.width = _width;
        child.height = _height;
        child.selectable = false;
        child.defaultTextFormat = format;
        child.mouseEnabled = false;
            
        addChild(child);
        return child;
    }
        
    public function setLabel(text:String) :void {
        label1.text = text;
        this. _name = text;
    }
        
    public function setDescription(text:String) :void {
        description = text;
    }
}
    
class CustomSimpleButton extends SimpleButton {
    private var upColor:uint = 0xFFCC00;
    private var overColor:uint = 0xCCFF00;
    private var downColor:uint = 0x00CCFF;

    public function CustomSimpleButton(_width:uint, _height:uint) {
        downState = new ButtonDisplayState(downColor, _width, _height);
        overState = new ButtonDisplayState(overColor, _width, _height);
        upState = new ButtonDisplayState(upColor, _width, _height);
        hitTestState = new ButtonDisplayState(upColor, _width, _height);
        useHandCursor = true;
    }        
}

class ButtonDisplayState extends Shape {
    private var bgColor:uint;
    private var _width:uint;
    private var _height:uint;

    public function ButtonDisplayState(bgColor:uint, _width:uint, _height:uint) {
        this.bgColor = bgColor;
        this. _width = _width;
        this. _height = _height;
        draw();
    }

    private function draw() :void {
        graphics.beginFill(bgColor);
        graphics.drawRect(0, 0, _width, _height);
        graphics.endFill();
    }
}
}






 

코멘트가 추가되었을 경우, 메일로 받기. | 코멘트 리포트

현재의 페이지: http://flexdocs.kr/docs/flex2/langref/flash/accessibility/AccessibilityProperties.html