SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Nov 2009
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Block Flash object in iframe - Possible?

    Hi,

    I have an iframe which displays a page from another domain and that page has a Flash object on it. I know I can't control the content and style due to crossdomain security but is it possible to block Flash within the iframe?

    Thanks for any ideas.

  2. #2
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,066
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Hi nayen,

    What do you mean by block?
    Stop it from running or stop the user from interacting with it?

    If it's the latter, I suppose you could create a greyed out div, set the z-index accordingly and position that over the offending elements, but I think you'll find this is going to be difficult.

    Here's a link that might be worth reading: http://stackoverflow.com/questions/5...t-using-jquery

    HTH

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,870
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    If the flash has wmode set to "window" then it will automatically display above everything else and there will be no way to block it. Note also that "window" is the default value if wmode is not set to "opaque" or "transparent".
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Addict
    Join Date
    Nov 2009
    Posts
    312
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Pullo View Post
    Hi nayen,

    What do you mean by block?
    Stop it from running or stop the user from interacting with it?

    If it's the latter, I suppose you could create a greyed out div, set the z-index accordingly and position that over the offending elements, but I think you'll find this is going to be difficult.

    Here's a link that might be worth reading: http://stackoverflow.com/questions/5...t-using-jquery

    HTH
    Thanks for your input. What I want is a similar effect that Firefox (18) does for Flash in iframe. It simply makes the Flash object hidden. The problem is this is a dynamic page so a greyed out div is not a solution in my case. I am just trying to figure out if it is possible to make Flash in iframe invisible.

    Quote Originally Posted by felgall View Post
    If the flash has wmode set to "window" then it will automatically display above everything else and there will be no way to block it. Note also that "window" is the default value if wmode is not set to "opaque" or "transparent".
    Different browsers act differently on this issue, for example in Safari Flash is above everything else but in other browsers it is not.

  5. #5
    Gre aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,066
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    Quote Originally Posted by nayen View Post
    What I want is a similar effect that Firefox (18) does for Flash in iframe. It simply makes the Flash object hidden. The problem is this is a dynamic page so a greyed out div is not a solution in my case. I am just trying to figure out if it is possible to make Flash in iframe invisible.
    I'm afraid it doesn't look good.
    What FF does is at browser level (that's why you've got several browser plugins that do the same thing).
    I'm unaware of any way you can do this using web technologies.


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
  •