ExternalInterface is not working?

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

Change the value of "allowScriptAccess" param to "always" from "sameDomain" in the generated HTML, if you are testing your html from the local file system. If you host it on a webserver, this would not be required.
Take a look @ http://helpx.adobe.com/flash-player/kb/changes-allowscriptaccess-default-flash-player.html #main_DIAGNOSIS for more details.
-Dharmendra.

Similar Messages

  • Geturl or ExternalInterface does not work in Firefox 2.0

    This works in IE7:
    on (release) {
    var callJas:String = 'javascript:abrir_faleconnosco()';
    getURL(callJas);
    But when using the same html with flash in Firefox, the Flash
    never makes the call to the javascript function. I tried also with
    button_1.onRelease =function(){
    ExternalInterface.call("window.open","
    http://www.adobe.com", "win",
    "height=200,width=300,toolbar=no,scrollbars=yes");}
    But again works in IE7 but not in Firefox 2.
    In the publishing i changed the local playback security to
    access network only to see if it made any difference.
    Can any one help me?

    Is there any chance that you have Javascript disabled in
    Firefox?

  • ExternalInterface.call not working

    ***Flash CS4 -published to AS3.0 and Player  10***
    I am having a problem using ExternalInterface.call to a javascript  function. I have used this method many times in many places and at some  point during this project, it was working, but now it stalls my Flash  file when executed.
    I have the function:
    var initialize=function(){
    ExternalInterface.call("SCOInitialize");
    statusTxt.text="initializing";
    On my html page, there is a SCOInitialize function that works perfectly  if I call it via the html page:
    <body onLoad="SCOInitialize()">
    </body>
    When I make the call using flash...
    initialize();
    ...the Flash file just gets hung up and it actually wont execute the  second line of code in the function: statusTxt.text="initializing";
    What is the deal? I can't for the life of me figure out why it won't  work anymore!!!
    Also, I have checked to see if the ExternalInterface is available, and  it returns "true".

    I am testing locally using an HTML file that virtualizes an LMS. I have used is many times in the past. I originally used javascript that I normally create for these circumstances that always worked in the past, then switched to trying to use the Javascript that Flash created. In either case, the call to the Initialization function onLoad from the HTML page itself worked fine, both actually having different Function names, but perform the same function, while the ExternalInterface call to both fails.

  • ExternalInterface.addCallback() not working

    Ok, I have tried this both ways but can get no communication
    between AS and JS.
    I have tried it in IE7, FF2 and GC but to no avail.
    I'm exporting to FlashPlayer 8.
    In FF2 I get "f.setObjType is not a function".
    In IE7 I get "Object doesn't support this property or
    method".
    Any help is greatly appreciated...this is driving me nuts for
    a tiny little script.
    Thanks,
    Paul

    quote:
    Originally posted by:
    kglad
    i use AC_RunActiveContent.js in all my projects (unless i'm
    using swfobject) and i've never had a problem. you're just not
    using the correct code for callback.
    What exactly do you mean by "not using the correct code"?
    I tried a stripped down version and found there to be a
    cross-site policy issue caused by me using www and non-www, so
    after fixing that I got the stripped down version working. I then
    used the same code in my page and it didn't work.
    If you look here:
    http://gtra.org/vg_data/fileupload_gtra.html
    clicking the button checks to see what type of object the
    "supposed" function is, and you will see it returns "function"
    Now "practically" the same code here:
    http://www.gtra.org/site.php?comp_id=prof&cmd=view_page&user=1&page=3
    Clicking on the "upload" link where it says "Resume: view |
    upload" and we get an "undefined" value.
    The only real difference in these two area is that the first
    has the script and swf in the same folder, while the latter has the
    swf in the root folder and the script elsewhere, but then the
    script is rendered to the browser from a page in the root.
    Logically this makes no sense.
    ANY help is helpful right now as I am pulling my hair
    out.

  • ExternalInterface not working when swf file is embed inside a dynamically cloned DIV element.

    ExternalInterface not working when swf file is embed inside a dynamically cloned DIV element.
    It seems that flash movie is identifed as 'undefined' inside document.
    //a statically placed div
    var staticdiv=document.getElementById('PropDiv');
    //dynamically placed div with object tag
    var dynDiv =staticdiv.cloneNode( true );
    var xD=50;
    var yD=50;
    if(dynDiv)
    dynDiv.style.display  = "block";
    dynDiv.innerHTML="<object classid=" + "\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\"" + "codebase=" +
    "\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\"" + "width=" + xD + "height=" + yD +
    "id=" + "\"external\"" + "align=" + "\"middle\"" + ">" +
                    "<param name=" + "\"allowScriptAccess\"" + "value=" + "\"sameDomain\"" + "/>" +
                    "<param name=" + "\"movie\"" + "value=" + "\"external.swf\"" + "/>" +
                    "<param name=" + "\"quality\"" + "value=" + "\"high\"" + "/>" +
                    "<param name=" + "\"wmode\"" + "value=" + "\"transparent\"" + "/>" +
                    "<param name=" + "\"bgcolor\"" + "value=" + "\"#ffffff\"" + "/>" +
                    "<embed src=" + "\"external.swf\"" + "quality=" + "\"high\"" + "wmode=" + "\"transparent\"" +"bgcolor=" + "\"#ffffff\""
    + "width=" + xD + "height=" + yD + "name=" + "\"external\"" + "align=" + "\"middle\"" + "allowScriptAccess=" + "\"sameDomain\"" +
    "type=" + "\"application/x-shockwave-flash\"" + "pluginspage=" + "\"http://www.macromedia.com/go/getflashplayer\"" + "/>" +
                    "</object>";
       dynDiv.style.top=50;
       dynDiv.style.left=100;
    document.body.appendChild(dynDiv);
    In above situation communication is not establised when a  funtion which is retruning boolean is called from flash using
    ExternalInterfcae.call.The return value of this function is getting as false inside flash.But the value is true in javascript.
    if (navigator.appName.indexOf("Microsoft") != -1) {
       return window[movieName];
      } else {
       return document[movieName];
    window["external"] is returning as 'undefined'.
    Please give a  solution to solve this.

    Note that you have different file names for the object (images/banner.swf) and the embed (images/banner1.swf)
    You also placed the embed in the middle of a param tag and nested all param tags.
    Because you didn't include a MIME type and the object doesn't have a classid for an ActiveX control for IE, I'm not sure what Firefox will be using.<br />
    The object doesn't have a data attribute to specify the file.<br />
    A separate embed is only needed when you specify a classid in the object.
    <pre><nowiki><div class="bannercontainer">
    <object width="940" height="445" type="application/x-shockwave-flash" data="images/banner.swf" >
    <param name="wmode" value="transparent" />
    <param name="movie" value="images/banner.swf" />
    </object>
    </div></nowiki></pre>

  • External interface.call is not working

    hi, i am trying to call one java script function in
    actionscript by using External interface.call method. but its not
    working .can u pls tell me why this happend

    "angadala" <[email protected]> wrote in
    message
    news:gmpc58$g9p$[email protected]..
    > skill status.mxml
    >
    >
    > <mx:Script>
    > <![CDATA[
    > if (ExternalInterface.available) {
    > ExternalInterface.call(getDataFromXml);
    > }
    >
    > it is javascript
    > <script type="javascript">
    > var data = new Array();
    > data[0]=[1,2,3];
    > function getData()
    > {
    > return data;
    > }
    > </script>
    > </head>
    > <body>
    > <div id="SkillStatus">
    > <p>Alternative content</p>
    > </div>
    >
    > </body>
    > </HTML>
    >
    1) Your JavaScript function name and the function name you
    are calling
    don't match.
    2) On the Flex side, you are calling a JS function that I
    think you are
    expecting to return a value, but not assigning the result of
    the value to a
    function.

  • Facebook actionscript API not working with Flex 4.5 Mobile Project

    Will the following API work in a Flex 4.5 mobile project?
    http://code.google.com/p/facebook-actionscript-api/
    I tried a simple Facebook.int() and I keep getting the following error...
    Error: Error #2067: The ExternalInterface is not available in this container. ExternalInterface requires Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime.
    at Error$/throwError()
    at flash.external::ExternalInterface$/addCallback()
    at com.facebook.graph::Facebook/init()[C:\Users\MikeHunt\Work\facebookGraphApi\api\com\faceb ook\graph\Facebook.as:599]
    at com.facebook.graph::Facebook$/init()[C:\Users\MikeHunt\Work\facebookGraphApi\api\com\face book\graph\Facebook.as:165]
    at views::LoginView/init()[/Users/edgar/Documents/Adobe Flash Builder 4.5/socialMessenger/src/views/LoginView.mxml:15]
    at views::LoginView/___LoginView_View1_initialize()[/Users/edgar/Documents/Adobe Flash Builder 4.5/socialMessenger/src/views/LoginView.mxml:3]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\co re\UIComponent.as:13128]
    at mx.core::UIComponent/set processedDescriptors()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UIComponent .as:1871]
    at mx.core::UIComponent/initializationComplete()[E:\dev\4.5.1\frameworks\projects\framework\ src\mx\core\UIComponent.as:7660]
    at mx.core::UIComponent/initialize()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7639]
    at spark.components::View/initialize()[E:\dev\4.5.1\frameworks\projects\mobilecomponents\src \spark\components\View.as:990]
    at views::LoginView/initialize()
    at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAdded()[E:\dev\4.5.1\frameworks\projects\ framework\src\mx\core\UIComponent.as:7485]
    at mx.core::UIComponent/addChildAt()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\ UIComponent.as:7189]
    at spark.components::Group/addDisplayObjectToDisplayList()[E:\dev\4.5.1\frameworks\projects\ spark\src\spark\components\Group.as:2037]
    at spark.components::Group/http://www.adobe.com/2006/flex/mx/internal::elementAdded()[E:\dev\4.5.1\frameworks\project s\spark\src\spark\components\Group.as:1628]
    at spark.components::Group/addElementAt()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\c omponents\Group.as:1387]
    at spark.components::Group/addElement()[E:\dev\4.5.1\frameworks\projects\spark\src\spark\com ponents\Group.as:1345]
    at spark.components::SkinnableContainer/addElement()[E:\dev\4.5.1\frameworks\projects\spark\ src\spark\components\SkinnableContainer.as:761]
    at spark.components::ViewNavigator/createViewInstance()[E:\dev\4.5.1\frameworks\projects\mob ilecomponents\src\spark\components\ViewNavigator.as:1954]
    at spark.components::ViewNavigator/commitNavigatorAction()[E:\dev\4.5.1\frameworks\projects\ mobilecomponents\src\spark\components\ViewNavigator.as:1867]
    at spark.components::ViewNavigator/commitProperties()[E:\dev\4.5.1\frameworks\projects\mobil ecomponents\src\spark\components\ViewNavigator.as:1236]
    at mx.core::UIComponent/validateProperties()[E:\dev\4.5.1\frameworks\projects\framework\src\ mx\core\UIComponent.as:8209]
    at mx.managers::LayoutManager/validateProperties()[E:\dev\4.5.1\frameworks\projects\framewor k\src\mx\managers\LayoutManager.as:597]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\4.5.1\frameworks\projects\frame work\src\mx\managers\LayoutManager.as:783]
    at mx.managers::LayoutManager/doPhasedInstantiationCallback()[E:\dev\4.5.1\frameworks\projec ts\framework\src\mx\managers\LayoutManager.as:1180]

    This is the error because the runtime does not find any way to call Java script that usally is called through External interface. So my guess is you are using a AIR project. U just need to download the latest swc http://code.google.com/p/facebook-actionscript-api/downloads/list for destop in your case and don't forget to but FBJSBridge.js to put in your source that will b used to help AS call Facebook API from AIR runtime
    Hope it make some sense
    Piyush Negi

  • IE/ExternalInterface do not return any value if movie added with appendChild

    There is a problem with IE/ExternalInterface if movie is added to DOM f.ex appendChild. JavaScript functions are called but they do not return any value.
    MS first response was that this is 3rd party/Adobe problem.
    Fixing this with innerHTML is not the solution. Using here Any suggestions ?
    Simplified test case has
              var flashMovie = '<OBJECT id="testId" codeBase="http://fpdownload..
              // Works in IE and FF
              document.getElementById("testdiv").innerHTML = flashMovie;
              // ExternalInterface.call calls JS but does not return value in IE. Works in FF
              var tempDiv = document.createElement("div");   
              tempDiv.innerHTML = flashMovie;
              document.body.appendChild(tempDiv);
    Here is complete code
    http://pastebin.com/fbc0aa9a
    Here is AS3 code in for ajax.swf
    http://pastebin.com/d4efd47b
    -H

    You are right about that duplicate id of the movie in this example, but that is not case here.
    I appreciate if you try this and confirm that problem exist or any work-around.
    Here is more explanation to original post:
    In HTML is JavaScipt
    function fromJs()
         return "text from js..";
    that is called from AS3
    var s = ExternalInterface.call("fromJs");
    This "s" value and also ExternalInterface.objectID are null in AS3.
    Here example again only with non-working case without that duplicate id with innerHTML
    http://pastebin.com/f4e33af93
    and also movie with AS3 code is attached.
    Using plain innerHTML this case works
    document.getElementById("testdiv").innerHTML = '<OBJECT..
    and with appendChild does not work
    var tempDiv = document.createElement("div");
    tempDiv.innerHTML = "<OBJECT ..
    document.body.appendChild(tempDiv);

  • Javascript calls via getURL not working anymore

    After upgrading to flash player 9,0,115,0 a simple call like
    getURL("javascript(alert'message')); doesn't work anymore on
    Internet Explorer (it fails without any error in policyfiles.txt,
    but it still work on Firefox). My IE version is 7.
    I can't use ExternalInterface 'cause i need to publish as
    Flash Player 7 AS2.0.
    Any comment or suggestion?

    I have a similar problem. When running a local HTML file,
    using IE7 and FP 9,0,115,0, all the getURL function calls cease to
    work.
    If I downgrade to FP8, still using IE7, everything works.
    If I downgrade to IE6, still using FP9.0.115.0, everything
    works.
    If I load the HTML via HTTP (instead of local), using IE7 and
    FP9.0.115.0, everything works.
    If I use Firefox, with FP9.0.115.0, everything works.
    So, the function calls fail only when the swf is contained on
    a
    local HTML file, using
    IE7, and
    FP9.0.115.0. The problem is, most of our customers have that
    software profile, and all of them need to load the content locally
    (its very heavy for network transmission).
    All the getURLs are like this:
    getURL("javascript:someFunction()");
    We're setting the 'allowScriptAccess' to 'always'.
    Also, if we put the OBJECT tag inside the HTML (instead on an
    external JS file), the function calls still do not work.

  • Fscommand and swf in web browser not working

    Hi,
    I am trying to open one flash projector exe file from web browser swf file but it is not working.
    When I tried calling the fscommand("exec", "myapplication.bat") and fscommand("exec", "myapplication.exe") from projector exe flash file then it works fine.
    I just want to know the supportabilities of fscommand in as3 using Flash Proffessional CS5.
    Please suggest.
    Best regards,

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/package.ht ml
    The line that matters: None of the commands are available in web players.
    On the web use ExternalInterface to run JavaScript on the page - not sure you'll have much luck with exec though.

  • Not work tablet UI on Prestigio 5080 PRO tablet

    I read that browser.ui.layout.tablet = "1" can fix this problem. But it not works. I can work only in pnone interface that is not good for my 8'' tablet.

    Would it be possible for you to share the problematic pdf and OS information  with us at [email protected] so that we may investigate?
    Thanks,
    Adobe Reader Team

  • Why self-defined access sequences of free goods can not work?

    Hi gurus,
    I have maintained access sequences of free goods self-defined.but when i creat the SO it does not work!
    when i used the standard access sequences ,it is OK .
    Can anybody tell me why?
    thanks in advance

    Dear Sandy,
    Go to V/N1 transaction select your self defined access sequence then go in to the accesses and fields and check all fields are activated.
    Make sure that these fields are flowing in your sales order.
    I hope this will help you,
    Regards,
    Murali.

  • Adobe bridge raw not working with windows vista in photoshop cc, why?

    adobe bridge raw not working in photoshop cc, is there a fix?

    Your sure your using photoshop cc on windows vista?
    I was under the impression that photoshop cc would not even install on windows vista.
    What version of camera raw do you have?
    In photoshop under Help>About Plugin does it list Camera Raw and if so which version is it?
    (click on the words Camera Raw to see the version)
    Camera raw doesn't work if it's a camera raw file or some other file type such as jpeg or tif?
    What camera are the camera raw files from?
    Officially camera raw 8.3 is the latest version of camera raw that will work on windows vista.

  • Adobe Bridge CS5 in windows 7 not working?

    Adobe Bridge CS5 in windows 7 not working. I was using bridge perfectly for last 2 years. It stops working since 3 days. I tried to install updates. Showing some error to install.
    Tried to install creative cloud..again some error. Error code : 82
    Could you please advice how I can fix my adobe bridge.

    https://www.youtube.com/watch?v=xDYpTOoV81Q&feature=youtu.be
    please check this video I uploaded..this is what happens when I click adobe bridge.. just blinks and go off. bridge not working on task manager

  • ADOBE CLOUD ON MY DESKTOP WILL NOT WORK. IT LOADS UP BUT NOTHING FILLS THE WINDOW

    ADOBE CLOUD ON MY DESKTOP WILL NOT WORK. IT LOADS UP BUT NOTHING FILLS THE WINDOW

    BLANK Cloud Screen http://forums.adobe.com/message/5484303 may help
    -and step by step http://forums.adobe.com/thread/1440508?tstart=0
    -and http://helpx.adobe.com/creative-cloud/kb/blank-white-screen-ccp.html

Maybe you are looking for

  • Oracle 8i database data recover problem

    Hi hi, I've recently encountered a problem on how to restoring data from old oracle folders to a new oracle 8i database. Originally, my oracle 8i was installed in windows 2000 server on a harddisk (J:\oracle old) separated from that the OS (windows 2

  • I completed a System Restore on my iPhone 3g and itunes screwed up (URGENT)

    I was having major technical issues involving really bad lag and random blackouts. So, I tried to do a system restore. Before itunes would let me do anything, I was required to do an update. After I updated, I proceeded to do the system restore. Fina

  • Slide Show video exports from Macs to Windows

    I work on a Mac.  When I export a Slide Show as Video anyone with a mac has no problem viewing it.  my windows friends however can't open it.  any suggestions?

  • Cash Discount for  early  realisation of  dues-reg

    Hello Friends, I require your  help to config the following  in SAP. It goes like this. Invoice is raised on the dealer  for the product  sold.  As an incentive, to realise the  money  early, cash  rebate is offered to them, if they pay within a peri

  • JTextField array help

    Hey guys, I'm working on a java GUI right now and I've come up with a problem, hopefully you guys can help. I have a page that contains 50 text fields in 2 columns, so instead of making 50 lines of text field code, I decided to make an array of text