일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- iphone
- AS3
- 게임
- XML
- sdk
- AIR
- 아이튠즈
- path
- file
- 영어
- 태그를 입력해 주세요.
- texture
- ios
- Game
- 경로
- builder
- 단축키
- smartfoxserver
- Build
- class
- 3d
- unity
- swf
- Ane
- Android
- unity3D
- flash builder
- Mac
- 배열
- Flash
Archives
- Today
- Total
상상 너머 그 무언가...
flash as3.0에서 객체의 depth 변경하는 방법 ( setChildIndex ) 본문
개발관련(Development)/플래시(Flash)
flash as3.0에서 객체의 depth 변경하는 방법 ( setChildIndex )
Clack 2012. 10. 4. 14:06예전 2.0 에서는 swapDepth 같은 메소드가 있어서 무비클립 속에 있는 객체들의 뎁스를 변경이 가능했었지만
3.0에서는 swapDepth 메소드는 존재하지 않는다.
그럼 어떻게 하면 될까?
parent.setChildIndex(
this
, parent.numChildren-
1
);
위와 같이 해주면 this 객체가 부모의 child들 중에서 가장 큰 인덱스 값을 가지게 되어서 화면상에 가장 위에서 그려지게 된다.
출처 : http://www.dzone.com/snippets/as3-swapdepths-equivalent