Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 594721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:59:03+00:00 2026-05-13T15:59:03+00:00

What I have: A swf exports a function via ExternalInterface Javascript creates new embed

  • 0

What I have:

  1. A swf exports a function via ExternalInterface
  2. Javascript creates new embed object and adds it to the document
  3. Calling flash functions works fine in other browsers
  4. Calling flash functions will fail in IE 8

Example of exporting functions in swf:

flash.external.ExternalInterface.addCallback("isActive", ...

Example of creating the embed object:

var b = document.createElement('embed');

    b.type = 'application\u002fx-shockwave-flash';
    b.setAttribute('allowFullScreen', 'true');
    b.setAttribute('allowNetworking', 'all');
    b.setAttribute('allowScriptAccess', 'always');
    b.width = 500;
    b.height = 400;
    b.src = 'assets\u002fUltra4.UltraApplication\u002fUltra4.UltraApplication+UltraSprite.swf';

Example of calling flash external interface in javascript:

   try
    {
      e = b.isActive();
    }
    catch (__exc){ }

In IE it will catch with message “Object doesn’t support this property or method”

How to fix it?

  1. Related: http://bojolais.livejournal.com/251383.html
  2. Related: ExternalInterface not working in IE
  3. Related: http://swfupload.org/forum/generaldiscussion/985
  4. Related: http://code.google.com/p/doctype/wiki/ArticleFixingFlashExternalInterface
  5. Related: http://www.dangerouslyawesome.com/2006/10/20/another-swfobject-problem-deproblemed/
  6. Related: http://www.airtightinteractive.com/news/?p=71

In script debugger I can see a third party script which is supposed to be the bridge:

function __flash__arrayToXML(obj) {
    var s = "<array>";
    for (var i=0; i<obj.length; i++) {
        s += "<property id=\"" + i + "\">" + __flash__toXML(obj[i]) + "</property>";
    }
    return s+"</array>";
}
function __flash__argumentsToXML(obj,index) {
    var s = "<arguments>";
    for (var i=index; i<obj.length; i++) {
        s += __flash__toXML(obj[i]);
    }
    return s+"</arguments>";
}
function __flash__objectToXML(obj) {
    var s = "<object>";
    for (var prop in obj) {
        s += "<property id=\"" + prop + "\">" + __flash__toXML(obj[prop]) + "</property>";
    }
    return s+"</object>";
}
function __flash__escapeXML(s) {
    return s.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;");
}
function __flash__toXML(value) {
   var type = typeof(value);
    if (type == "string") {
        return "<string>" + __flash__escapeXML(value) + "</string>";
    } else if (type == "undefined") {
        return "<undefined/>";
    } else if (type == "number") {
        return "<number>" + value + "</number>";
    } else if (value == null) {
        return "<null/>";
    } else if (type == "boolean") {
        return value ? "<true/>" : "<false/>";
    } else if (value instanceof Date) {
        return "<date>" + value.getTime() + "</date>";
   } else if (value instanceof Array) {
       return __flash__arrayToXML(value);
   } else if (type == "object") {
       return __flash__objectToXML(value);
   } else {
        return "<null/>"; //???
    }
}
function __flash__addCallback(instance, name) {
  instance[name] = function () { 
    return eval(instance.CallFunction("<invoke name=\""+name+"\" returntype=\"javascript\">" + __flash__argumentsToXML(arguments,0) + "</invoke>"));
  }
}
function __flash__removeCallback(instance, name) {
  instance[name] = null;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:59:03+00:00Added an answer on May 13, 2026 at 3:59 pm

    I’m not sure if I understand your question correctly. But I think you are missing a couple of things:

    1) Your embed tag needs a name attribute. Let’s name it “NewFlashMovie” for the subsequent code:

    b.name = "NewFlashMovie";
    

    2) You need to call the “isActive” function differently using an external function. First add this function

     function thisMovie(movieName) {
         if (navigator.appName.indexOf("Microsoft") != -1) {
             return window[movieName];
         } else {
             return document[movieName];
         }
     }
    

    Then you can call the function like this

    thisMovie("NewFlashMovie").isActive();

    From my experience, this “thisMovie” is essential to bridge the IE-Flash calls. This is also documented in the ExternalInterface documentation

    3) I also recommend using swfobject instead of creating your own “embed” object.

    Hope these helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 300k
  • Answers 300k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer maybe something like this: sess.createCriteria(A.class) .createCriteria("b") .createCriteria("c") .setProjection(Projections.projectionList() .add(Projections.groupProperty("s"), "string")… May 13, 2026 at 7:58 pm
  • Editorial Team
    Editorial Team added an answer I don't think there is a native way to do… May 13, 2026 at 7:58 pm
  • Editorial Team
    Editorial Team added an answer scopt/scopt val parser = new scopt.OptionParser[Config]("scopt") { head("scopt", "3.x") opt[Int]('f',… May 13, 2026 at 7:58 pm

Related Questions

I'm going to be as specific and verbose as possible and include some of
I am not well acquainted to the compiler magic. The act of transforming human-readable
What are the main reasons for having ridiculously long export times for a simple
I have this very strange problem on a big flex app where it would
I'm using Flex Builder more and more and attempting to create a fairly asset

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.