{"id":227,"date":"2009-03-22T07:00:52","date_gmt":"2009-03-22T14:00:52","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=1008"},"modified":"2009-03-22T07:00:52","modified_gmt":"2009-03-22T14:00:52","slug":"flashvars","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=227","title":{"rendered":"Flashvars"},"content":{"rendered":"<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\n\/\/ variable is passed into the swf via Javascript (most likely swfObject)\r\n\/\/ myswf.swf?myFlashVar=&quot;a new value&quot;\r\n\r\nvar myFlashVar:String = &quot;Some Default Value&quot;;\r\nif (root.loaderInfo.parameters.myFlashVar){\r\n   myFlashVar = root.loaderInfo.parameters.myFlashVar;\r\n}\r\n<\/pre>\n<p>Getting at flashvars in AS3 requires a bit more typing than it did in AS2. Above is a technique I find myself using from time to time. Usually for paths to xml or dynamic callouts (large buttons with text, an image and a link that change frequently).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/ variable is passed into the swf via Javascript (most likely swfObject) \/\/ myswf.swf?myFlashVar=&quot;a new value&quot; var myFlashVar:String = &quot;Some Default Value&quot;; if (root.loaderInfo.parameters.myFlashVar){ myFlashVar = root.loaderInfo.parameters.myFlashVar; } Getting at flashvars in AS3 requires a bit more typing than it did in AS2. Above is a technique I find myself using from time to time. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,94],"tags":[3,4],"class_list":["post-227","post","type-post","status-publish","format-standard","hentry","category-dynamic","category-misc","tag-actionscript","tag-flash"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/227","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=227"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/227\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=227"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=227"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=227"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}