Home > 웹 콘텐츠 신기술 제작기법 > 접근성 있는 Flex 제작기법 > Flex 애플리케이션 콘텐츠 구현 예 >
사용자 UI를 고려한 제작기법

배너에 포함된 모든 이미지는 toolTip, name 또는 description 필드를 이용하여 대체 텍스트를 제공하여야 한다. 아래의 그림은 4장의 이미지로 구성된 롤링 배너이다. Tab 키와 Shift + Tab 키를 이용하여 '이전보기버튼(<)', '이후보기버튼(>)'으로 초점이 이동한다. 각 버튼의 클릭 동작은 Space Bar로 동작한다. 초점이 '이후보기버튼'에 있을 때 Space Bar 키를 누르면 다음 이미지로 전환된다.
화면 낭독 프로그램이 설치되었을 때에도 Tab 키, Shift + Tab 키, Space Bar 키의 기능은 동일하여야 한다.
<mx:Style>
Application{backgroundColor:#FFFFFF; fontFamily: "verdana", "돋움체";
fontSize: 12;}
ToolTip{fontSize: 12; fontFamily: "verdana", "돋음";}
.preBtn {upSkin: Embed('/images/pre_over.png');
downSkin: Embed('/images/pre_down.png');
overSkin: Embed('/images/pre_over.png');}
.nextBtn {upSkin: Embed('/images/next_over.png');
downSkin: Embed('/images/next_down.png');
overSkin: Embed('/images/next_over.png');}
</mx:Style>
<mx:Script>
<![CDATA[/* image 롤링배너를 위한 메서드.*/
[Bindable] private var currentNum :Number = 0;
[Bindable] private var labelStr:String = ''
[Bindable] private var labelDesc:String = ''
/* 다음 배너를 조회하기 위한 function*/
private function nextHandler():void{
if(currentNum+1==imgAC.length){currentNum=-1;}
currentNum++;
if(img1.x==0){
img2.source=imgAC[currentNum].SOURCE;
img2.toolTip=imgAC[currentNum].DATA;
labelStr=imgAC[currentNum].DATA;
labelDesc=imgAC[currentNum].DESC;}
else{
img1.source=imgAC[currentNum].SOURCE;
img1.toolTip = imgAC[currentNum].DATA;
labelStr=imgAC[currentNum].DATA;
labelDesc=imgAC[currentNum].DESC;
}
moveRight();
}
/* 이전 배너를 조회하기 위한 function*/
private function preHandler():void{
if(currentNum-1==-1){currentNum=imgAC.length;}
currentNum--;
if(img1.x==0){img2.source=imgAC[currentNum].SOURCE;
img2.toolTip = imgAC[currentNum].DATA;
labelStr =imgAC[currentNum].DATA;
labelDesc =imgAC[currentNum].DESC;}
else{img1.source=imgAC[currentNum].SOURCE;
img1.toolTip = imgAC[currentNum].DATA;
labelStr =imgAC[currentNum].DATA;
labelDesc =imgAC[currentNum].DESC;}
moveLeft();}
/* 다음 배너를 이동시키는 function*/
private function moveRight():void {
if(img1.x == 0){move1.end();
move2.end();
img2.x = 285;
move1.xTo = -285;
move2.xTo = 0;
move1.play();
move2.play();}
else{img1.x=285;
move2.xTo = -285;
move1.xTo = 0;
move2.play();
move1.play();} }
/* 이전배너를 이동시키는 function*/
private function moveLeft():void {
if(img1.x == 0){move1.end();
move2.end();
img2.x = -285;
move1.xTo = 285;
move2.xTo = 0;
move1.play();
move2.play();}
else{img1.x=-285;
move2.xTo = 285;
move1.xTo = 0;
move2.play();
move1.play();} }
]]>
</mx:Script>
<mx:VBox width="100%" height='100%' creationComplete="nextHandler()">
<mx:Panel title="IMAGE 배너" height="75%" width="650"
creationComplete="nextHandler()" paddingTop="10"
paddingLeft="10" paddingRight="10" paddingBottom="10" >
<mx:HBox width="100%">
<mx:Canvas width="400" height="300">
<mx:Button x="10" y="30" styleName="preBtn"
click='preHandler();' toolTip="다음문항으로 이동합니다." width="17" height="90"/>
<mx:Canvas x="40" y="5" width="284" height="234" borderStyle="none"
horizontalScrollPolicy="off"
verticalScrollPolicy="off">
<mx:Image x='0' y='0' id='img1' source="images/001.jpg"toolTip="동대산
전경입니다."
width="284" height="235"/>
<mx:Image x='285' y='0' id='img2' source="images/002.jpg" toolTip="두로봉
전경입니다."
width="284" height="235"/>
</mx:Canvas>
<mx:Button x="350" y="30" styleName="nextBtn"
click='nextHandler();' toolTip="다음문항으로 이동합니다." width="17" height="90"/>
</mx:Canvas>
<mx:VBox borderStyle="solid" height="240" width="180" horizontalAlign="center">
<mx:Label id='lvl1' text="{labelStr}" fontWeight="bold"/>
<mx:Text htmlText="{labelDesc}" width="150" />
</mx:VBox>
</mx:HBox>
</mx:Panel>
</mx:VBox>
<mx:ArrayCollection id='imgAC'>
<mx:Object SOURCE="images/001.jpg" DATA="동대산 전경입니다."
DESC='높이 1,434m의 동대산은 북쪽의 두로봉, 동쪽의 노인봉 등과 함께 백두대간의 줄기를 이룬다.
... '/>
<mx:Object SOURCE="images/002.jpg" DATA="두로봉 전경입니다."
DESC='두로봉은 강원도 평창군 진부면과 홍천군 내면 및 강릉시 연곡면 사이에 있는 산으로 높이
1,422m이다. ...' />
<mx:Object SOURCE="images/003.jpg" DATA="비로봉 전경입니다."
DESC='적멸보궁은 부처님의 정골사리를 봉안한 곳이다. ...'/>
<mx:Object SOURCE="images/004.jpg" DATA="상왕봉 전경입니다."
DESC='백두대간은 힘찬 기세로 금강산, 설악산을 지나 대관령, 태백산, 소백산으로
이어지는데 ... '/>
</mx:ArrayCollection>
</mx:Application>
웹의 힘은 그것의 보편성에 있다. 장애에 구애없이 모든 사람이 접근할 수 있는 것이 필수적인 요소이다.
(The power of the Web is in its universality, Access by everyone regardless of disability is an essential aspect.)
팀 버너스 리 경 - 웹의 창시자 (Tim Berners - Lee , W3C Director and inventor of the World Wide Web)