[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 574
  • Last Modified:

swfobject and cflayoutarea

I'm displaying an SWF inside a CFlayoutarea using swfobject and in IE I have to click the swf to interact with it.

I dont have to do this if I take the SWF out of the cflayoutarea which leads me to believe that my problem probably lies there?

works fine in the tab on firefox and safari, just the IE problem.

Please see code below.
<!--- calling swfobject --->
  <script type="text/javascript" src="swfobject/swfobject1.5.js"></script> 
 
 <!--- cfparams --->
<cfparam name="URL.zoomifyInitialX" default="" >
<cfparam name="URL.zoomifyInitialY" default="" >
<cfparam name="URL.zoomifyInitialZoom" default="" >
 
 
<cflayout type="tab" name="tabstest">
 
	<cflayoutarea title="tabtest1">
    	
		<div id="flashcontent">
 
            <h2>alt content</h2>
            <p>Html content for the flash player alternative</p>
        
        </div>
		
		<script defer="defer" type="text/javascript">
      // <![CDATA[
 
		var so1 = new SWFObject("ZoomifyHideShowAllHotspotsExample.swf?t=" +new Date().getTime(), "ZoomifyHotspotViewer", "750", "500", "6", "#FFFFFF");
		   so1.addVariable("zoomifyImagePath","curtin_example/");
		   so1.addVariable("zoomifyHotspotsXMLPath","hotspots/hotspots.xml");
		   so1.addVariable("zoomifyInitialX","<cfoutput>#URL.zoomifyInitialX#</cfoutput>");
		   so1.addVariable("zoomifyInitialY","<cfoutput>#URL.zoomifyInitialY#</cfoutput>");
		   so1.addVariable("zoomifyInitialZoom","<cfoutput>#URL.zoomifyInitialZoom#</cfoutput>");
		   so1.write("flashcontent");
			  // ]]>
		</script>
        
    </cflayoutarea>
    
<cflayoutarea title="tabtest2">
asdasdasdasd
        
</cflayoutarea>
 
</cflayout>

Open in new window

0
CurtinProp
Asked:
CurtinProp
  • 2
1 Solution
 
gdemariaCommented:
This is a Microsoft issue due to a lost legal battle.  You can get around it by running the flash with javascript.   There are lots of solutions out there (google IE Click to activate flash)

Here's one..
http://www.mix-fx.com/flash-prompt.htm
0
 
CurtinPropAuthor Commented:
I dont think theres a need for the fixit.js, I already have a date time fix that works in IE, my problem lies with the cflayoutarea.

When I separate the flash from the cflayoutarea tabs it is fine, functions perfectly and no prompt.

When I place them into cflayoutarea tabs the swf is blank, until I click on it, theres also random issues with the movie loading altogether when its placed inside those tags. I think theres an issue with embedding my flash inside of a cflayoutarea, thats the only thing I can put it down to now??

I've pasted my code into the snippet, with my swfobjects etc as it stands now. Hopefully theres a glaring problem that I havn't seen?

cheers
<!--- calling swfobject --->
 
 
  <script type="text/javascript" src="swfobject/swfobject1.5.js"></script> 
  
      
 
 <!--- cfparams --->
        
<cfparam name="URL.zoomifyInitialX" default="" >
<cfparam name="URL.zoomifyInitialY" default="" >
<cfparam name="URL.zoomifyInitialZoom" default="" >
 
 
<div id="content_prop">
 
 
 
 
 
	       
<!--- alt content --->
 
 
 
<h1>Example - no tabs</h1>
	
 
   <h1>Campus Map</h1> 	
		<div id="flashcontent">
 
            <h2>alt content</h2>
            <p>Html content for the flash player alternative</p>
        
        </div>
		
		<script type="text/javascript">
      // <![CDATA[
 
		var so1 = new SWFObject("ZoomifyHideShowAllHotspotsExample.swf?t=" +new Date().getTime(), "ZoomifyHotspotViewer", "750", "500", "6", "#FFFFFF");
		   so1.addVariable("zoomifyImagePath","campus_map_09/");
		   so1.addVariable("zoomifyHotspotsXMLPath","hotspots/hotspots.xml");
		   so1.addVariable("zoomifyInitialX","<cfoutput>#URL.zoomifyInitialX#</cfoutput>");
		   so1.addVariable("zoomifyInitialY","<cfoutput>#URL.zoomifyInitialY#</cfoutput>");
		   so1.addVariable("zoomifyInitialZoom","<cfoutput>#URL.zoomifyInitialZoom#</cfoutput>");
		   so1.write("flashcontent");
			  // ]]>
		</script>
        
  
    
 
<br /><br />
 
 
<h1>Parking Map</h1>
		<div id="flashcontent2">
 
            <h2>alt content</h2>
            <p>Html content for the flash player alternative</p>
        
        </div>
	
 
	<script type="text/javascript">
      // <![CDATA[
 
		var so2 = new SWFObject("ZoomifyHideShowAllHotspotsExample2.swf?t=" +new Date().getTime(), "ZoomifyHotspotViewer2", "750", "500", "6", "#FFFFFF");
		   so2.addVariable("zoomifyImagePath","parking_map_09/");
		   so2.addVariable("zoomifyHotspotsXMLPath","hotspots/hotspots_p.xml");
		   so2.addVariable("zoomifyInitialX","<cfoutput>#URL.zoomifyInitialX#</cfoutput>");
		   so2.addVariable("zoomifyInitialY","<cfoutput>#URL.zoomifyInitialY#</cfoutput>");
		   so2.addVariable("zoomifyInitialZoom","<cfoutput>#URL.zoomifyInitialZoom#</cfoutput>");
		   so2.write("flashcontent2");
			  // ]]>
		</script>
        
</div>
 
        

Open in new window

0
 
CurtinPropAuthor Commented:
I switched the tabs to Jquery instead of cflayout and it works fine, still have no idea why but at least there was an alternative
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now