Created
July 21, 2013 06:44
-
-
Save RKAN/6047741 to your computer and use it in GitHub Desktop.
Writing FlashVars to TextField
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
var tf:TextField = new TextField(); | |
tf.autoSize = TextFieldAutoSize.LEFT; | |
tf.border = true; | |
addChild(tf); | |
tf.x = 200; | |
tf.y = 200; | |
tf.multiline = true; | |
tf.height = 200; | |
tf.appendText("params:" + "\n"); | |
try { | |
var keyStr:String; | |
var valueStr:String; | |
var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters; | |
for (keyStr in paramObj) { | |
valueStr = String(paramObj[keyStr]); | |
trace(this, "flashVars->", keyStr, valueStr); | |
tf.appendText("\t" + keyStr + ":\t" + valueStr + "\n"); | |
} | |
} catch (error:Error) { | |
tf.appendText(error.toString()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment