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