{"id":185,"date":"2009-02-11T10:41:34","date_gmt":"2009-02-11T17:41:34","guid":{"rendered":"https:\/\/actionsnippet.com\/?p=764"},"modified":"2009-02-11T10:41:34","modified_gmt":"2009-02-11T17:41:34","slug":"is-this-swf-online","status":"publish","type":"post","link":"https:\/\/actionsnippet.com\/?p=185","title":{"rendered":"Is This swf Online?"},"content":{"rendered":"<pre class=\"brush: as3; title: ; notranslate\" title=\"\">\r\nprivate var _correctPath:String;\r\n\r\n\/\/.... somewhere a little later\r\n\r\n if (root.loaderInfo.url.split(&quot;http:\/\/&quot;).length == 1){\r\n\t\t_correctPath = &quot;http:\/\/www.mywebsite.com\/this\/is\/an\/absolute\/path\/&quot;;\r\n\t}else{\r\n\t\t_correctPath = &quot;&quot;;\r\n\t}\r\n<\/pre>\n<p>I like to do something like this when I&#8217;m working locally&#8230; it automatically tells my swf to use an absolute path for php files, xml files etc&#8230;. then, when I upload it, the LoaderInfo.url property contains an &#8220;http:\/\/&#8221; so it uses a relative path for all the external files. This is common especially if you don&#8217;t have php and mysql installed on your machine and need to test these using your server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>private var _correctPath:String; \/\/&#8230;. somewhere a little later if (root.loaderInfo.url.split(&quot;http:\/\/&quot;).length == 1){ _correctPath = &quot;http:\/\/www.mywebsite.com\/this\/is\/an\/absolute\/path\/&quot;; }else{ _correctPath = &quot;&quot;; } I like to do something like this when I&#8217;m working locally&#8230; it automatically tells my swf to use an absolute path for php files, xml files etc&#8230;. then, when I upload it, the LoaderInfo.url property [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94],"tags":[3,4],"class_list":["post-185","post","type-post","status-publish","format-standard","hentry","category-misc","tag-actionscript","tag-flash"],"_links":{"self":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/185","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=185"}],"version-history":[{"count":0,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=\/wp\/v2\/posts\/185\/revisions"}],"wp:attachment":[{"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/actionsnippet.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}