Kduks
홈
태그
미디어로그
위치로그
방명록
My Study/Flex
Flex 컨테이너 계열 우선순위
Kduks
2008. 12. 4. 10:12
반응형
컨테이너계열의 우선순위 설정 방법입니다.
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" autoLayout="false" backgroundColor="white"> <mx:Script> <![CDATA[ import mx.core.Container; import flash.display.DisplayObject; private function changeHighestDepth(container:Container, target:DisplayObject):void { container.setChildIndex(target, container.numChildren-1); //setChildIndex 함수(-1이 젤 위.. 0 1 2 3 요렇게) } ]]> </mx:Script> <mx:Panel id="pn" width="100" height="100" title="난 1번" fontSize="12" mouseDown="changeHighestDepth ( this, pn ); pn.startDrag( false, stage.getBounds (this) )" mouseUp="pn.stopDrag()" /> // changeHighestDepth ( this, pn ); 파라미터값 this에서 pn을 -1로 설정 <mx:Panel id="pn2" width="100" height="100" title="난 2번" fontSize="12" mouseDown="changeHighestDepth ( this, pn2 ); pn2.startDrag( false, stage.getBounds (this) )" mouseUp="pn2.stopDrag()" /> <mx:Panel id="pn3" width="100" height="100" title="난 3번" fontSize="12" mouseDown="changeHighestDepth ( this, pn3 ); pn3.startDrag( false, stage.getBounds (this) )" mouseUp="pn3.stopDrag()" /> </mx:Application>
--- 결과물
반응형
공유하기
게시글 관리
Kduks
저작자표시
변경금지
티스토리툴바
Kduks
구독하기