A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: IE Update Causes .swf Problem

  1. #1
    Junior Member
    Join Date
    Sep 2005
    Posts
    3

    IE Update Causes .swf Problem

    What is everyone doing to get around the problem that the latest update of IE causes with .swf files? There seems to be many fixes posted on the net, but which one works best for all browsers? Does KoolMoves have an official position on this?

    Will there be an update to KoolMoves to fix this problem?

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    I know Bob is looking into this. One thing to keep in mind is it's not just Flash it's Any ActiveX lncluding Quicktime, Java, Realmedia, Windows Media Player ant others.

    If you are a web professional you should be looking for a solution that works for all of these.

    Currently I personally am going with the solution found here
    http://activecontent.blogspot.com/

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244

    The fix so far

    As of now this is the fix I've found to be the best for all ActiveX content.

    This info is from http://activecontent.blogspot.com/
    Bear in mind this is not an official fix from Koolmoves or anyone else.

    Save the following code on your server as ieupdate.js
    Code:
    var bo_ns_id = 0;
    
    function startIeFix(){
      if(isIE()){
        document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');
      }
    }
    
    function endIeFix(){
      if(isIE()){
        document.write('</div>');
        var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);
        var theCode = theObject.innerHTML;
        theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"))
        document.write(theCode);
      }
    }
    
    function isIE(){
      // only for Win IE 6+
      // But not in Windows 98, Me, NT 4.0, 2000
      var strBrwsr= navigator.userAgent.toLowerCase();
      if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){
        if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){
          return false;
        }
        if(strBrwsr.indexOf("win98") > -1 ||
           strBrwsr.indexOf("win 9x 4.90") > -1 ||
           strBrwsr.indexOf("winnt4.0") > -1 ||
           strBrwsr.indexOf("windows nt 5.0") > -1)
        {
          return false;
        }
        return true;
      }else{
        return false;
      }
    }

    This will then need to be included within the <head> tags for each page:

    Assuming the ieupdate.js is in the same folder as the HTML page.
    <script type="text/javascript" src="ieupdate.js"></script>



    Then you need to include a line directly before, and directy after each <object> tag:

    <script type="text/javascript">startIeFix();</script>
    <object ...
    etc etc
    </object>

    <!-- --><script type="text/javascript">endIeFix();</script>
    Last edited by blanius; 05-04-2006 at 05:36 PM.

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    I have not made changes to the code until there is a stable solution. A number of solutions have been proposed but then later found to have problems.

    For people with a lot of web pages, it is a big deal to make these changes everywhere; I want the changes to have to be made only once.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center