Skip navigation
Currently Being Moderated

ExternalInterface is not working?

Nov 19, 2013 11:09 PM

Tags: #error #not #working #as3 #in #chrome #is #call #addcallback #externalinterface #supporting #externalinterface.call

Hi all,

 

 

I have an issue with ExternalInterface.call, it's working fine in IE but not in Chrome I don't know why? is there any solution? please let me know. Bellow you can find the code. Thanks in advance.

 

 

AS Code:

______________________________________________

import flash.external.ExternalInterface;

 

var req:String
var msg:String

 

site_btn.addEventListener(MouseEvent.CLICK, gotowebsite)
function gotowebsite(event){
        req = "http://www.google.com/"


        if( ExternalInterface.available ) {
                 Security.allowDomain(req);
                 ExternalInterface.call( "downloadFileFromAS", req );
                 msg="good"
        }else{
                msg="error in ExternalInterface"
        }

 

      msg_txt.text=req
}

_____________________________________________

 

 

 

JS Code:

_______________________________________________

 

<script type="text/javascript">

 

     function downloadFileFromAS(_fileURL ) {

           window.open(_fileURL,"_blank");

     }

 

</script>

______________________________________________

 

 

 

Thanks and Regards

Santhosh Kumar M

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points