Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm aware that there is existing FlashBlock plugins that users can install on their browsers, but I would like a Wordpress approach to be able to:

  • Replace SWF content by a thumbnail / screenshot of the Flash content (could be manually prepared).
  • When clicked on, activates it OR launches a "popin" DIV container to play the Flash file inside of it.
  • When other SWF content exists on the same page, automatically close other SWFs (only one can play at a time).

If you know of anything that works similarly, I'd be interested to know about it :)

share|improve this question

1 Answer 1

You can use something like this:

Embed this script: http://jquery.lukelutman.com/plugins/flash/jquery.flash.js

Then in your functions.js

    (function($) {
    $(document).ready(function (){
        $(".flash").click(function(e) {
            $(this).parent().empty().flash({ 
                src: $(this).attr('href')
            });
            e.preventDefault();
        });
    });
    })(jQuery);

Your markup would be something like:

<div class="flash-container">
    <a href="flash.swf"><img src="placeholder.jpg"></a>
</div>

For more info check http://jquery.lukelutman.com/plugins/flash/

i hope this makes some sense :-) Btw: this isn't a WordPress question, so maybe you get a faster and or better answer @ stackoverflow.com

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.