adding a flash object to FancyBox using jquery swfobject

Posted by Freeman on Stack Overflow See other posts from Stack Overflow or by Freeman
Published on 2010-03-19T20:38:05Z Indexed on 2010/03/19 20:41 UTC
Read the original article Hit count: 252

Filed under:
|

Fellows, I dont seem to be getting a solution.

I have a a video gallery which I create by dynamically from a database.

I have managed to create a flash object which plays well without FancyBox, however I want a person to click on the gallery and then an swobject is created which will then be show on a fancybox.

Here is part of my javascript which is not working.
 $.ajax({
data:"search=vids&id="+ art,
type: "POST",
url: "doyit.php",
success: function(msg){
    $(".videogallery").html('<h3>Click to view videos of '+name+'</h3>'+msg);

    $('.video').bind('click',function(ev){
       var vid=$(this).attr("href");
       var img=$(this).find("img").attr("src")

      $(this).flash({swf: "mediaplayer.swf",
           flashvars: {   file: vid,   image: img }
          })


$(this).fancybox( { ajax:{ type:"POST"},
                        'padding'  : 0,
   'autoScale'  : false,
   'transitionIn' : 'none',
   'transitionOut' : 'none',
   'title'   : this.title,
   'width'  : 680,
   'height'  : 495

                    }
  );
$(this).unbind(ev)
return false;

       })

}

Any suggestions?

© Stack Overflow or respective owner

Related posts about jquery-plugins

Related posts about jQuery