일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- Flash
- sdk
- 아이튠즈
- 단축키
- 태그를 입력해 주세요.
- texture
- builder
- XML
- 게임
- class
- unity
- ios
- AS3
- 경로
- 3d
- path
- Build
- AIR
- smartfoxserver
- Android
- 영어
- Mac
- iphone
- file
- Game
- 배열
- unity3D
- Ane
- swf
- flash builder
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 ); } }