Skip to main content
Inspiring
August 7, 2009
Question

SwfObject in a CFWINDOW

  • August 7, 2009
  • 1 reply
  • 579 views

I'm trying to load a swf with some dynamic variables within a CFWINDOW that is loaded dynamically. When the window opens up nothing really shows up, I've had problems like this before and tried putting the swfobject.js in the header of the actual site rather than inline in the CFWINDOW url.  The action url looks something like this (works when accessing the url directly)...

<script type="text/javascript" src="http://xxxx/pubSwfObject.js"></script>
<script type="text/javascript">
     var flashvars = {};
     flashvars.videoFile = 'http://xxxxx/movie_3.flv';
     flashvars.videoSkin = 'http://xxxxx/pubFlashVideoPlayerSkin.swf';
     flashvars.videoWidth = 550;
     flashvars.videoHeight = 400;            
     var params = {};
     params.wmode = "transparent";
     var attributes = {};
     pubSwfObject.embedSWF("http://xxxx/pubFlashVideoPlayer.swf", "treePageDetailsVideo", "550", "400", "9.0.0", "http://xxxx/pubExpressInstall.swf", flashvars, params, attributes);
</script>
<div id="treePageDetailsVideo">
     <strong>Flash player not installed or enabled.</strong><br />
     In order to view the page properly you will need flash player installed. You can download it by
     <a href="http://www.adobe.com/go/var.getFlashplayer" title="Install Adobe Flash Player">clicking here.</a>
</div>

Calling the window looks something like this.....

<a href="#" onclick="ColdFusion.Window.create('vidwindow6', 'test', 'index.cfm?fuseaction=trees.galleryVideo&pageID=xxx&treeID=xxx&assignmentID=xxxx&pageVideoID=xxxx',{height:420,width:570,modal:true,closable:true,draggable:false,resizable:false,center:true,initshow:true})" title="test">
<img alt="test" src="http://xxxxxx/Oryx_Antelope_1.jpg" border="0">
</a>

Anyone tried to do this before?

    This topic has been closed for replies.

    1 reply

    Inspiring
    August 7, 2009

    I tried doing the same thing and never could get it to work. I was trying to do some PicNik Api using it .

    http://forums.adobe.com/thread/460132

    Others mentioned to use Ajaxinit(), but I never was successful. I ended up just running it in a iframe on a separate page. If you figure it out, I would be interested in how it worked....