我想实现的功能是,一个FALSH上覆盖一个透明的按钮(用户是看不到这个按钮的),当点击这个按钮(也就是FALSH)执行按钮的单击事件
我用的DIV分层做的,HTML代码如下:
<embed src="Flash/001.swf" width="100" height="100" style="Z-INDEX: 1; LEFT: 50px; WIDTH: 100px; POSITION: absolute; TOP: 50px; HEIGHT: 100px"> </embed>
<div id="d1" style="Z-INDEX: 3; LEFT: 100px; WIDTH: 100px; POSITION: absolute; TOP: 100px; HEIGHT: 100px">
<asp:Button id="Button1" runat="server" Height="100px" Width="100px" BackColor="Transparent"
BorderColor="Transparent" ForeColor="Transparent"></asp:Button>
</div>
但不管我怎么设置Z-INDEX的大小,FALSH就是在按钮的上头~~~
高手帮我看看我这段HTML代码有什么问题吗?

解决方案 »

  1.   

    没有必要这样吧,
    <a href=""><embed src="Flash/001.swf" width="100" height="100" style="Z-INDEX: 1; LEFT: 50px; WIDTH: 100px; POSITION: absolute; TOP: 50px; HEIGHT: 100px"> </embed></a>
    这样不行吗。
      

  2.   

    zjsen(星愿) Z-INDEX:-1
    是把FALSH那个设成-1就可以了吗?
    但效果还是一样,还是FALSH在上面,按钮被覆盖了
      

  3.   

    WZCNet(只有想不到,没有做不到) 
    你写的我也试了,但,还是不行~~~我用的是C#。NET,在设计界面上可以看出是按钮覆盖在FALSH上,但运行起来的结果还是FALSH覆盖按钮
      

  4.   

    http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/z-index.htm
    Positive z-index values are positioned above a negative (or lesser value) z-index. Two objects with the same z-index are stacked according to source order. A positive value positions the element above text that has no defined z-index, and a negative value positions it below. Set this parameter to null to remove the attribute.The zIndex property only applies to objects that have the position property set to relative or absolute.The property does not apply to windowed controls, such as select objects.As of Microsoft Internet Explorer 5.5, the iframe object is windowless and supports the zIndex property. In earlier versions of Internet Explorer, the iframe object is windowed and, like all windowed controls, ignores the zIndex property. If you maintain Web pages that were designed for earlier versions of Internet Explorer that do not support the zIndex property, you might want to redesign the pages, especially if the pages contain iframe objects that are stacked on top of windowed controls, such as select objects. You can use the visibility attribute to hide windowed controls that you want an iframe object to overlap. You can also position windowed controls so that iframe objects do not overlap them.Input from pointing devices, such as the mouse, does not penetrate through overlapping elements even if the elements are not visible. This is also true for positioned elements with a negative z-index unless: The parent is a scrolling container (that is, its overflow property is set to auto or scroll).
    The parent is positioned (that is, its position property is set to absolute or relative).
      

  5.   

    z-index 大的在上面  如果还是不行可以考虑把Flash放入一个div中去 设置div的z-index
      

  6.   

    goody9807() 
    你的方法我试过了~~~
    用普通的控件是可以实现的,
    不过如果你用FALSH的话,就是不能实现的,
    请问这是为什么啊?
      

  7.   

    Flash是属于Object 它的优先级别要比Div 等对象高 所以 总是在最上面
      

  8.   

    FLASH设置为透明:
    <PARAM NAME="WMode" VALUE="Transparent">