Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Zeke Sikelianos

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

AS3 FlashVars equivalent: LoaderInfo

// Add this to your package..
import flash.text.*;

// And throw this in wherever..
var t:TextField = new TextField();
t.autoSize = TextFieldAutoSize.LEFT;
t.border = true;
addChild(t);

t.appendText("params:" + "\n");
try {
var key:String;
var val:String;
var flashvars:Object = LoaderInfo(this.root.loaderInfo).parameters;
for (key in flashvars) {
val = String(flashvars[key]);
t.appendText("\t" + key + ":\t" + val + "\n");
}
} catch (error:Error) {
t.appendText(error);
}
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS