swfobject

Topics: General, Troubleshooting
May 29, 2011 at 6:23 AM
Edited May 29, 2011 at 6:32 AM

Hi there

I am trying to migrate my simple html website to orchard cms. everything seems fine, but the swf movie I have in the webiste.

the following is from the script file that call the swfobject for the moive

-------------------------------------------- 

  var playervars = {};
  playervars.playerpath = "";
  playervars.contentpath = "content";
 
  playervars.preview = '@Url.content("~/swf/Contentpath/defaultpic.jpg")'; 
  playervars.video = "myMovie.flv";
  playervars.skin = "skin-play-seek-fullscreen-vol.swf";
  playervars.skinscalemaximum = "1";    
  playervars.smoothing = "true"; 
  playervars.volume = "0.2";
 
  var xiSwfUrlStr = '@Url.Content("~/swf/expressinstall.swf)';
       
        var params = {  scale: "noscale",
                        allowfullscreen: "true",
                        salign: "tl",
                        bgcolor: "#ffffff",
                        base: ".",
                        wmode:"transparent"
                     };   
  
        var attributes = { align: "left" };
  
     swfobject.embedSWF('@Url.Content("~/swf/flvplayer.swf")', "videoCanvas", "320", "285", "9.0.28",
                           xiSwfUrlStr, playervars, params, attributes);  

 ------------

It seems the flvplayer.swf boject is loaded, it is blank, but no preview picture non the moive are displayed, on the otherhands when right click it tells the player version number. any idea? your help is much apprcieated!

 thanks

Sean

 

May 29, 2011 at 12:37 PM

Where have you put the SWF player? Assuming it's in a module, it should be @Url.Content("~/Modules/ModuleName/Content/swf/flvplayer.swf") ...

May 29, 2011 at 12:45 PM
Edited May 29, 2011 at 12:45 PM

Oh yeah; also, you've missed a quote, after expressinstall.swf.

May 31, 2011 at 9:45 AM

thanks randompete... it is all because I didn't put the correct url of the flvplayer.swf. and also thanks to the FireBug....

 

sean

May 31, 2011 at 10:13 AM

Cool. I can't remember how anything got done before Firebug...