SWFobject - how to automatically redirect

Sorry if this is an obvious question,

How can you use SWFobject to automatically redirect to another URL - DO NOT add href, but physically load another URL?

I am using SWFobject 2 at the moment.

- SWF object code ...

swfobject.embedSWF ("MYSITE.swf", "myAlternativeContent", "850", "700", "9.0.0", false, flashvars, params, attributes);

--- 2 tricks I tried in myAlternativeContent DIV ...

1...

    <div id="myAlternativeContent">
          <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.NOFLASHSITE.com">
    </div>

2 ...

    <div id="myAlternativeContent">
          <script language="javascript" type="text/javascript">
            window.location="http://www.NOFLASHSITE.com";
          </script>
    </div> 

--- Both of them download the alternative ( http://www.NOFLASHSITE.com ) independently.

any help appreciated - MW

+3
source share
1 answer

SWFObject API - :

<script type="text/javascript">
swfobject.addLoadEvent(function() {
    if (!swfobject.hasFlashPlayerVersion("9.0.18")) {
        window.location = "http://www.NOFLASHSITE.com";
    }
});
</script>

, script <head> html "9.0.18" -, .

+4

Source: https://habr.com/ru/post/1728398/


All Articles