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!

Similar Messages

  • Using AS2 to Call JavaScript w/ External Interface: What Am I Doing Wrong?

    I am trying to trigger a JavaScript fuction from inside a
    Flash 8/AS2 movie created by my coworker. The JS function is called
    disappear(), which is meant to close the DIV that contains the
    flash movie itself.
    I know the JS works in all my target browsers - it's been
    tested already. Now I need working ActionScript. The ActionScript
    I've been studying is 3.0 so the fact that this task must be
    accomplished in AS2 makes it that much harder for me; I know very
    little about the way Flash Virtual Machine 1 works so I don't know
    where to begin with the code.
    I would like to implement this one of two ways:
    Preferred Method: I'd like to create an AS file that I can
    send to my coworker for inclusion in his FLA along with any code
    necessary for linking the button instance to the class in the AS
    file (don't think code is necessary; linkage done during
    right-click on library panel, right?)
    Alternative Method: I'd like to send my coworker text that he
    can simply drop into the first frame in the movie to make it go.
    I started out trying to call the javascript with on(press) {
    getURL("avascript:myFunction"); }, which worked in Firefox but not
    in IE6 or 7. Then I read over the tutorial here:
    http://www.adobe.com/devnet/flash/articles/external_interface_print.html
    and switched to using ExternalInterface.call() instead. That's
    where I am now. My brain is hurting trying to dig up answers for
    AS2 without reference materials... You are my best hope.
    Please help me make sense of this ActionScript 2.0 code with
    one of the prefered methods above. I am away from my copy of Flash
    8 - I'm using FlashDevelop here at work - so I'd appeciate if you
    could test any suggestions you make before you make them - unless
    you are a Flash genius who I should not be questioning :) I've
    provided the HTML/JS code; all you have to do is make a 500x300 SWF
    and put a button instance in it.
    ----------------------------------------The attempt at
    ActionScript 2.0 (don't
    laugh)----------------------------------------
    import.flash.external.ExternalInterface;
    class JsCallerButton {
    private var _caller_btn:Button;
    //Constructor
    public function jsCallerButton():Void {
    this._caller_btn:Button = new Button();
    this._caller_btn.addEventListener("click", clickHandler);
    //Event handler for event set in class constructor
    function clickHandler(eventObj:Object):Void {
    ExternalInterface.call("disappear");
    ----------------------------------------The
    HTML/JavaScript----------------------------------------
    <html>
    <head>
    <script>
    var timeout;
    function appear(){
    var the_style = getStyle("floatingflash");
    if (the_style) {
    var current_top = parseInt(the_style.top);
    var new_top = current_top + 5;
    if (document.layers) {
    the_style.top = new_top;
    } else {
    the_style.top = new_top + "px";
    if (new_top < 150) {
    the_timeout = setTimeout('appear();',10);
    } // appear
    function disappear() {
    var the_style = getStyle("floatingflash");
    the_style.display = 'none';
    } // disappear
    function getStyle(ref) {
    if(document.getElementById &&
    document.getElementById(ref)) {
    return document.getElementById(ref).style;
    } else if (document.all && document.all(ref)) {
    return document.all(ref).style;
    } else if (document.layers && document.layers[ref]) {
    return document.layers[ref];
    } else {
    return false;
    } // getStyle
    </script>
    <style>
    #floatingflash {
    position:absolute;
    border:1px solid red;
    background:white;
    </style>
    </head>
    <body onload="appear();">
    <div id="floatingflash"
    style="top:-400px;left:-150px;margin-left:50%;">
    <!--This 'X' link is for manual calls to the function that
    should be triggered from inside Flash-->
    <a href="javascript:disappear();">X</a>
    <p>  </p>
    <p>
    <object
    classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
    width="500" height="300" title="Hover Ad">
    <param name="movie" value="
    http://------------------------------/500x300.swf"
    />
    <param name="quality" value="high" />
    <embed src="500x300.swf" quality="high" pluginspage="
    http://www.macromedia.com/go/getflashplayer"
    type="application/x-shockwave-flash" width="500"
    height="300"></embed>
    </object>
    </p>
    <p><a
    href="launch.html">Back</a></p>
    </div>
    </body>
    </html>

    Thank you for your response. The drives are in fact different letters -- I changed the drive name to correspond the original drive letter...but that doesn't seem to have fixed the problem.
    Where I seem to stand is:
    Old computer (with iTunes library) + external hard drive (with iTunes music) work just fine.
    New computer -- iTunes library copied from old computer, iTunes music folder identified in iTunes, but iTunes can't find the music.
    At this point, am I better off starting from scratch with the new computer (in terms of installing iTunes and moving my library over from my old computer)?
    And if so, what would be the best way to approach this?
    Thanks much.

  • ExternalInterface.call Causes JAVASCRIPT ERROR??

    my AS3.0 is this:
    btn_mc.addEventListener(MouseEvent.CLICK,journey_popup);
    function journey_popup(e) {
    ExternalInterface.call("journey_wow_popup");
    my javascript is this:
    function journey_wow_popup () {
    window.open('journey_pricing.php','_blank',
    'height=200,width=350,status=yes,toolbar=no,menubar=no,location=no');
    My flash OBJET ID and movie name is "journey_wow"
    I get this javascript error when I click btn:
    Error: "journey_wow" is undefined
    I tried this on 4 computers, I never get the the error in FF,
    I got the error on 2/4 of the computers in IE and didnt get the
    Error in the other 2.
    So sometimes it works in IE and sometimes it doesn't. Also my
    flash element is not in a form.
    you can view it here:
    http://www.sussexjewelers.com/product.php?pid=1390
    (its the big red box with yellow star)
    Please help!!
    Thanks!

    Below is my embeding script, thanks.
    <script language="javascript">AC_FL_RunContent =
    0;</script>
    <script src="AC_RunActiveContent.js"
    language="javascript"></script>
    <script language="javascript">
    if (AC_FL_RunContent == 0) {
    alert("This page requires AC_RunActiveContent.js.");
    } else {
    AC_FL_RunContent(
    'codebase', '
    http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
    'width', '626',
    'height', '115',
    'src', 'journey_wow',
    'quality', 'high',
    'FlashVars',
    'journey_price=<?=round($prod_field['prod_price'][0])?>',
    'pluginspage', '
    http://www.macromedia.com/go/getflashplayer',
    'align', 'middle',
    'play', 'true',
    'loop', 'true',
    'scale', 'showall',
    'wmode', 'transparent',
    'devicefont', 'false',
    'id', 'journey_wow',
    'bgcolor', '#ffffff',
    'name', 'journey_wow',
    'menu', 'true',
    'allowFullScreen', 'false',
    'allowScriptAccess','always',
    'movie', 'journey_wow',
    'salign', ''
    ); //end AC code
    </script>

  • 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!

  • Calling Javascript by ExternalInterface advances playhead?

    HI,
    I'd like to call Javascript function by ExternalInterface while a flash movie is playing. I actually could call a function but the movie looked faster than the expected framerate. It looked like the playhead advanced everytime I called the function.
    After some trials, it seems like...
    Playheads in all MovieClips advances when I call Javascript function by  ExternalInterface.call().
    The playhead advances only while the movie clip is playing. Once it is  stopped, it'll not be advanced until it is played again.
    I made an simple example and attached it to this post so that you can see what I mean.
    The attached file contains an fla file which counts up number from 1 to 5 and is played at 0.5 fps, that is, moves to the next frame every 2 seconds. And there is a button titled "Call JS" which calls a blank Javascript function, which does nothing. If you open the html file, you'll see the number counted up slowly but advanced by one or two frames when you click the button.
    Please look at the first frame of 'action' layer and the js file, if you'd like to see what I did for this with ActionScript and Javascript. You'll see the number not counted up even when you click the button, as I  mentioned above, if you add stop(); at the end of the AS code.
    I'm using Flash CS4 on Mac OS X 10.6. The web browsers are Safari 4.0.4 and Firefox 3.6, and the version of flash player is MAC 10.0.45.2.
    I wonder I'm doing anything wrong or this is the way I shouldn't do. Has  anyone experienced something like this?
    Any help will be much appreciated. Thanks in advance.

    i don't see a problem except the op seems confused.  i'm not sure why (or even if) he expects the playhead to stop when there's no code to stop it.
    anyway,
    1.  the attached files contain no stop().  once added, the playhead stops, as expected.
    2.  there's no doNothing js function.  once added, it executes, as expected.
    3.  the attached files behave, as expected.

  • Calling javascript with ExternalInterface in Flash 8

    Guys,
    I have a flash movie with a button. When the user clicks the
    button I would like the movie to call a javascript function in the
    host page. I have the button on screen. The timeline section shows
    the 'up', 'over', 'down' and 'hit' states, then in the middle is an
    image of the button. I click on it and in the box below I enter the
    following:
    quote:
    import flash.external.ExternalInterface;
    function dosomething():Void {
    ExternalInterface.call("foo");
    button_blip.addEventListener("click",
    mx.utils.Delegate.create(this, dosomething));
    At this stage, I just want to see a javascript alert to show
    that this is working, but at the moment nothing happens at all..
    the javascript function in the host document looks like this:
    quote:
    <script language="javascript">
    function foo(){
    alert("abababab");
    </script>
    Can anybody spot what's missing here? I'm using Flash 8 which
    comes with the ExternalInterface API rather than the apparently bad
    and buggy fscommand in earlier flash versions.
    thanks
    christo
    note:
    I have since moved that bit of actionscript to the first
    frame of that layer in the main movie screen - because the AS
    debugger said that it has to be on a clip event - the end result
    however is no different.

    if I understand correctly you need to import the external
    API.
    import.flash.external.*;
    the calls to the api are only available within the timeline
    frame in which the above code exists ..

  • Calling Javascript function in setOnBlur is throwing error

    Hi ,
    I have a requirement to open a popup window using javascript.I have tried to achieve this using the following code in the PR of that extended CO.
    StringBuffer l_buffer = new StringBuffer();
    StringBuffer l_buffer1 = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    l_buffer1.append("/xxmas/oracle/apps/asn/custom/oppnameval/webui/XXMASNewOppPG");
    l_buffer1.append("&amp;retainAM=Y");
    String url = "OA.jsp?page=";+l_buffer1.toString();
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
    pageContext.putJavaScriptFunction("testonblur",l_buffer.toString());
    OAMessageTextInputBean mcb1 =
    (OAMessageTextInputBean)webBean.findChildRecursive("ASNOpptyCrteNm");
    mcb1.setOnBlur("testonblur");
    but while i am trying to open the page for the first time it is trying to open the javascript page as per the above coding and throwing "You have insufficient privileges for the current operation. Please contact your System Administrator. " error.
    Please suggest if i need to set any profile option to fix this issue.
    I also want when the page will be loaded for the first time this javascript window will not be opened rather it should open when i will enter some value in the textinput bean (mcb1 in the above code) and will tab out of that field(i.e. when the textinput bean will loose focus).
    Please note i can't use PPR to achieve the above functionality since client specifically wants this javascript and onblur API to be used.
    Please help me out... this is an urgent requirement.
    Thanks
    Subha

    Hi  Marcin,
    Thankyou for your quick reply.
    It is server side scripting only. but i have already chekced the link which u sent me. i did not find anything realted ... we are not able to debug the issue?
                This is the place where it is throwing the error:
           var lv_pct=`FREM-TBR_PCT[j]`
                       if (parseInt("`lv_pct`") == `i`)
    is the syntax of the code is correct?
    Do you want me to send the whole code to you?
    Also please tell me if there any way to debug the javascripts  for this IAC applications.
    Thanks & Regards,
    Kavitha.

  • 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 !!

  • A swf in an iFrame calling javascript function on Parent page

    I have a .swf that has to load in a iFrame and needs to call a browser cookie javascript function that lives on the parent page that loads the iFrame.
    I'm using this:
    ExternalInterface.call("javascriptFunction");
    but of course this call is not making it to the Parent page javascript function.  Is this possible to do?
    Thanks!

    The parent page has the javascript function, and has a iFrame that loads the swf.  The swf needs to call the javascript function that lives in the parent page.
    Thanks!

  • 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 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!

  • Load CF varibales into javascript array without outputing to source code

    I have a javascript array for dynamic dropdowns - Automobile, makes,models, etc.
    The javascript arrays are populated by by cf queries
    Everythign works and functions fine - but it also loads the entire array (hundreds of lines of code) into the browser source code.
    I would like to have the javascript arrays hidden from the browser source code by calling it:
    <script language="JavaScript" type='text/javascript' src='../js/super.js'></script>
    But when I code like this, the js file 'super.js' does not run the cf variables.
    The only way I can get it to function right now is to save a cf file called 'super.cfm' and have it run the cf query, then list the javascript code under the query on this cf template.
    THis works - but again, it causes the entire javascript code to be visible to the browser source code...
    any ideas? - I am on cf 7
    thanks in advance

    thanks for your idea
    I ended up rethinking the whole process and realized that I only update my vehicle make/model list about once a week
    So what I ended up doing was creating the the dynamic javascript arrays through cf - and rendered them in a browser, then took the browser source code (the fully rendered javascript arrays) and saved them as a static js file
    My website uses this js file on every page, so I no longer need to call queries on every single page to populate the javascript arrays - they are already built and I am guessing cached by the browser  (browsers cache js files right?)
    SO this runs more efficiently.
    The only draw back is that when I add a new vehicle to the list in my database, I will need to manually do the same process of rendering the new js code, then cutting and pasting it into my static js file that gets called by all pages.
    So it loses the realtime updates - but this only happened once a week anyway - and it only takes me five minutes to create the new file.
    We'll see if I get sick of manually creating a new js file each week - probably, but this seems better than making the server re-render the code on each page.
    Does this make sense? - would this be less overhead on the server than implimenting your concept?
    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.

  • Please tell me how to call javascript(.js) in my vb exe for adobe illustrator cs.

    Could you please please give some sample codings "how to call javascript in my vb exe for adobe illustrator cs". I called through doscript in my vb program, but some time it throws an error. If i run the script directly in illustrator it does not throws error. So Please advice me how to solve this problem.
    Thanks in advance,
    Prabudass E

    I'm not sure if this helps but it's from the CS4 scripting examples:
    Set appRef = CreateObject("Illustrator.Application")
    Set fileSystemObject = CreateObject("Scripting.FileSystemObject")
    ' Creating a folder browser in VBScript can be a problem (relying on either Windows API calls
    ' or use of ActiveX controls which may not be present on a given system). Instead, use
    ' Illustrator's built-in JavaScript to display a file browser. DoJavaScript can return a value,
    ' in this example it's the platform specific full path to the chosen template file.
    doJavaScript = "var templateFile = File.openDialog(""Select CalendarTemplate.ai file:""); if (templateFile) filePath = templateFile.fsName;"
    myFilePath = appRef.DoJavaScript(doJavaScript)

  • 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

Maybe you are looking for

  • Options for ABAP report output in Dashboard type presentation

    Background Monash University environment is SAP ERP ECC6 - no BW. The University has undertaken considerable analysis of spend as part of developing a strategic approach to procurement. The data used to undertake this analysis was extracted from SAP

  • How to make "0" appear on the display right after its input?

    Ok so i created a Vi with a keypad and digital display. Everything works fine except when zero (0) or dot (.) are input. When I press either 0 or dot, it doesnt display on the display right away, it display after my next input. For example lets say I

  • Printer timeout when printing forms

    We recently switched to printing out payroll checks and EFT notices directly from SAP using the spool output from RFFOUS_C and RFFOUS_T. The checks/notices use HR forms and SAPscript. During testing we had no printer timout problems but in the first

  • IWEB - web.me  -site name contains duplicate entries in the name

    After having link problems in my site, I deleted all entries and republished by selecting "Publish Entire Site". The site was rebuilt, but instead of the site name being http://web.me.com/membername/Welcome.html it is http://web.me.com/membername/htt

  • The entire process to publish a book for Ipad?

    Hi, I would like to know how to get a licence for a book made with DPS. I'm aware about the Single et Multi issue. The Adobe crew in France doesn't seem to be informed about the exact process. How can I proceed and in your own experience, what is the