Friday, 21st November 2008.

Posted on Thursday, 14th August 2008 by chris

在Firefox下看上面两个层叠的Flash的显示,效果会很怪异,两个Flash在显示时,层次混乱。下面是相应的代码:
<div style=”z-index:30;”>
<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0″ width=”550″ height=”400″>
<param name=”movie” value=”test0.swf” />
<param name=”quality” value=”high” />
<embed src=”test0.swf”
quality=”high” pluginspage=”http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash”
type=”application/x-shockwave-flash” width=”550″ height=”400″>
</embed>
</object>
</div>
<div style=”z-index:100; margin-top:-300px;”>
<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0″ width=”550″ height=”400″>
<param name=”movie” value=”test1.swf” />
<param name=”quality” value=”high” />
<embed src=”test1.swf” quality=”high” pluginspage=”http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash” type=”application/x-shockwave-flash” width=”550″ height=”400″></embed>
</object>
</div>
在IE下显示没有这个问题。不知道是Firefox的问题,还是Firefox下的Flashplayer的问题。我想了一个解决这个问题的办法,就是将其中的一个或者两个都分别放到另外的页面里,然后通过iframe来加载,而不是直接使用object标签。
下面将主页面index.html的body里面的代码改成下面这样:
<div>
<iframe src=”frame.html” width=”550″ height=”400″ frameborder=”0″></iframe>
</div>
<div style=”margin-top:-300px”>
<object classid=”clsid:D27CDB6E-AE6D-11cf-96B8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0″ width=”550″ height=”400″>
<param name=”movie” value=”test1.swf” />
<param name=”quality” value=”high” />
<embed src=”test1.swf” quality=”high” pluginspage=”http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash” type=”application/x-shockwave-flash” width=”550″ height=”400″></embed>
</object>
</div>
页面frame.html的body里面的代码如下:
<object [...]

Tags: , ,
Posted in Flash, Flex, HTML, 流水账 | Comments (0)

Posted on Thursday, 14th August 2008 by chris

Firefox在显示iframe标签时存在一个问题,请看下面的代码:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>test</title>
</head>
<body>
<iframe src=”http://www.baidu.com” width=”550″ height=”300″ frameborder=”0″ />
<iframe src=”http://www.baidu.com” width=”550″ height=”300″ frameborder=”0″ />
</body>
</html>
你会惊奇的发现它在Firefox下只显示了一个Iframe,而另一个没有显示。而将代码中的有关iframe的两行改成下面这个样子就能正常了:
<iframe src=”http://www.baidu.com” width=”550″ height=”300″ frameborder=”0″></iframe>
<iframe src=”http://www.baidu.com” width=”550″ height=”300″ frameborder=”0″></iframe>
这个问题在Firefox2和Firefox3中都存在,不知何故,IE下是没有这个问题的。

Tags: ,
Posted in HTML | Comments (0)