views:

348

answers:

0

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?