asp.net 怎样广告控件支持 flash 改怎么弄?在csdn上没找到合适的..

pdsnet 2008-11-11 05:01:26
如题..
现在要弄的 是 flash + 图片
希望各位高手给个解决办法.
我只能发100分的帖子.......
...全文
119 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
pdsnet 2008-11-12
  • 打赏
  • 举报
回复
[Quote=引用 12 楼 showbo 的回复:]
纯js实现的AdRorator,随机取广告

不过没有实现Impressions图片显示的权重


HTML code<script>
/*
Edit by ShowBo
--2008-5-11
please keep this message above,thks.
*/
function AdRorator(data){
this.data=data;
this.min=0;
this.max=(data&&data.length)?data.length-1:0;
this.adJson=null;
this.getRnd=function(min,max){
return Math.floor((max-min+1)*Math.rando…
[/Quote]相当的帅!!
Go 旅城通票 2008-11-12
  • 打赏
  • 举报
回复
纯js实现的AdRorator,随机取广告

不过没有实现Impressions图片显示的权重

<script>
/*
Edit by ShowBo
--2008-5-11
please keep this message above,thks.
*/
function AdRorator(data){
this.data=data;
this.min=0;
this.max=(data&&data.length)?data.length-1:0;
this.adJson=null;
this.getRnd=function(min,max){
return Math.floor((max-min+1)*Math.random()+min);
}
this.getExt=function(Str){
try{
return /\.([^\.]+)$/.exec(Str)[1].toLocaleLowerCase();
}catch(e){return "";}
}
this.getLineHTML=function(){
return "<a href='"+this.adJson.naviUrl+"' target='"+(this.adJson.target?this.adJson.target:"_blank")+"' title='"+this.adJson.title+"'>"
}
this.getSizeHTML=function(){
return (this.adJson.width?" width='"+this.adJson.width+"px'":"")
+(this.adJson.height?" height='"+this.adJson.height+"px'":"");
}
this.getSwfHTML=function(){
return this.getLineHTML()
+'<embed src="'+this.adJson.imgUrl+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"'
+' type="application/x-shockwave-flash"'+this.getSizeHTML()+'></embed></a>';
}
this.getImageHTML=function(){
return this.getLineHTML()
+"<img src='"+this.adJson.imgUrl+"' border='0' alt='" +this.adJson.title+"'"+this.getSizeHTML()+"/></a>";
}
this.getOtherHTML=function(){
return this.getLineHTML()+"点击查看\""+this.adJson.imgUrl+"\"</a>";
}
this.createHTML=function(){
if(this.max==this.min)return "";
this.adJson=this.data[this.getRnd(this.min,this.max)];
var adHTML="";
switch(this.getExt(this.adJson.imgUrl)){
case "swf":
adHTML+=this.getSwfHTML();
break;
case "gif":
case "jpg":
case "bmp":
case "png":
adHTML+=this.getImageHTML();
break;
default:
adHTML+=this.getOtherHTML();
break;
}
return adHTML;
}
}
//需要注意的是数据结构
var data=[{imgUrl:"http://b2b.lvyou168.cn/images/cttc.swf",naviUrl:"http://www.lvyou168.com",title:"中国旅游俱乐部",target:"_self",width:170,height:50}
,{imgUrl:"http://www.chinabn.org/cbntravel/images/logo.gif",naviUrl:"http://www.chinabn.org/cbntravel/",title:"中商世界游"}
,{imgUrl:"hello.txt",naviUrl:"http://www.chinabn.org",title:"中国商务集团"}];

var ad=new AdRorator(data);
document.write(ad.createHTML())
</script>
  • 打赏
  • 举报
回复
http://www.7stk.com/,进这个网站看看,看有没有帮助。
pdsnet 2008-11-12
  • 打赏
  • 举报
回复
[Quote=引用 9 楼 rovecat 的回复:]
http://blog.csdn.net/rovecat/archive/2008/11/02/3204885.aspx
[/Quote] 这个不是我想要的.
两个flash 刷新一次 变一个的那种.
syc958 2008-11-11
  • 打赏
  • 举报
回复
位置应该用css来控制...
syc958 2008-11-11
  • 打赏
  • 举报
回复
accp2008lx 2008-11-11
  • 打赏
  • 举报
回复
很好,很强大,但我想请问一下,如何我要设置这个特效所在的位置,该怎么弄,例如,我想把这个特效放在网页正中间的位置!
pdsnet 2008-11-11
  • 打赏
  • 举报
回复
是的... 我没有找到. 如果不行的话 有其他的解决办法吗?
syc958 2008-11-11
  • 打赏
  • 举报
回复
你说的是asp.net的广告控件AdRorator的使用方法吗?这个好像只能支持图片flash好像不可以....
pdsnet 2008-11-11
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 iuhxq 的回复:]
http://www.svnhost.cn/Article/Detail-51.shtml
[/Quote] 谢谢这个效果很好...
我现在想要的是 广告控件的 那种效果.中间还要有falsh.

iuhxq 2008-11-11
  • 打赏
  • 举报
回复
http://www.svnhost.cn/Article/Detail-51.shtml

62,074

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧