Most Reliable/Shortest Flash Activation Script

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Laphan

    Most Reliable/Shortest Flash Activation Script

    Hi All

    I've used about 5 different javascripts to sort out this annoying habit that
    IE has re asking for a click to activate on flash files in my web pages, but
    none seem to do the trick.

    Does anybody have a definitive one that isn't a foot long in code?

    Thanks

    Laphan

    ps: What I tend to do is also embed an IMG tag line within the object/embed
    code as a graceful picture fallback if the browser doesn't have flash
    player - would this effect your code?


  • Laphan

    #2
    Re: Most Reliable/Shortest Flash Activation Script

    Many thanks everybody


    "Stevo" <no@mail.invali dwrote in message
    news:ftb40i$pr2 $02$1@news.t-online.com...
    Laphan wrote:
    Hi All
    >
    I've used about 5 different javascripts to sort out this annoying habit
    that
    IE has re asking for a click to activate on flash files in my web pages,
    but
    none seem to do the trick.
    >
    Does anybody have a definitive one that isn't a foot long in code?
    >
    ps: What I tend to do is also embed an IMG tag line within the
    object/embed
    code as a graceful picture fallback if the browser doesn't have flash
    player - would this effect your code?
    The key here (and it might seem hard to believe) is that the function
    you call to write to the innerHTML, *MUST* be in a separate JS file.
    Here's a simple example with minimalist tags and no feature tests or
    null object tests:

    <html><head>
    <script src="ext.js"></script>
    </head><body>
    <div id="mydiv"></div>
    <script>
    var myembed="<objec t bla bla bla bla bla>";
    myExternalEmbed Func("mydiv",my embed);
    </script>
    </body>
    </html>

    The ext.js file will do something like this:

    function myExternalEmbed Func(targ,str)
    {
    var t=document.getE lementById(targ );
    t.innerHTML=str ;
    }

    This behaviour you're seeing is usually referred to as the EOLAS
    problem. It doesn't help you much right now, but Microsoft are backing
    out the change they made to IE6/7 that causes this. That's in a future
    update though.


    Comment

    Working...