开发者

HTML : Make <object> a link

开发者 https://www.devze.com 2022-12-16 12:32 出处:网络
I have HTML code I got from a designer of the form: <object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-44455开发者_StackOverflow3540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/

I have HTML code I got from a designer of the form:

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-44455开发者_StackOverflow3540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
      <param name="movie" value="PRODUCTS.swf" />
      <param name="quality" value="high" />
      <param name="bgcolor" value="#FFFFFF" />
      <embed src="PRODUCTS.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="20" bgcolor="#FFFFFF"></embed> 
    </object>

I want to turn it into a link, so when I click it it will go to ./Products.html can't figure out how.

I wrapped entire object into <a href...></a> but when I click it, it gives me warning about going through Internet, and doesn't change the page.

I have very little understanding of Flash. This is probably trivial, but I can't find right answer.

Note: I could get more info from the designer, but loosing that flash is also acceptable.


This is not as easy as one would think. When you click inside the Flash movie, that click will be captured by the movie and not the surrounding HTML document. That means that any element you put around the movie will not have any effect. (No reliable cross-browser effect, anyway.)

The simplest way would be having the Flash designer add a invisible link element to the movie.

The second simplest way I can think of is making the movie wmode=transparent and overlaying it with an invisible <a> element. But that is already horribly complicated, depends on Flash versions, how the movie is compiled, and so on.

Best talk to the designer and have him/her change the movie.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号