ZhipSoft.com
    冬去春来
        郑重声明:本Blog纯属个人学习、工作需要,记录相关资料。请不要发表任何有人身攻击的言论,谢谢!!www.ZhipSoft.com
posts - 94,comments - 149,trackbacks - 0

微软官方关于激活控件的文章:http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/overview/activating_activex.asp

解决方法:
把HTML页面中显示FLASH控件的代码写到JS中动态显示,如: <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="767" height="122">
    <param name="movie" value="http://www.dkonline.com.cn/images/menu.swf">
    <param name="WMode" value="Transparent">
    <param name="quality" value="high">
    <embed src="http://www.dkonline.com.cn/images/menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="767" height="122"></embed>
</object>
示例页面:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<script language="javascript" src="ss.js"></script>
<script language="javascript">
ShowMenu();
</script>
</body>
</html>ss.js文件:
function ShowMenu()
{
document.write(''
    +'<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="767" height="122">'
    +'    <param name="movie" value="http://www.dkonline.com.cn/images/menu.swf">'
    +'    <param name="WMode" value="Transparent">'
    +'    <param name="quality" value="high">'
    +'    <embed src="http://www.dkonline.com.cn/images/menu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="767" height="122"></embed>'
    +'</object>'
);
}

也可以使用SWFObject来输出FLASH http://blog.deconcept.com/swfobject/



        本Blog纯属个人学习、工作需要,记录相关资料。请不要发表任何有人身攻击的言论,谢谢! www.zhipsoft.cn
posted on 2007-12-01 23:58 ZhipSoft 阅读(874) 评论(2)  编辑  收藏 所属分类: JavaScript

FeedBack:
# 请教
2008-06-13 09:08 | chins
请教博主:我想用flash做些链接,比如链接到.doc文档,或链接到.exe文件,还有做下载的链接,能帮帮我不?  回复  更多评论
  
# 视觉屠斋
2009-03-15 16:38 | 屠斋
stop ();
onEnterFrame = function ()
{
var _loc3 = _root.getBytesLoaded() / _root.getBytesTotal() * 100;
var _loc2 = int(_loc3);
_root.loading.loadtxt1.a1.text = _loc2 + 1 + "%";
_root.loading.gotoAndStop(_loc2 + 1);
if (_loc2 == 100)
{
_root.loading.loadtxt1.a1.text = "100%";
delete onEnterFrame;
_root.gotoAndPlay(2);
} // end if
};
这是第一帧的代码
function slideMove(select)
{
for (var _loc3 = 0; _loc3 < slideNum; ++_loc3)
{
var _loc2 = this["slideMc" + _loc3];
_loc2._x = _loc2._x + speed * (pos[select][_loc3] + startPos - _loc2._x);
} // end of for
} // End of the function
stop ();
var slideNum = 6;
var speed = 1.500000E-001;
var slideWidth = 207;
var btnSpace = 70;
var frameTime = 100;
var timer = 1;
var select = 6;
var slidebtn = false;
var i = 1;
var startPos = this.slideMc0._x;
pos = new Array();
pos[6] = new Array(0, 70, 140, 210, 280, 350);
var i = 5;
while (i > 0)
{
pos = new Array();
var j = 0;
while (j < 6)
{
if (j >= i)
{
pos[j] = pos[6][j] + slideWidth;
}
else
{
pos[j] = pos[6][j];
} // end else if
++j;
} // end while
--i;
} // end while
var i = 0;
while (i < slideNum)
{
var name01 = this["slideMc" + i];
name01.zk = false;
name01.onRollOver = function ()
{
if (!this.zk)
{
for (var _loc4 = 0; _loc4 < slideNum; ++_loc4)
{
var _loc3 = _root["slideMc" + _loc4];
if (_loc3 != this)
{
_loc3.gotoAndStop(1);
_loc3.zk = false;
} // end if
} // end of for
this.gotoAndPlay(2);
this.zk = true;
select = int(this._name.slice(7)) + 1;
} // end if
};
++i;
} // end while
this.onEnterFrame = function ()
{
slideMove(select);
};
var url = new Array();
var i = 0;
while (i < slideNum)
{
url = "http://www.wushuangol.com/obt_zhuanti/pages_0" + (i + 1) + ".html";
++i;
} // end while
var i = 0;
while (i < slideNum)
{
var name01 = this["slideMc" + i];
name01.i = i;
name01.onRelease = function ()
{
getURL(url[this.i], "_blank");
};
++i;
} // end while
  回复  更多评论
  

只有注册用户登录后才能发表评论。


网站导航: