Jump to content
  • 0

OBJECT на всю ширину DIV


mongoose
 Share

Question

Суть проблемы: на странице имеется DIV(ширина блок азадана в %). Внутрь DIV'а вставляется флеш. Необходимо, чтобы ролик тянулся на всю ширину DIV'а-родителя.

p.s.

1. height и width = 100% не помогают

2. В результате поисков понял, что нужно с помощью js вычислять height флеша при width=100%.

3. исходя из вышесказанного пока сделал так

<div id="flash">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="100%" id="fl_obj_ie" align="middle" onResize="afterResizeWin()">
<param name="allowScriptAccess" value="sameDomain" />
<param name="wmode" value="opaque">
<param name="movie" value="/tratata.swf" />
<param name="quality" value="best" /><param name="bgcolor" value="#ffffff" />
<embed id="fl_obj" src="/tratata" wmode="transparent" quality="best" bgcolor="#ffffff" width="100%" height="100%" scale="noborder" name="fl_obj" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<script type="text/javascript">
function afterResizeWin(){
var fl_obj=gebi('fl_obj');
if(!fl_obj)fl_obj=gebi('fl_obj_ie');
fl_obj.setAttribute('height', fl_obj.offsetWidth/1.8 + 'px');
};
addHandler(window, 'load', afterResizeWin);
addHandler(window, 'resize', afterResizeWin);
</script>
</div>

В результате если для embed задать id - флеш не грузится в Хроме и Сафари.

Может кто подскажет или готовое решение, или в какую сторону копать.

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy