Embedding Flash swf files in the WordPress is something which all designers and developers have to do to showcase their work. And since WordPress is now being used extensively not just for blogging but also as a CMS, there are more and more people showing their Flash portfolio in WordPress pages.
Also, usually Flash files canvas is wider than normal content area width available in most WordPress themes. There’s another problem in embedding flash swf files directly in posts and that is the background music. Because you might want to embed more than one swf with music in one page and they would all create a fine mess playing at once, besides not every one likes if music starts playing on opening any web page (at least I don’t, despite being flash developer myself). So due to number of reasons, embedding flash content into posts has been a thorn in designers’ and developers’ side.
Ideally, designers would want to show the flash swf file in a popup window a la Lightbox plugin on a link or image click. This will make quite bigger canvas size flash movies view-able even with a background music. Since user would have launched it himself, he would not mind some background music.
Being a designer and Flash developer myself, I needed to add flash content routinely in my posts and portfolio pages. I tried many ways to resolve this issue and finally prettyPhoto came to my rescue. prettyPhoto is a jQuery lightbox clone and not only just does it support images, it also support videos, YouTube, iframes and ajax and most importantly Flash. It’s a full blown media lightbox.
Flash Lightbox Popup Sample
Click on the flash icon or the text link to launch flash swf in prettyPhoto’s Lightbox like popup window.
And here’s the code:
Launch Lightbox Flash
or
Launch Lightbox Flash
Hope that helps.
Cheers!
can anyone help me?
Hey where exactly do i paste this code above?!
thanks!
Thank you!!! I’ve been trying for days to figure out how to get my flash files to appear in the PrettyPhoto lightbox, and was getting nowwhere. To the point where I thought I might just need to build a whole separate page to display them. Your code worked perfectly, and my portfolio page and I thank you! 🙂
How do i expand the size
Thanks Ali for your reply,
However, Wp-prettyPhoto doesn’t work, that plugin’s last update was in May 2010.
I also try to install prettyPhoto to my theme by include jQuery lib, css, js files in the header. Then initialize the function at the footer.
But it still doesn’t work at all. I think prettyPhoto 3.1.4 doesn’t work with WordPress 3.3.1 and higher, so Wp-prettyPhoto.
One question, I can see in your source, you only include the prettyPhoto.css in your theme, how can it works so nice? do you use any plugin for this?
I’m using version 3.1.3 and it works. check js file here https://www.parorrey.com/wp-content/themes/acoustic_v101/js/main.js
I go through your post but can’t find the way to install prettyPhoto to wordpress
You can easily install prettyPhoto plugin. Please go to WP Admin > Plugins > Add New and Search “prettyPhoto”.
That Lightbox template looks great and would fit in any website without causing too much a fuzz. Funny how I mistook Lightbox for Adobe Lightroom, though.