Created
September 20, 2010 02:29
-
-
Save icodeforlove/587353 to your computer and use it in GitHub Desktop.
This file contains 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
import flash.display.Loader; | |
import flash.display.LoaderInfo; | |
/* | |
* pull a var from the embed and return it, if there is no param matching the name | |
* return a default value | |
*/ | |
function getEmbedParam(name:String, defaultValue:String):String | |
{ | |
var parameters:Object = LoaderInfo(stage.loaderInfo).parameters; | |
if(parameters[name] != null && parameters[name] != "") { | |
return parameters[name]; | |
} else { | |
return defaultValue; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment