论坛|视频|图片
高级搜索
  所在位置:论坛首页 -> ┈┋BBSGood专区┋┈ -> 『BBSGood论坛交流』 -> [求助]
发表新的主题 发起新的投票 发起新的交易 发起新的任务 回复话题
 标题:[求助]
 作者:ice 发表于 2007-2-13 10:39:23收藏 编辑 删除 楼主  | 上一篇 下一篇

请教各位高手:
    我在往上找了一段Java******语言。就是图片浮动效果,我还在页面加了一个Flash。问题是图片总是在Flash下面浮动,我想让图片在它上面浮动,不知道该怎么办,希望各位能帮小弟一把......

html>
<head>
<title>网页特效|Linkweb.cn/Js|---图片飞舞效果</title>
</head><body>双击滚动,单击停止<br>
<table width="200" border="1">
  <tr>
    <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="770" height="137">
      <param name="movie" value="15.swf">
      <param name="quality" value="high">
      <embed src="15.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"

type="application/x-shockwave-flash" width="770" height="137"></embed>
    </object></td>
  </tr>
</table>
<!--将以下代码加入HTML的<Body></Body>之间-->

<div id="img" style="position:absolute;"><img src="images/flag.gif"
onClick="pause_resume();" width="85" height="55"></div>
<****** LANGUAGE="Java******">
<!-- Begin
var xPos = 20;
var yPos = document.body.clientHeight;
var step = 1;
var delay = 30;
var height = 0;
var Hoffset = 0;
var Woffset = 0;
var yon = 0;
var xon = 0;
var pause = true;
var interval;
img.style.foot = yPos;
function changePos() {
width = document.body.clientWidth;
height = document.body.clientHeight;
Hoffset = img.offsetHeight;
Woffset = img.offsetWidth;
img.style.left = xPos + document.body.scrollLeft;
img.style.top = yPos + document.body.scrollTop;
if (yon) {
yPos = yPos + step;
}
else {
yPos = yPos - step;
}
if (yPos < 0) {
yon = 1;
yPos = 0;
}
if (yPos >= (height - Hoffset)) {
yon = 0;
yPos = (height - Hoffset);
}
if (xon) {
xPos = xPos + step;
}
else {
xPos = xPos - step;
}
if (xPos < 0) {
xon = 1;
xPos = 0;
}
if (xPos >= (width - Woffset)) {
xon = 0;
xPos = (width - Woffset);
   }
}
function start() {
img.visibility = "visible";
interval = setInterval('changePos()', delay);
}
function pause_resume() {
if(pause) {
clearInterval(interval);
pause = false;
}
else {
interval = setInterval('changePos()',delay);
pause = true;
   }
}
start();
//  End -->
</******>

顶部
 快速回复
  • 支持UBB,HTML标签

  • 高级回复

  • 操作选项: 加精 解精 奖惩 设专题 设公告 解公告 固顶 总固顶 解固顶 结帖 解结帖 锁帖 解锁 移帖 删帖

    Copyright © 2004-2007  BBSGood.com Powered By: BBSGood.Speed Version 4.0

    首页 | 购买指南 | 商业版本 | 虚拟主机 | 特色介绍 | 下载中心 | 支付方式

    咨询电话:0575-84065635(传真)、7*24小时咨询服务:13606552007
    业务QQ:38958768、客服QQ1:415896239、客服QQ2:343896043、MSN:jccsxx@hotmail.com
    不良信息举报中心 浙ICP备05029817号