社区
网络通信/分布式开发
帖子详情
如何获得webbroswser控件上显示的flash?
dmsm
2003-11-18 06:27:13
如何获得webbroswser控件上显示的flash?
...全文
69
4
打赏
收藏
如何获得webbroswser控件上显示的flash?
如何获得webbroswser控件上显示的flash?
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
soloking
2003-11-30
打赏
举报
回复
最简单的方法
WebBrowser1.Navigate('g:\right.swf');
skimeister
2003-11-18
打赏
举报
回复
使用javascript
skimeister
2003-11-18
打赏
举报
回复
document.write('<\/table>\n');
document.write('<\/td>\n');
document.write('<td width="1" bgcolor="#000000"><\/td>\n');
document.write('<td width="449" valign="top" align="center">\n');
document.write('<div id="div2"><\/div>\n');
document.write('<\/td>\n');
document.write('<\/tr>\n');
document.write('<tr><td height="10" width="150"><\/td><td width="1" bgcolor="#000000"><\/td><td width="449"><\/td><\/tr>\n');
document.write('<tr><td colspan="3" height="1" bgcolor="#000000"><\/td><\/tr>\n');
document.write('<tr><td colspan="3" height="4"><\/td><\/tr>\n');
document.write('<tr>\n');
document.write('<td colspan="3">\n');
document.write('<font style=font-size:9pt> Help:<br> 1. Preview: Preview Flash files<br> 2. Save: Right click on the link and select \"Save Target As...\"<br> 3. Block: Add to Content Filter</font>\n');
document.write('<\/td>\n');
document.write('<\/tr>\n');
document.write('<\/table>\n');
document.write("<SCRIPT LANGUAGE=\"JavaScript\">\n");
document.write('function writelist() {\n');
document.write('var filelist="";\n');
document.write('var mysplit="/";\n');
document.write('if (writetype=="url") {\n');
document.write('for (i=0;i<swffileurl.length;i++)\n');
document.write(' filelist+=" <font size=2><a href=\'javascript:browserswf("+i+");\'>"+swffileurl[i].substr(swffileurl[i].lastIndexOf(mysplit)+1)+"<\/a><br><\/font>";\n');
document.write('} else if(writetype=="save") {\n');
document.write('for (i=0;i<swffileurl.length;i++)\n');
document.write(' filelist+=" <font size=2><a href=\'"+swffileurl[i]+"\'>"+swffileurl[i].substr(swffileurl[i].lastIndexOf(mysplit)+1)+"<\/a><br><\/font>";\n');
document.write('}\n');
document.write('else if(writetype=="hunter"){\n');
document.write('for (i=0;i<swffileurl.length;i++)\n');
document.write(' filelist+=" <font size=2><a href=\'javascript:external.addFilter(\\\""+swffileurl[i]+"\\\",0);\'>"+swffileurl[i].substr(swffileurl[i].lastIndexOf(mysplit)+1)+"<\/a><br><\/font>";\n');
document.write('}\n');
document.write("div1.innerHTML=filelist;\n");
document.write('div2.innerHTML="";\n');
document.write('}\n');
document.write('\n');
document.write('function getwritetype(mytype) {\n');
document.write(' if (mytype=="browser") {\n');
document.write(' writetype="url";\n');
document.write(' writelist();\n');
document.write(' if (tmpcode=="")\n');
document.write(' div2.innerHTML="";\n');
document.write(' else\n');
document.write(" div2.innerHTML=tmpcode;\n");
document.write(' }\n');
document.write(' else if(mytype=="save"){\n');
document.write(' writetype="save";\n');
document.write(' writelist();\n');
document.write(' div2.innerHTML="";\n');
document.write(' }\n');
document.write(' else if(mytype=="hunter"){\n');
document.write(' writetype="hunter";\n');
document.write(' writelist();\n');
document.write(' div2.innerHTML="";\n');
document.write(' }\n');
document.write('}\n');
document.write("\n");
document.write('function browserswf(flashpath) {\n');
document.write(' div2.style.visibility="visible";\n');
document.write(' div2.innerHTML=swfcode[flashpath];\n');
document.write(' tmpcode=swfcode[flashpath];\n');
document.write('}\n');
document.write("\n");
document.write("function doscale(myvalue,mytype) {\n");
document.write("var returnvalue;\n");
document.write("if (mytype==\"w\") {\n");
document.write("if (myvalue=440) returnvalue=440;\n");
document.write("if (myvalue>440) returnvalue=440;\n");
document.write("if (myvalue<440) returnvalue=myvalue;\n");
document.write("} else {\n");
document.write("myvalue=swffilew*myvalue/swffilewo;\n");
document.write("myvalue=Math.ceil(myvalue);\n");
document.write("returnvalue=myvalue;\n");
document.write("}\n");
document.write("return(returnvalue);\n");
document.write("}\n");
document.write("\n");
document.write("var swffileurl=new Array();\n");
document.write("var swffilew;\n");
document.write("var swffileh;\n");
document.write("var swfcode=new Array();\n");
document.write("var tmpcode=\"\";\n");
for (i=0;i<swffileurl.length;i++) {
document.write("swffileurl["+i+"]=\""+swffileurl[i]+"\";\n");
document.write("swffilewo="+swffilew[i]+";\n");
document.write("swffilew=doscale(swffilewo,\"w\");\n");
document.write("swffileh=doscale("+swffileh[i]+",\"h\");\n");
document.write("swfcode["+i+"]=\"<object classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\' width=\"+swffilew+\" height=\"+swffileh+\"><param name=movie value=\'"+swffileurl[i]+"\'><param name=quality value=high><embed src=\'"+swffileurl[i]+"\' quality=high pluginspage=\'http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\' type=\'application/x-shockwave-flash\' width=\"+swffilew+\" height=\"+swffileh+\"></embed></object>\"\n");
}
document.write('var writetype="url";\n');
document.write("writelist();\n");
document.write("<\/SCRIPT>\n");
document.write("<\/BODY>\n");
document.write("<\/HTML>\n");
}
function frame_split(doc){
if(doc.frames.length>0){
for(var i=0;i<doc.frames.length;i++){
try{
var doc_frames=doc.frames[i].document;
}
catch(e){
continue;
}
frame_split(doc_frames);
}
getinfo(doc);
}
else{
getinfo(doc);
}
}
var swffileurl=new Array();
var swffilew=new Array();
var swffileh=new Array();
frame_split(document);
mainwindow();
</script>
skimeister
2003-11-18
打赏
举报
回复
<script language="javascript">
//***************************************************************
// File name:FlashSave.html
// Language:Javascript
// Author:kaichun
// Function:Provide the ability to view and save flash files
// Version:1.21
//***************************************************************
function writearray(filesrc,filewidth,fileheight){
swffileurl.push(filesrc);
swffilew.push(filewidth);
swffileh.push(fileheight);
return;
}
function processurl(myurl,srcDocument){
var endurl;
if(myurl.indexOf("http://")!=-1)
endurl=myurl;
else{
var pageurl;
var hostname=srcDocument.location.hostname;
var pathname=srcDocument.location.pathname;
var portname=srcDocument.location.port;
if(portname.length==0){
pageurl="http://"+hostname+pathname;
}
else{
pageurl="http://"+hostname+":"+portname+pathname;
}
var pagepath=pageurl.substring(0,pageurl.lastIndexOf("/")+1);
if(myurl.charAt(0)!="." && myurl.charAt(0)!="/")
endurl=pagepath+myurl;
else if(myurl.charAt(0)=="/")
endurl="http://"+hostname+myurl;
else{
if(myurl.charAt(0)=="."){
endurl=pagepath;
while(myurl.charAt(0)=="."){
myurl=myurl.substr(3);
endurl=endurl.substring(0,endurl.length-1);
endurl=endurl.substring(0,endurl.lastIndexOf("/")+1);
}
endurl=endurl+myurl;
}
}
}
return(endurl);
}
function getinfo(srcDocument){
for(var i=0;i<srcDocument.applets.length;i++){
tObject=srcDocument.applets[i];
t=tObject.codeBase;
ss=t.toLowerCase();
x=tObject.classid;
xx=x.toLowerCase();
if(ss.indexOf("macromedia.com")>=0 || xx.indexOf("clsid:d27cdb6e-ae6d-11cf-96b8-444553540000")>=0){
tt=tObject.getAttribute("Movie");
w=tObject.width;
h=tObject.height;
if(w.indexOf("%")>0 || h.indexOf("%")>0 ){
w=440;
h=400;
}
tt=processurl(tt,srcDocument);
writearray(tt,w,h);
}
}
for(var i=0;i<srcDocument.embeds.length;i++){
tObject=srcDocument.embeds[i];
t=tObject.src;
ss=t.toLowerCase();
if(ss.indexOf(".swf")>0){
tt=tObject.src;
w=tObject.width;
h=tObject.height;
if(w.indexOf("%")>0 || h.indexOf("%")>0 ){
w=440;
h=400;
}
tt=processurl(tt,srcDocument);
writearray(tt,w,h);
}
}
}
function mainwindow(){
var outstr="";
document.write("<HTML>\n");
document.write("<HEAD>\n");
document.write("<TITLE>Flash Save<\/TITLE>\n");
document.write("<STYLE TYPE=\"TEXT\/CSS\">\n");
document.write(".a1{text-decoration:none;color:#000000;}\n");
document.write("a.a1:hover{text-decoration:underline;color:red}\n");
document.write("a.a1:active{text-decoration:underline;color:#000000}\n");
document.write("a.a1:visited{text-decoration:underline;color:#000000}\n");
document.write("<\/STYLE>\n");
document.write("<\/HEAD>\n");
document.write('<BODY leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">\n');
document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0">\n');
document.write('<tr>\n');
document.write('<td width="150" height="310" align="right" valign="top">\n');
document.write('<table width="150" border="0" cellspacing="0" cellpadding="0">\n');
document.write('<tr>\n');
document.write('<td><div id="div1"><\/div><\/td>\n');
document.write('<\/tr>\n');
document.write('<tr>\n');
document.write('<td><input type="radio" value="browser" checked onclick="getwritetype(\'browser\')" name="listctrl"><font size="2">Preview<\/font><br>\n');
document.write('<input type="radio" value="save" onclick="getwritetype(\'save\')" name="listctrl"><font size="2">Save<\/font><br>\n');
document.write('<input type="radio" value="block" onclick="getwritetype(\'hunter\')" name="listctrl"><font size="2">Block<\/font><\/td><\/tr>\n');
Shockwave
flash
object
控件
Shockwave
flash
object
控件
利用MFC的Picture
控件
显示
图像和视频/摄像头画面(VS2008+OpenCV2.0)
利用MFC的Picture
控件
显示
和处理图像,后面又添加了播放视频和捕获摄像头画面的功能,其中播放视频的功能只有 'Play' 和 'Stop',不能实现暂停
C#自定义
控件
库
C#自定义
控件
库
WPF经典教程之WPF
控件
内容模型
WPF
控件
内容模型主要指派生于System.Windows.Controls.Control类的各种
控件
,其主要分为四部分: • ContentControl • HeaderedContendControl • ItemsControl • HeaderedItemsControl 其继承关系请参考我上一篇博客的内容。.... (更多资源:http://cleopard.download.csdn.net/) (福利:http://xuemeilaile.com/) WPF经典教程之WPF体系结构 http://download.csdn.net/detail/cleopard/7999393 WPF经典教程之WPF应用程序管理 http://download.csdn.net/detail/cleopard/8002969 WPF经典教程之WPF窗体 http://download.csdn.net/detail/cleopard/8002979 WPF经典教程之StackPanel、WrapPanel、DockPanel布局 http://download.csdn.net/detail/cleopard/8002985 WPF经典教程之Grid、UniformGrid布局 http://download.csdn.net/detail/cleopard/8002993 WPF经典教程之Canvas、InkCanvas布局 http://download.csdn.net/detail/cleopard/8002997 WPF经典教程之WPF
控件
模型 http://download.csdn.net/detail/cleopard/8002999
C#
控件
大全
1、数据
显示
控件
2、数据绑定和数据定位
控件
3、文本编辑
控件
4、信息
显示
控件
5、网页
显示
控件
6、从列表中选择
控件
7、图形
显示
控件
8、图形存储
控件
9、值的设置
控件
10、数据的设置
控件
11、对话框
控件
12、菜单
控件
13、命令
控件
14、用户帮助
控件
15、分组
控件
16、音频
控件
网络通信/分布式开发
1,594
社区成员
32,947
社区内容
发帖
与我相关
我的任务
网络通信/分布式开发
Delphi 网络通信/分布式开发
复制链接
扫一扫
分享
社区描述
Delphi 网络通信/分布式开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章