| 首页 | 新闻 | 网页 | 设计 | 色彩 | 原创 | 视觉 | 素材 | 动漫 | 酷站 | 策划 | 文案 | 访谈 | 运营 | 编程 | 数据库 | 服务器 | 下载 | 图库 | 
您的位置: 幽幽天空 > 网页 > 网页制作 > Flash教程 > Flash经验技巧 > 文章正文 用户登录
关于blog程序的几
如何加入透明Flas
为新浪博客添加fl
flashget下载联盟
弈天广告联盟关于
265联盟:“Flash
HKflash提供免费个
网络幼虫:关于我的
关于╃木蚂蚁㊣的
关于web2.0盈利模

关于Flash+HTML实用技巧的一点补充           

关于Flash+HTML实用技巧的一点补充

作者:佚名 来源:视觉效应 作者: 渐逝的黑色 更新:2007-1-13 20:57:08 错误报告 我要投稿

很早前在做本站V2时用到的一些代码,也比较实用,现在贡献出来,希望对大家有用
Flash与html 的一些实用技巧

状态栏的文字显示,可以用来在做E文字按钮的时候方便不懂E文的人理解
<script language="JavaScript">
function interpret(text) {
window.status = text
}
</script>

设为首页(一般关闭窗口,加入收藏都比较简单,这个稍微需要点技巧)
<script language="JavaScript">
function sethomepage(){
document.all.sethomepage.click()
}
</script>
<a id="sethomepage" href="#" onClick="this.style.behavior=’url(#default#homepage)’;this.setHomePage(’http://www.blackflasher.net’);"></a>

Flash中直接调用sethomepage()函数即可

一段ASP代码,取得访问者的IP地址,操作系统,浏览器(版本类型不是很全,大家可以再尝试补充一下)
<%
function GetBorwser()
dim BcType,Browser,System,Ver,strSystem,strBrowser
str = Request.ServerVariables("HTTP_USER_AGENT")
Agent = split(str,";")
Browser = "Unknown"
System = "Unknown"
BcType = 0
if InStr(Agent(1),"U")>0 and not(InStr(str, "Gecko")>0 and InStr(str, "Netscape")>0) then
Ver = mid(Agent(0),InStr(Agent(0), "/")+1)
Ver = mid(Ver,1,InStr(Ver,"[")-1)
Browser = "Netscape " + Ver
System = mid(Agent(0),InStr(Agent(0), "(")+1)
if not(InStr(System,"Windows")>0) then
System = replace(System, "Win", "Windows ")
end if
end if
if InStr(str, "Gecko")>0 and InStr(str, "Netscape")>0then
if InStr(str,"Netscape6")>0 then
Ver = mid(Agent(4),InStr(Agent(4),"Netscape6")+10)
else
Ver = mid(Agent(4),InStr(Agent(4),"Netscape")+9)
end if
Browser = "Netscape " & Ver
System = replace(Agent(2),")", "")
if not(InStr(System,"Windows")>0) then
System = replace(System, "Win", "Windows ")
end if
end if
if InStr(Agent(1),"IE") >0 then
Browser = Agent(1)
System = replace(Agent(2),")", "")
if not(InStr(System,"Windows")>0) then
System = replace(System, "Win", "Windows ")
end if
end if
if InStr(Agent(1),"IE") >0 and InStr(str,"Opera") >0 then
Browser = mid(Agent(2), InStr(Agent(2),")")+2, InStr(Agent(2),"Opera")-4)
System = mid(Agent(2),1,InStr(Agent(2),")"))
System = replace(System, ")", "")
if not(InStr(System,"Windows")>0) then
System = replace(System, "Win", "Windows ")
end if
end if
strSystem = System
if InStr(strSystem, "98") >0 and InStr(str,"Win 9x") >0 then
strSystem = replace(strSystem, "98", "Me")
end if
strSystem = replace(strSystem, "9x 4.90", "Me")
strSystem = replace(strSystem, "NT 5.0", "2000")
strSystem = replace(strSystem, "NT 5.1", "XP")
strSystem = replace(strSystem, "NT 5.0", "2000")
strSystem = replace(strSystem, "NT 5.2","2003")
strBrowser = replace(Browser, "MSIE", "Internet Explorer")
GetBorwser = strSystem&"+"&strBrowser&"+"&Request.ServerVariables("REMOTE_ADDR")
end function
dim bor,borwsys
bor = GetBorwser()
borwsys = split(bor,"+")
%>
//系统版本,浏览器,IP地址
这是SWF文件在读取的时候变量引用
system=<%=borwsys(0)%>&explorer=<%=borwsys(1)%>&ip=<%=borwsys(2)%>
文章录入:skyuu    责任编辑:skyuu 
  • 上一篇文章:

  • 下一篇文章:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    发表评论:
    姓名:  评 分: 1分 2分 3分 4分 5分
     
  • 严禁发表危害国家安全、政治、黄色淫秽等内容的评论。
  • 用户需对自己在使用幽幽天空服务过程中的行为承担法律责任。
  • 本站管理员有权保留或删除评论内容。
  • 评论内容只代表机友个人观点,与本网站立场无关。