Actionscript Knowledgebase: How to pick up Flashvars in AS3?Actionscript below to pick up Flashvars passed to the SWF, and set a default if they're not found. In the examples below, the SWF would be embedded with filename.swf?p1=hello so the internal variable Xp1 would be set to "hello" if found or "default_value" if not. function getFlashVars():Object { var Xp1:String = getFlashVars().p1 || "default_value" As it was in AS2var Xp1 :String = _root.p1 || "default_value"; |
Site content Copyright © 2001-2014 Galaxy Graphics Limited. | Privacy Policy | Terms of use |