일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- file
- class
- 경로
- builder
- XML
- Ane
- 단축키
- flash builder
- 태그를 입력해 주세요.
- 영어
- 아이튠즈
- Android
- smartfoxserver
- swf
- 배열
- AIR
- texture
- unity
- 3d
- iphone
- Build
- ios
- path
- Mac
- unity3D
- AS3
- Flash
- Game
- sdk
- 게임
Archives
- Today
- Total
상상 너머 그 무언가...
패키지 내부 파일 로드하기 경로 본문
Source path에 assets 폴더를 추가했을 경우
assets 폴더 밑에있는 경로부터 URL에 입력
public class testClip extends Sprite { private var swfLoader: Loader; public function testClip() { super(); swfLoader = new Loader(); swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSwfLoaded ); var loaderContext: LoaderContext = new LoaderContext( false, ApplicationDomain.currentDomain, null ); swfLoader.load( new URLRequest( "guestLogin/guestLoginSkin.swf"), loaderContext ); } private function onSwfLoaded( e:Event ): void { trace("load Complete "); var btn: MovieClip = swfLoader.content[ "guestLoginBtn" ]; this.addChild( btn ); } }
src 폴더에 assets 폴더를 추가했을 경우
assets 폴더 부터 URL에 입력
public class testClip extends Sprite { private var swfLoader: Loader; public function testClip() { super(); swfLoader = new Loader(); swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onSwfLoaded ); var loaderContext: LoaderContext = new LoaderContext( false, ApplicationDomain.currentDomain, null ); swfLoader.load( new URLRequest( "assets/guestLogin/guestLoginSkin.swf"), loaderContext ); } private function onSwfLoaded( e:Event ): void { trace("load Complete "); var btn: MovieClip = swfLoader.content[ "guestLoginBtn" ]; this.addChild( btn ); } }