Hi guys!
I'm trying to create a fluid layout to a flash header. To do this task,
I read the screen width and then calculate the height of my flash
object (the aspect is 4:1). I try my code with firefox and it worked
without any problem. Unfortunatelly my code didn't work with Internet
Explorer (what a surprise :D), I try different ways without success.
Basically, I create a DOM element with the flash object, this way I can
define the width and the height dinamically. I used the logging pane to
check if the DOM could be created successfully and it was ok even in
IE. The problem seems to be when I do a swapDOM.
What can I do to make this work in IE. The code is the one above. Do
you know any other way to do fit the flash object to page width (do
fluid layouts)? Thanks in advance!
<html>
<head>
<meta http-equiv=Content-Type content="text/html;
charset=ISO-8859-1">
<script language="javascript" src="MochiKit/MochiKit.js"></script>
<script language="javascript"><!--
function createFlashObject() {
createLoggingPane();
var coord = getViewportDimensions();
width = coord.w;
height = width/4.0; // the aspect is 4:1
var obj = createDOM('OBJECT', {
'classid':'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000',
'codebase':'...',
'width':width, 'height':height, 'id':'topo', 'align':''},
createDOM('PARAM', {'name':'movie',
'value':'novotopo.swf'}, null),
createDOM('PARAM', {'name':'quality', 'value':'high'},
null),
createDOM('PARAM', {'name':'bgcolor', 'value':'#ffffff'},
null),
createDOM('EMBED', {
'src':'novotopo.swf', 'quality':'high',
'bgcolor':'#ffffff',
'width':width, 'height':height,
'name':'topo', 'align':'',
'type':'application/x-shockwave-flash',
'pluginspage':'http://www.macromedia.com/go/getflashplayer'},
'')
);
logDebug(toHTML(obj));
swapDOM('test', obj);
}
--></script>
<style type="text/css"><!--
body {
margin: 0px;
padding: 0px;
}
--></style>
</head>
<body onload="createFlashObject()">
<object id="test"></object>
</body>
</html>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---