Thursday, January 04, 2007

TEA and embedding Flash in ie-7

I am sure by now - Everyone is hip on the IE-7 restrictions regarding flash and embedding objects on your web page. If not...That is why you are here.

Activating you flash without having issues in ie-7 is pretty easy.
I found the files through Milonic.com
This is a very useful site in general for you java heads.
It pretty much rocks out.

Anyway - i pressed a huge pot of tea and got started on learning what this is about and after a couple trial and error episodes found that the best and easiest solution appears to be provided by Milonic.com

So here it is -
First off...This has to be linked to your page.
title it something simple

here is the javascript

/*
Milonic Flash Activation Script - insert_active_flash.js version 1.0 - May 4 2006

Copyright 2005 (c) Milonic Solutions Limited. All Rights Reserved.
This is a commercial software product, please visit http://www.milonic.com/ for more information.
*/

function commitFlashObject(_obj, _container){
_output=""
_paramoutput=""
_src=""
_ver=""
for(_cO in _obj){
_output+=_cO+"=\""+_obj[_cO]+"\" "
_paramoutput+="

";
if(_cO=="movie")_src="src=\""+_obj[_cO]+"\"";
if(_cO=="version")_ver=_obj[_cO];
}
if(_ver=="")_ver="8,0,0,0"
ihtm="\n"
ihtm+=_paramoutput+"\n"
ihtm+="\n";
ihtm+="\n";
ihtm+="\n";
document.getElementById(_container).innerHTML=ihtm

/* end */

}
Next we go to your document and fill in the blanks of the object you would
like to embed

Something that would normally look like this:





Now looks like this: {note: replace the 'xxxxxx' with the URL for your above javascript.