javascriptflashfla

SWF file has embedded link, how to work around it?


I have a SWF banner file that I wish to place at the top of my testing Wordpress website

Here it is if you want to view it: http://www.fastswf.com/H4BGBkQ

I do not have access for to FLA files, so I cannot go in and change the Actionscript if there is any.

Is there a way that I could overwrite the link with Javascript?

I have tried using a simple anchor HTML tag to link it, although, it goes to: http://mydomain.com/undefined

I have also tried using onclick with Javascript, although the same problem occurs.

Any suggestions?

Thanks in advance!


Solution

  • I managed to fix it by overlaying a div ontop of it, like so:

    <div align="center">
    
    <div id="example" align="center" style="width:900px; height:90px; position:absolute;
    cursor:pointer;" ></div>
    
    [kml_flashembed movie="http://mydomain/728x90.swf" height="90" width="728" /]
    
    </div>
    
    <script type="text/javascript">
    document.getElementById("example").onclick = function() {
    window.open("http://www.foo.com/"); 
    }
    </script>
    

    I am using a flash plugin (as per the shortcode) on my site.