Created
March 19, 2012 12:54
-
-
Save nowri/2111029 to your computer and use it in GitHub Desktop.
表示オブジェクトからgetQualifiedClassName使って、クラス名取得
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @see http://un-q.net/2010/02/new_class_as3_getqualifiedclassname.html | |
var a = getChildAt(0); // 参照があればなんでもおk | |
//どっちでもおk | |
//var className:String = describeType(a).@name; | |
var className:String = getQualifiedClassName(a); | |
var c:Class = Class(getDefinitionByName(className)); // これはクラスそのものなので、、これをaddChildしてもだめ。 | |
addChild(new c()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment