SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot
    Join Date
    Aug 2008
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    'click to activate and use this control' message over SWF in IE7

    I've just finished a splash page that consists of a large SWF file and a footer. I used SWFobject to insert my Flash, and everything works perfect except for in IE7. When rolled over, a border appears over the SWF area, and a pop-up caption reads, 'click to activate and use this control.'

    This would not be a problem normally, as the animation runs fine, but I have a <div> that sits on top of it that's used as a button. For this reason, I have used the "wmode" value=" opaque". Not sure if this has anything to do with it or not.

    A brief depiction of my code is below.

    Code:
      <div id="flash">
       <object id="one0one" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600">
         <param name="movie" value="media/Progrphx_splash.swf" />
         <param name="wmode" value="opaque" />
    
            <!--[if !IE]>-->
            <object type="application/x-shockwave-flash" data="media/Progrphx_splash.swf" width="800" height="600">
            <param name="wmode" value="opaque" />
    
            <!--<![endif]-->
    
              <h1>content</h1>
             
            <!--[if !IE]>-->
            </object>
            <!--<![endif]-->
      </object>
    </div>

  2. #2
    SitePoint Zealot
    Join Date
    Aug 2008
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I forgot to mention is that hovering over the SWF area makes it clickable, and it does not allow you to click the overlapping button without clicking inside the flash first.

  3. #3
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doesn't look like you've used SWFObject there... with SWFObject you'd have something like:

    Code:
    <script type="text/javascript">
       var so = new SWFObject("movie.swf", "mymovie", "400", "100&#37;", "8", "#336699");
       so.addParam("quality", "low");
       so.addParam("wmode", "transparent");
       so.addParam("salign", "t");
       so.write("flashcontent");
    </script>
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project

  4. #4
    SitePoint Zealot
    Join Date
    Aug 2008
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been using this method for a little while now. Got it straight from Google (I wanted to post the link, but I don't have enough posts yet ugghhh).

    It is the basic form of SWFobject without too much customization and whatnot
    (I know next to nothing about Javascript).

    In any event, do you think the way it is embedded has anything to do with oddity in IE7? I tried changing the "wmode" to "transparent" instead of "opaque" but it didn't solve the problem, and seemed to slow down the Flash engine.

  5. #5
    SitePoint Wizard bronze trophy Tailslide's Avatar
    Join Date
    Feb 2006
    Location
    Bedford, UK
    Posts
    1,687
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What you've posted isn't the SWFObject - I'd suggest visiting their page and getting the code from there which should work without a hitch.
    Little Blue Plane Web Design
    Blood, Sweat & Rust - A Land Rover restoration project

  6. #6
    SitePoint Evangelist Karpie's Avatar
    Join Date
    Jul 2007
    Location
    Perth, Australia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Seeing as SWFObject was designed primarily to get rid of that particular bug in IE, I think it's safe to assume something's gone wrong in your use of it.

    Can we see the Javascript code you use to insert the flash?

  7. #7
    SitePoint Zealot
    Join Date
    Aug 2008
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is my code including the call to Javascript. I am using SWFobject 2 static publishing. Using the dynamic publishing looks much more like what Tailslide was referring to, but I don't think I needed all of the extra variables.

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "I still can't publish links">
    <html xmlns="nope, no links">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title></title>
    <link href="splash_styles.css" rel="stylesheet" type="text/css" media="screen" />
    <link rel="icon" href="/favicon.ico" type="image/x-icon" />
    <script type="text/javascript" src="swfobject.js"></script>
    <script type="text/javascript">
        swfobject.registerObject("progrphx", "8.0.0", "expressInstall.swf");
        </script>
    </head>
    
    <body>
        <div id="flash">
       <object id="progrphx" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600">
         <param name="movie" value="media/Progrphx_splash.swf" />
         <param name="wmode" value="opaque" />
    
            <!--[if !IE]>-->
            <object type="application/x-shockwave-flash" data="media/Progrphx_splash.swf" width="800" height="600">
            <param name="wmode" value="opaque" />
    
            <!--<![endif]-->
              <p>content</p>
            <!--[if !IE]>-->
            </object>
            <!--<![endif]-->
      </object>
    It wouldn't surprise me if there is an error, because I have used this many times without this problem. Please let me know if you can find one. Thanks.

    And how many posts do you need before you can publish links?

  8. #8
    SitePoint Evangelist Karpie's Avatar
    Join Date
    Jul 2007
    Location
    Perth, Australia
    Posts
    445
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://code.google.com/p/swfobject/wiki/documentation

    In the section 'Should I use the static or dynamic publishing method?' it explicitly states that dynamic will get around the 'click to activate' problem, but does not mention this for static. I think it's safe to assume that static doesn't get around the problem (in which case I don't really see the point in it).

    I've never used the static way (and until now didn't even know there was one), so I would recommend using the dynamic way. You can leave all the addParams out if you don't need them, but you will need the other two lines.

  9. #9
    SitePoint Zealot
    Join Date
    Aug 2008
    Posts
    111
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I guess the only benefit to the static is there is a lot less Javascript to write, and since I'm Javascript illiterate, that's preferable to me.

    Can I ask one more question then? I get how to enter the 5 necessary inputs, but don't know how and where to include the optional params. How would it look in my code if I put the normal lines plus an addParam for "wmode" value="opaque".

    Also, when it asks for the expressInstall URL, is that simply
    Code:
    swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0","expressInstall.swf")
    ?

    And I guess while your teaching my Javascript 101, how is this calling a javascript file that's not hosted on your server, and the link looks just like a relative link ("swifobject.js")?

    Thanks for all the help.

  10. #10
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Karpie View Post
    get rid of that particular bug in IE...
    Its not a bug, it also affects Opera.
    http://www.howtocreate.co.uk/noclicktoactivate.html
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



Bookmarks

Posting Permissions

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