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