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/
참고:
http://etcs.ru/pre/FontLoaderDemo/
http://www.mokisystems.com/blog/flash-as3-loading-fonts/
problem solved
data: 2011.05.17
data: 2011.05.17
반응형
'Adobe Flash > Error Note' 카테고리의 다른 글
Flex SDK 4.5 Player Version Error ( FDT4 ) (2) | 2011.07.03 |
---|---|
Embed Image Meta Tag Error (0) | 2011.05.18 |
loaded: [object xxx__Preloader__] ? (0) | 2011.03.04 |
JQuery and SWFObject Error (0) | 2011.02.25 |
ExternalInterface.call not found browser Error (0) | 2011.02.01 |