ExternalInterface.call() problem

Hi,
My first problem was the random activation of the pop up
blocker in Fierfox when I use navigateToURL("url", "_blank").
I found a solution
there,
but unfortunaly this solution didn't work for me.
The solution is to use ExternalInterface.call for opening a
new window without the popup blocker, but I cannot use the solution
if I don't put in my HTML page <param name="allowScriptAccess"
value="always" />. If I don't put this parametre I cannot use
ExternalInterface.call.
You'll say, why you don't put this parametre? It's because a
lot of person use this application, and they are able to integrate
it into there web site, unfortunaly I cannot control if they put
the parametre allowScriptAccess.
So I'd like to know if it's possible to use
ExternalInterface.call without the parametre.
Thanks
Matthieu

quote:
Originally posted by:
mattL_75_13
Nobody has an axe of search ??
I will trade you for a Sword of Reply

Similar Messages

  • ExternalInterface.call problem with object-orientation

    Hi
    I am using an swf inside a PDF. In a PDF-context the ExternalInterface-class works much the same as it does within a website. So far calling a function in the document-script works.
    The thing now is, that I really try to use an object-oriented approach as often as I can. In this case I have a function I could call using
    var jsCaller:Object = ExternalInterface.call("myFunction",parameters);
    This works as expected.
    However, I have now made that function a method in an object, so I can access it within JS using dot-notation: myCoolObject.myFunction(); This works as well, so the problem is not the function itself. However, the call
    var jsCaller:Object = ExternalInterface.call("myCoolObject.myFunction",parameters);
    does not work.
    This means there's either something I'm missing, or it's a limitation of ExternalInterface, or it's a limitation of externalInterface in a pdf-context.
    Anyone to enlighten me?

    If EI calls eval it should be able to resolve the object-path. However, this doesn't seem to be the case. Also note that my parameter is an array, so this probably wouldn't work, even if the syntax did.
    Anyway, I tested your syntax in my PDF, and it showed the same behaviour as before (i.e. the function in which the EI-call was placed could not be executed, and acrobat claimed there was no such function). It didn't work with my normal function, and not even with a simple console.println-statement that way. So in PDFs it definitely doesn't work like that.
    But thanks for the suggestion!

  • ExternalInterface.call problem calling Javascript

    I can't get work my SWF calling a javascript function in my
    web page (ASPX)
    this is the code that i use to show the SWF :
    function RunClip(idMap)
    var Larghezza = 1024;
    var Altezza = 768;
    var clip = "supervisore.swf?idMap="+idMap;
    var allowScriptAccess = "always";
    var allowNetworking = "all";
    document.write("<DIV id=\"flash\"
    style=\"z-index:2\">");
    document.write("<object name=\"flashObject\"
    classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" "+
    " codebase=\"
    http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\"
    "+
    " width=\""+Larghezza+"\" height=\""+Altezza+"\"
    align=\"middle\">");
    document.write("<param name=\"allowScriptAccess\"
    value=\""+allowScriptAccess+"\" />");
    document.write("<param name=\"allowNetworking\"
    value=\""+allowNetworking+"\" />");
    document.write("<param name=\"movie\"
    value=\""+clip+"\"/>");
    document.write("<param name=\"quality\"
    value=\"high\"/>");
    document.write("<param name=\"wmode\"
    value=\"opaque\"/>");
    document.write("<embed src=\""+clip+"\" quality=\"high\"
    width=\""+Larghezza+"\" height=\""+Altezza+"\" "+
    " align=\"middle\" play=\"true\" loop=\"false\" "+
    " type=\"application/x-shockwave-flash\" quality=\"high\" "+
    " allowNetworking=\""+allowNetworking+"\" "+
    " allowScriptAccess=\""+allowScriptAccess+"\" "+
    " pluginspage=\"
    http://www.macromedia.com/go/getflashplayer\"
    />");
    document.write("</object></DIV>");
    THIS IS ACTIONSCRIPT (title is always 'null')
    var title:String =
    ExternalInterface.call("JsFunction","test");
    THIS IS THE JAVASCRIPT function
    <head runat="server">
    <title>Test</title>
    <script language=javascript>
    function JsFunction(variable) {
    return variable;
    </script>.....
    <body onload="hide();" onclick="hidemenu();">
    <form id="form1" runat="server">
    <DIV id="outer" style="z-index:1">
    <script
    type="text/javascript">RunClip(1);</script>
    </DIV>......

    If EI calls eval it should be able to resolve the object-path. However, this doesn't seem to be the case. Also note that my parameter is an array, so this probably wouldn't work, even if the syntax did.
    Anyway, I tested your syntax in my PDF, and it showed the same behaviour as before (i.e. the function in which the EI-call was placed could not be executed, and acrobat claimed there was no such function). It didn't work with my normal function, and not even with a simple console.println-statement that way. So in PDFs it definitely doesn't work like that.
    But thanks for the suggestion!

  • Problem with ExternalInterface.call and Internet Explorer

    Hi, I´m developing a site, (
    www.gen-studio.com/avelart2
    ), and I´m using a swf to display a set of thumbs that when
    clicked show an item and its description on the browser, those
    items might be images or video, everything works fine with the
    images.
    And actually it works fine with the videos too, when using
    Firefox, but when I test the page on Internet explorer it just
    doesn’t work!
    On principle let me describe how it´s supposed to work,
    a thumbnail when clicked sends an id number to javaScript using
    ExternalInterface.call(“myFunction”,myId); -I´m
    using AS3 for the swf´s-
    the javaScript file has already loaded (ever since$(
    document).ready) a XML file which uses to match the id with a file
    and the description, if the item to show it´s a video, then it
    creates a variable which holds a string with the proper html to
    embed a swf (a swf movie player that resides just next to the HTML
    file), when loaded, the swf movie player uses
    ExternalInterface.call() to ask for the source of the video that
    has to play, and that function is as follows:
    setVideo: function(){
    alert("hola");
    return comun.miVideo;
    (The alert(“hola”); is just to test that the
    function is being called), which it is, but it returns null as a
    value instead of the proper string, and this happens only on
    internet Explorer, but works correctly on Firefox.
    I´ve been reading all day about the subject and found a
    few interesting things, which though have made me narrow my
    problem, they haven´t just provided me with a solution, what I
    found so far:
    -I must have in account flash security issues: Checked (my
    actionScript follows:)
    import fl.video.*;
    import flash.external.ExternalInterface;
    flash.system.Security.allowDomain("*");
    var vid:FLVPlayback = this.miPlayer;
    vid.source =
    flash.external.ExternalInterface.call("comun.setVideo");
    -ExternalInterface and Internet explorer don´t work
    properly when tested locally: Checked (I have a server on my PC and
    I´m testing the site as well in the above direction).
    -The object tag holding the swf must have a proper id
    attribute: Checked.
    -It´s super important the way the object tag is formed:
    Checked, and I also tested the tag separately (I put it directly in
    the HTML instead of adding it via javaScript) and it worked as
    expected in both Firefox and Internet Explorer, which leads me to
    believe:
    -I read somewhere that if you add the object tag by using
    innerHTML or appendChild, returning values from javaScript to swf
    won´t work, but I couldn´t find an explanation nor a
    solution.
    Well, as I said now I´ve been looking all day for an
    answer, so I really hope you can help me or give me some advice on
    the subject, thank you so much for your time!

    Hi! it solved itself !! (nahh, I wish), but it indeed had a
    solution, it was something quite simple, and I don´t really
    understand why it was not working in the first place, but here is
    the thing:
    I´m learning jquery and this is the first proyect
    I´m officially using it, so I was using
    $('#myDIV').append("string"); to embed the swf, (and it was working
    perfectly on Firefox), so since I had narrowed my problem to those
    lines, I decided to try some good-old-fashioned-javaScript and
    changed it for: var myDiv =
    document.getElementById('thatParticularDiv'); myDiv.innerHTML =
    ('string'); and it worked both in Firefox and IE !!!!!! :)
    I´m quite happy about it, and if someone knows
    what´s the issue with my jquery approach I would love to hear
    it. THANKS !!

  • Problem with AS3 "ExternalInterface.call" in InternetExplorer

    Hi,
    Explaining how the page is setup:
    I have a HTML page with 2 different AS3 Flash movies.
    The first flash movie is the main animation and sits in the
    middle of the screen with a large background image set into the
    body of the HTML.
    The second flash movie stretches 100% width/height of the
    screen dimensions and acts as a fade from black>to invisible.
    What I'm trying to do:
    Once the second Flash animation has faded from black to
    invisible it calls a JavaScript function in the HTML page to hide
    the div element the second flash movie is embed into (this is
    because the first flash movie will display a set of input boxes
    which the user needs to be able to type into - which they wont be
    able to click on if there is another flash movie overlaying the
    entire first movie).
    My intial solution:
    In the second Flash movie is the following code:
    stop();
    // this will load the API necessary to communicate with
    external entities
    import flash.external.ExternalInterface;
    // call the JavaScript function
    ExternalInterface.call('myJavaScriptFunction');
    ...and this works fine in Mozilla Firefox/Safari. The
    actionscript successfully calls the JavaScript function in the HTML
    page and that JavaScript function simply (at this stage displays an
    alert() message to show that it has been successfully called).
    Problem with IE:
    But, the moment I try this in Internet Explorer I don't get a
    alert() message but a JavaScript error message that says:
    Code: Select all
    Line: 1
    Char: 106
    Error: 'null' is null or not an object
    Code: 0
    As you can expect I'm totally confused as to what the problem
    could be.
    This is really urgent as it's a live project that needs to
    get completed immediately, so any help you may have would be
    greatly appreciated!
    Kind regards,
    Mark.

    My guess is that its to do with your embedding code. Check a)
    you have an id attribute assigned to the resulting object tag from
    whatever embedding method you use and b) for good measure make sure
    its unique in your html page.
    Javascript needs to have a valid reference to return the
    value from the javascript function back to flash. In my experience
    IE is more sensitive to issues here.
    If you get stuck post a test page somewhere.
    Tools to use to help with javascript debugging and view the
    html embed results (e.g. from swfobject or activecontent.js):
    In firefox : Firebug
    In IE: IE Developer Toolbar , Companion JS, and DebugBar are
    all helpful and , combined, get close to Firebug.

  • 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.call() does not work normally since flash player 11.8.800.168

    Problem Description:
    korean character crash when using ExternalInterface.call(funcName, args)
         funcName : alpha-numeric
         args : include korean characters
    Steps to Reproduce:
    <flex source>
    private function handleRequest(val):void {
         ExternalInterface.call("processRequest", "가나다라");
    <javascript source>
    function processRequest(param) {
         alert(param); //does not display korean characters
    Actual Result:
         媛&#128;?섎떎??
    Expected Result:
         가나다라
    Any Workarounds:
    Nothing !!
    OS : Windows7 Pro 64bit(korean)
    Flex Builder : 3.0
    Flash Player : 11.8.800.168 ActiveX
    Browser : IE10
    WAS : WebLogic 8.1, 12g, Tomcat 5,6,7
    Chrome : 29.0.1547.66 m <== Good
    FireFox : 23.0.1 <== Good

    Same problem here! With the exact same version.
    Problems on IE.
    Chrome and FF OK

  • Flash Player v. 9.0.115.0 broke my ExternalInterface.call

    The latest version of Flash Player has obviously broken my
    ExternalInterface.call, which works for all previous versions. I
    know that there are security changes in the latest version but by
    using the debugger provided it did not kick out any problems. By
    reading the
    article
    about the security changes, I couldn't find anything useful in
    to solve this.
    Please help me!
    Backend:
    import flash.external.ExternalInterface;
    private function getData():Void {
    if (ExternalInterface.available) {
    try {
    this.args = ExternalInterface.call("passData");
    output.text = "Values from ExternalInterface: "+this.args;
    } catch (e) {
    output.text = "A Security Error occurred : "+e.message+"\n";
    } else {
    output.text = "External interface is not available for this
    container.";
    Front end
    <script type="text/javascript" language="javascript">
    function passData(){
    var args = new Object();
    args.something1= 466;
    args.something2= 466;
    return args;
    </script>
    Output text on v.115 : Values from ExternalInterface:null
    Output text on pervious versions: Values from
    ExternalInterface: [Object]
    It is working perfectly fine in previous versions of Flash
    player, but after I upgraded to the latest version 9.0.115.0 the
    ExternalInterface returns null, I tested in other previous versions
    and it returns the object pass from the Javascript ok. Surely it is
    something to do with the latest version, it could be the security
    changes but I have no idea how to fix this and this is driving me
    crazy! : (
    Any heros could help me please? Thanks in advance!
    Jen

    Please continue to work with your support agent on this one..
    Also, please read:
    "Security changes in Flash Player 9"
    http://www.adobe.com/devnet/flashplayer/articles/fplayer9_security.html
    That should give you an understanding of the changes.

  • ExternalInterface.call URL string limit

    I am using ExternalInterface.call and i found out that
    recursive calling will not work .........and passing all the data
    in one call
    is also giving me a problem with string limits...........ANY
    IDEAS please?

    Yes. Make a function in JavaScript that uses the
    "GetVariable" method.
    (READ HERE:
    http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03. html
    ...and call it from the external interface. Put your 'string
    data content' in a variable and read it from JavaScript.

  • ExternalInterface.call String parameter length limit???

    Is there a String length limit to the amount of chars a
    String can contain when passed as a parameter to
    ExternalInterface.call()?
    Also, are there any chars that ExternalInterface.call()
    cannot serialize in a string?? Like \n, \t ...etc.
    The livedocs don't answer these questions.

    thanks for your reply but i just figured it out.
    ExternalInterface.call("jsFunc", longString);
    There is seems to be no char limit that i came across cause i
    was able to shove 2K in there.
    The problem is the newlines in the string, they must get
    messed up during serialization. Just make sure you clean the string
    of newlines like so:
    longString = longString.split("\r").join("
    ").split("\n").join(" ");
    ExternalInterface.call("jsFunc", longString);
    works fine......

  • ExternalInterface.call across domains?

    I'm using ExternalInterface.call in a swf file to call a
    javascript in the html container. The swf file is located in a
    different domain than the html container. Everything works fine if
    all files are within the same root directory, but as soon as I
    reference the swf file located in the other domain, the call stops
    working! What am I missing?
    swf file has this in frame 1:
    import flash.external.ExternalInterface;
    function clickListener(eventObj:Object):Void {
    ExternalInterface.call("sendToResponseForm");
    swf file has this on mc instance tracked as button:
    on(press){
    clickListener();
    html file/container has this in <head> tag:
    <script type="text/javascript">
    function sendToResponseForm(){
    window.location = "my.other.html.file";
    </script>
    html file has this embedded:
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
    width="700" height="550">
    <param name="movie" value="
    http://www.otherdomain.com/vid/my.SWFFile.swf"
    />
    <param name="quality" value="high" />
    <embed src="
    http://www.otherdomain.com/vid/my.SWFFile.swf"
    quality="high" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash" width="700"
    height="550"></embed>
    </object>
    Hopefully, that's enough for you to chew on. Like I said if
    swf and html are in the same domain, it works. Just as soon as I
    point to second domain for swf file source it stops working.
    thanks
    deke

    Here's my mistake -- the swf file was fine and actually
    worked in IE6/IE7 but wouldn't work in Firefox. The process of
    including the swf file in the HTML was flawed. I originally
    published the HTML using Dreamweaver to write the <object> in
    the code. What fixed the problem was I published the swf file using
    Flash to a desktop folder which produced a javascript file
    (AC_RunActiveContent.js), the swf file and the HTML. The javascript
    dynamically determines which browser was being used and which
    player plugin was required. The script ultimately loads/writes the
    embed or object for the swf file appropriately for the content
    environment and everything communicates properly. It didn't have
    anything to do with cross domain communication at all.
    The main challenge was updating the Flash HTML/Javascript to
    use the proper swf resource which was located on a different server
    and move the js file to the appropriate directory updating the link
    in the HTML accordingly. My only concern was the added overhead of
    an external javascript source. But, at least I'm not concerned with
    whether it works or not anymore.
    Hope this helps somebody.
    deke

  • I am an iphone4 user from United Arab Emirates with home button/MIC not working during call problems..

    hi, i am an iphone4 user from the United Arab Emirates. I got my phone as a gift last September and it was not bundled with any carriers and was a factory unlocked piece. Within one month of usage the home button started misfunctioning. It started registering double clicks as single, triple clicks, etc. (the usual complaint of many countless users of iphone from the time of the release.) I then kind of ignored this problem and continued using the phone.
    With this problem still continuing, comes another one.
    My friend gave me a call yesterday, and we were talking happily for a minute or so and suddenly without any reason my friend failed to hear me. Five minutes was spent trying to make myself heard to him. I tried and i tried and the only solution i could find was tapping the phone gently,but firmly. Then he was able to hear me but then after sometime it was back to the same problem.
    The only solution i found was to tap in th sides.(please note that this is also a common problem with many who have call problems but no voice memo problems.) I tried adding and registering my device to my account but when i try to put in my iphone's serial number,they say that the device number is invalid.
    Now i want to get a solution to this, but since this was a gift piece i do not have any invoice of any sort. I even checked itunes.com/support and was happy to find i still have warranty till september.
    I am confused as to what to do as I was dissappointed to find even a single apple store in the UAE and do not know what do we get in terms of support. Could someone please help me?

    that is exactly the problem. I have no idea as in where this phone originates from. It was gifted to my Dad from a personnel who he was supplying for in the company. My dad then gifted it to me on my birthday. I asked my dad about the phone but he also does not know a thing. He also said that the other guy must have taken the invoice with him as he did not give anything to my dad.
    I checked it in quite a few places (like SharafDG,eMax,Axiom etc., the local electronics suppliers) to track where this phone was originally purchased from( because these people usually take down the IMEI's of the electronic devices they sell), but they all could not help me.
    Now i have no idea what to do and i do not want to spend huge amounts of cash for this matter as i am already in the warranty period. Anyways,thanks for your help in advance, but it would be helpful if you could try to get this solved for me.

  • ExternalInterface Call Javascript Array to AS2 throwing undefined error

    I need to pass various (tracking) IDs to a .swf.  the IDs are in an array like this =
    <script type="text/javascript">
    function getImpID() {
    var medID={impID:'12345',pvID:'677890',exID:'654332'};
    return medID;
    function thisMovie(banner) {
        if (navigator.appName.indexOf("Microsoft") != -1) {
            return window[banner]
        else {
            return document[banner]
    window.onload=getImpID;
    </script>
    Right now the AS2 I have is:
    import flash.external.*;
    System.security.allowDomain(sourceDomain)
    var allID:String = ExternalInterface.call.apply("getImpID");
    function getIDs(){
              var impID:Number;
              var pvID:Number;
              var exID:Number;
              var id_arr:Array = allID.split(",");
        _root.id_test.text = impID;
    getIDs();
    Basically what I need is to split the three ID's from the javascript so that I can append them with various URL clickTags in the AS.  Main issue I have is the 'undefined' error, so I'm going out on a limb here that the AS2 I have doesn't do anything right now of value.  Biggest head scratcher for me is, if I have the IDs in an array in the javascript (medID) how to get them not only properly into Flash but to separate them into their separate IDs. 
    Any suggestions would be greatly appreciated.
    Thanks!

    Forgot to reply, your guidance helped in solving the riddle =
    actionscript:
    function idTag(){
              getID = Object(ExternalInterface.call("getImpID"));
              getID.toString();
      //_root.id_test.text = getID;
    idTag();
    javascript
    <script type="text/javascript">
    function getImpID() {
              var getID=['impID=8910424942498409873&pvID=8910423767061585831'];
              thisMovie("banner").getID;
              return getID;
    function thisMovie(movieName) {
        if (navigator.appName.indexOf("Microsoft") != -1) {
            return window[movieName]
        else {
            return document[movieName]
    </script>
    worked like a charm!

  • ExternalInterface.call('scroll',0,0) not working in chrome

    My application has a requirement that if the user is in the bottom of the page and clicks on any link which in turn opens a flex popup, it will take the user to the top of the application as popup opens on the top (as per requirement). For this i have used ExternalInterface.call('scroll',0,0); which works perfectly for every browser except google chrome. in chrome when user clicks it takes the user to the top but doesnt opens any popup, once user clicks on browser scrollbar and moves slightly then the pop up opens.
    Need a solution for this.
    Thanks in advance.

    Maybe chrome needs to get focus, if so instead of calling the scroll call
    another JS  function which scrolls and sets the focus on some html element in
    the browser. Not sure if it will work but you can give it a try.
    C

  • Nokia 6500 call problem

    Hello.
    I have owned a Nokia 6500 slide on the 3 network for just over a year now, it's a decent phone and I've had very few problems with it until recently. The current problem is that when I make or receive a call, there is no audio/volume. Once the call begins to ring or I answer, and it's connected, there is no volume. However, if I change it to loudspeaker, it can be heard perfectly normally as if it were played through loudspeaker (obviously). So in short, the "handset" option of the call is muted. I have checked the obvious thing such as settings and makings sure the call volume was high enough, but there is just no sound at all when on the handset setting of a call. To make a personal call I have to make it in loudspeaker and everyone can hear.
    I also had a problem wiht my contacts, and I downloaded the latest firmware and it fixed that problem. However, the loudspeaker call problem has remained. Usual searching hasn't sufficed, I appear to be the only one wiht this problem. Hopefully somebody can help me out here.
    Thanks in advance,
    Cams

    Take it to the nearest Nokia Care Point. Probably your speaker is damaged.
    Cheers,
    DeepestBlue
    5800 XpressMusic (Rock Stable) | N73 Music Edition (Never Say Die) | 1108 (Old and faithful)
    If you find any post useful, click on the Green "Kudos" Button on the left to say Thank You...

Maybe you are looking for

  • XI Server Malfunction:Errror in Receiver Adapter

    Hi all, We are facing a problem with the J2EE Engine of our XI server.No scenario is working,as the receiver adapter is not getting called. For every scenario,the sender adapter works fine,but I get the following error on the receiver side: <b>'HTTP

  • No music when i burn my slide show to dvd in idvd

    I selected the share to burn I slide show. This opened the idvd and transfered the info to it. I was able to burn a dvd, but the music did not transfer. I am not able to open and edit the drop box to add music. I dont know what to try. Thanks.

  • Can a JOIN be used instead of a UNION to obtain the Total Sales from B1?

    Hi Everyone, I am in the midst of writing a report which shows the 'Total Sales', 'Gross Profit', and 'Gross Profit %' by Sales Person. Traditionally I have used a UNION between two result sets to achieve this task. However I am wondering it if is po

  • EAN/UPC Table for materials

    Hi, Please help me to find the materials without the UPC/EAN code maintained in the Additional data of material master.I even tried with the table "MEAN",but this table only contains the data having maintained for the grid values of the materials. Pl

  • Adobe Reader is crashing

    I recently updated to Reader version 11.0.03. Since then, every time I try to open a PDF doc, Reader crashes after a few seconds. Yesterday I uninstalled and reinstalled it on my computer (which is less than 6 months old), but it's still crashing. An