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