> Just use the swfobject javascript library (http://blog.deconcept.
> com/swfobject/ ) to embed your Flash file. If Flash is found swfobject 
> will overwrite the content of the named div you give it with your 
> flash file. If Flash is not present the div will render as normal.
> 
> Swfobject is widely used inside and outside of the CF community, but 
> If you'd like to see an example of it in the wild on a CF site feel 
> free to email me - I have it running on one that's in development. 

Yeah I was playing around with that but it's not quite what I'm looking for. I 
have to pieces of content that need CF code to run so I've decided to use two 
DIV's, one for Flash/CF/HTML and one for non-Flash/CF/HTML. I'm using the Flash 
Detection Kit and I've  almost completed this, I'm just stuck trying to have my 
DIV's get their DISPLAY option set in the header. I can't assign a BLOCK value 
to each because they aren't defined until later in the page. 

So this has become a JavaScript problem. Does anyone know how to define values 
for a DIV in the header that isn't created until mid-page? Where I'm setting 
the Var values I'm getting errors in setting the BLOCK values in the IF 
hasReqestedVersion. 


<script language="JavaScript" type="text/javascript">
<!--
// Version check based upon the values entered above in "Globals"
var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, 
requiredMinorVersion, requiredRevision);

var MiddleHome = document.getElementById(MiddleHome);
var MiddleHomeFlash = document.getElementById(MiddleHomeFlash);

// Check to see if the version meets the requirements for playback
if (hasReqestedVersion) {
        // if we've detected an acceptable version
        // embed the Flash Content SWF when all tests are passed
        document.getElementById('MiddleHome').style.display='none';
        document.getElementById('MiddleHomeFlash').style.display='block';       
        }
        else {  // flash is too old or we can't detect the plugin
        document.getElementById('MiddleHome').style.display='block';
        document.getElementById('MiddleHomeFlash').style.display='none';
        }
// -->
</script> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:293717
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to