Tell swf to check which page is loading on the switch to the correct page

Google has indexed my .swf file, so loading it by itself in the browser (example.com/FL_map_page.swf)

I need the .swf to check if it is loaded in the .html page and if not switch to the correct page.

0


a source to share


2 answers


You mean that someone has a hot link to your swf file, or it is simply loaded without a page? You can create a bridge with javascript to prevent swf from executing unless you load javascript from the page. You can also avoid using javascript and use flashvars created on your website (PHP or whatever) to do this check. You can try to redirect the browser to the page and just show the url on the page where it should be viewed in case the redirect fails.



0


a source


Check the URL of the page with ActionScript;



import flash.external.*;
var url;

function getURL() {
    url = ExternalInterface.call("window.location.href.toString");
}

      

0


a source







All Articles