Link to home
Start Free TrialLog in
Avatar of CurtinProp
CurtinProp

asked on

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

Avatar of gdemaria
gdemaria
Flag of United States of America image

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
Avatar of CurtinProp
CurtinProp

ASKER

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

ASKER CERTIFIED SOLUTION
Avatar of CurtinProp
CurtinProp

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial