/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static function checkAlias(obj:Object):void { var cname:String = getQualifiedClassName(obj); cname = cname.split("::").join("."); try { getClassByAlias(cname) } catch (e:Error){ registerClass(obj); } } public static function registerClass(cls:*):void { var cname:String = getQualifiedClassName(cls); var cname_fixed:String = cname.split("::").join("."); if (!(cls is Class)){ cls = getDefinitionByName(cname); } registerClassAlias(cname_fixed, cls); }
URL: http://friendfeed.com/away4m