Insert SWF into FancyBox

89 views
Skip to first unread message

rpessagno

unread,
Jun 11, 2009, 12:36:27 AM6/11/09
to fancybox
I'm trying to place a SWF into FancyBox, so that when the thumbnail is
clicked, it opens like it would an image, except it's a SWF. Right
now, when the thumbnail is clicked, it opens in a blank page (but not
a separate tab). I hope that makes sense.

I know things like this have been covered in other posts, but mine
problem is more simple (I think), and I'm pretty new to FancyBox. I
would just like to know if there are general guidelines or
instructions in placing a SWF into FancyBox. Thanks!

rpessagno

unread,
Jun 12, 2009, 2:37:47 PM6/12/09
to fancybox
I didn't include my code because I figured it was simple enough for
just a general explanation, but I still don't know how to do it.
Anything help would be appreciated!

togglemedia

unread,
Jun 13, 2009, 7:43:02 PM6/13/09
to fancybox
Yeah, we're having the same issue here. We're using the swfobject to
load the flash, but no dice.

JFK

unread,
Jun 14, 2009, 10:46:31 PM6/14/09
to fancybox
I can write you the script
if you include a link with your issue then it will be easier and
faster

JFK

unread,
Jun 17, 2009, 3:47:29 PM6/17/09
to fancybox
I did manage to open swf files but my unsolved problem is still
IE ...the swf file (video) keeps playing no matter I set $
("#fancy_content").empty();

swf files are not easy to handle and even longtail (jwplayer) would
recommend to use .flv when possible
http://www.jeroenwijering.com/?thread=8725#msg51098

You can call your swf file either inline and/or ajax using <embed>:
<embed flashvars="file=myfile.swf" src="flvplayer.swf"
type="application/x-shockwave-flash" wmode="transparent" width="400"
height="300" />

also you could use swfobject (I would recommend to do so in AJAX mode)
<div id="player1"><a href="http://www.macromedia.com/go/
getflashplayer">Get the Flash Player</a> to see this rotator.</div>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
var s1 = new SWFObject("flvplayer.swf","single","350","200","7");
s1.addParam("allowfullscreen","true");
s1.addParam("wmode","opaque");
s1.addVariable("file","myfile.swf");
s1.addVariable("autostart","false");
s1.write("player1");
</script>

it will work fine in FF, opera, safari, chrome but no IE which will
keep playing after closing
I guess this solution works fine for dinamic or interactive map/
content etc but no video
if video, I would recommend to convert from swf to flv

rpessagno

unread,
Jun 22, 2009, 4:12:59 PM6/22/09
to fancybox
Thank you for replying to my message. I have not gotten around to
trying anything yet, but I will soon. Also, I will publish what I have
right now so you can see what I'm dealing with. I have a couple of
interactive SWFs that I exported from InDesign, so I can only keep
them as SWFs. But I will try the FLV with the animation files.

On Jun 17, 12:47 pm, JFK <jfk.d...@gmail.com> wrote:
> I did manage to open swf files but my unsolved problem is still
> IE ...the swf file (video) keeps playing no matter I set $
> ("#fancy_content").empty();
>
> swf files are not easy to handle and even longtail (jwplayer) would
> recommend to use .flv when possiblehttp://www.jeroenwijering.com/?thread=8725#msg51098
> > > On Jun 12, 2:37 pm,rpessagno<rpessa...@gmail.com> wrote:
>
> > > > I didn't include my code because I figured it was simple enough for
> > > > just a general explanation, but I still don't know how to do it.
> > > > Anything help would be appreciated!
>
Reply all
Reply to author
Forward
0 new messages