Using external font assets (.SWF) Error

Adobe Flash/Error Note 2011. 5. 16. 14:38
반응형


package {
import flash.text.Font;
import flash.events.Event;
import flash.net.URLRequest;
import flash.display.Loader;
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;

/**
* @author Jang sang wook ( smilejsu@nate.com )
* @version 1.0
* @date 2011. 5. 16.
*/
public class FontLoader extends EventDispatcher {
private var _loader:Loader = new Loader();
public function FontLoader(target : IEventDispatcher = null) {
super(target);
}
public function load($url:String):void{
_loader.load(new URLRequest($url), null);
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
}

private function onLoaded(event : Event) : void {
_loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, onLoaded);
var font:Class = _loader.contentLoaderInfo.applicationDomain.getDefinition("Yun330") as Class;
trace(font);
Font.registerFont(font);
}
}//class
}//package 


참고:
http://etcs.ru/pre/FontLoaderDemo/
http://www.mokisystems.com/blog/flash-as3-loading-fonts/

problem solved
data: 2011.05.17

전역 보안 설정 패널 

반응형
: