XOOPS
新闻
新闻 XOOPS世界 开发者 悬赏 主题 存档 提交新闻
  • 首页
  • XOOPS
    • 关于XOOPS
    • 为什么选择XOOPS?
    • 特点和功能
    • 使用条款
    • 隐私声明
    • 许可
  • 论坛
    • 论坛索引
    • 最近主题
  • 新闻
  • 主题
  • 模块
    • 模块 @ GitHub
    • 旧仓库
  • XOOPS常见问题解答
  • 账户
    • 登录
    • 注册
  • 下载XOOPS 2.5.11

新闻: 教程:创建可拉伸的Flash动画标题

发布者: hardyvojeOn 2006/6/2 16:30:00 12848次阅读
http://www.omnetwork.net 发布了教程,教你如何在XOOPS主题中创建和集成可拉伸的Flash动画标题。

教程URL
http://www.omnetwork.net/cms/modules/magazine/article.php?articleid=22

教程:创建可拉伸的Flash动画标题

Tutorial: Creating stretchable Flash animated header
前一篇文章
下一篇文章
评论归作者所有。我们不对其内容负责。
user

 ie

 Sophie2   发布于 06/05/2006 19:13   偶尔来访   加入于 11/21/2005   评论 81    

由于microshit的ie使用,请使用以下代码:

将以下代码保存为swfobject.js:

/**
 * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * https://open-source.org.cn/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formarly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept=="undefined"){var deconcept=new Object();}
if(
typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(
typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){
if(!
document.createElement||!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(
_1){this.setAttribute("swf",_1);}
if(
id){this.setAttribute("id",id);}
if(
w){this.setAttribute("width",w);}
if(
h){this.setAttribute("height",h);}
if(
_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),_7);
if(
c){this.addParam("bgcolor",c);}
var 
q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var 
_d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(
_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},
getAttribute:function(_10){
return 
this.attributes[_10];
},
addParam:function(_11,_12){
this.params[_11]=_12;
},
getParams:function(){
return 
this.params;
},
addVariable:function(_13,_14){
this.variables[_13]=_14;
},
getVariable:function(_15){
return 
this.variables[_15];
},
getVariables:function(){
return 
this.variables;
},
getVariablePairs:function(){
var 
_16=new Array();
var 
key;
var 
_18=this.getVariables();
for(
key in _18){
_16.push(key+"="+_18[key]);}
return 
_16;
},
getSWFHTML:function(){
var 
_19="";
if(
navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(
this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");}
_19="application/x-shockwave-flash" src=""+this.getAttribute("swf")+"" width=""+this.getAttribute("width")+"" height=""+this.getAttribute("height")+""";
_19+=" id=""+this.getAttribute("id")+"" name=""+this.getAttribute("id")+"" ";
var 
_1a=this.getParams();
for(var 
key in _1a){_19+=[key]+"=""+_1a[key]+"" ";}
var 
_1c=this.getVariablePairs().join("&");
if(
_1c.length>0){_19+="flashvars=""+_1c+""";}
_19+="/>";
}else{
if(
this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");}
_19="id")+"" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width=""+this.getAttribute("width")+"" height=""+this.getAttribute("height")+"">";
_19+="movie" value=""+this.getAttribute("swf")+"" />";
var 
_1d=this.getParams();
for(var 
key in _1d){_19+="";}
var 
_1f=this.getVariablePairs().join("&");
if(
_1f.length>0){_19+="flashvars" value=""+_1f+"" />";}
_19+="";}
return 
_19;
},
write:function(_20){
if(
this.getAttribute("useExpressInstall")){
var 
_21=new deconcept.PlayerVersion([6,0,65]);
if(
this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){
this.setAttribute("doExpressInstall",true);
this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));
document.title=document.title.slice(0,47)+" - Flash Player Installation";
this.addVariable("MMdoctitle",document.title);}}
if(
this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){
var 
n=(typeof _20=="string")?document.getElementById(_20):_20;
n.innerHTML=this.getSWFHTML();
return 
true;
}else{
if(
this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}
return 
false;}};
deconcept.SWFObjectUtil.getPlayerVersion=function(_23,_24){
var 
_25=new deconcept.PlayerVersion([0,0,0]);
if(
navigator.plugins&&navigator.mimeTypes.length){
var 
x=navigator.plugins["Shockwave Flash"];
if(
x&&x.description){_25=new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|s)+/,"").replace(/(s+r|s+b[0-9]+)/,".").split("."));}
}else{try{
var 
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
for(var 
i=3;axo!=null;i++){
axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
_25=new deconcept.PlayerVersion([i,0,0]);}}
catch(
e){}
if(
_23&&_25.major>_23.major){return _25;}
if(!
_23||((_23.minor!=0||_23.rev!=0)&&_25.major==_23.major)||_25.major!=6||_24){
try{
_25=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
catch(
e){}}}
return 
_25;};
deconcept.PlayerVersion=function(_29){
this.major=parseInt(_29[0])!=null?parseInt(_29[0]):0;
this.minor=parseInt(_29[1])||0;
this.rev=parseInt(_29[2])||0;};
deconcept.PlayerVersion.prototype.versionIsValid=function(fv){
if(
this.major<fv.major){return false;}
if(
this.major>fv.major){return true;}
if(
this.minor<fv.minor){return false;}
if(
this.minor>fv.minor){return true;}
if(
this.rev<fv.rev){return false;}return true;};
deconcept.util={getRequestParameter:function(_2b){
var 
q=document.location.search||document.location.hash;
if(
q){
var 
_2d=q.indexOf(_2b+"=");
var 
_2e=(q.indexOf("&",_2d)>-1)?q.indexOf("&",_2d):q.length;
if(
q.length>1&&_2d>-1){
return 
q.substring(q.indexOf("=",_2d)+1,_2e);
}}return 
"";}};
if(Array.
prototype.push==null){
Array.
prototype.push=function(_2f){
this[this.length]=_2f;
return 
this.length;};}
var 
getQueryParamValue=deconcept.util.getRequestParameter;
var 
FlashObject=deconcept.SWFObject; // for backwards compatibility
var SWFObject=deconcept.SWFObject;


然后将其放入head中:

<script type="text/javascript" src="swfobject.js">script>


然后是你的flash电影位置:

<div id="flashcontent">Flashdiv>


然后是下面的代码:

<script type="text/javascript">
var 
so = new SWFObject("my_flash.swf", "NAME", "WIDTH", "HEIGHT", "QUALITY", "BGCOLOR");
so.write("flashcontent");
script>

 
user

 Re: ie

 hardyvoje   发布于 2006/06/06 14:35   不太害羞   加入 2005/12/25   评论 123    

你好,Sophie2,

你是否同意将此片段插入我的教程作为附录?

这将会很有用!
谢谢!

 
user

 Re: ie

 Sophie2   发布于 2006/06/06 15:05   偶尔来访   加入 2005/11/21   评论 81    

当然

 


Login

Register now!  |  Lost Password?

Search

Advanced Search

Recent Comments

  • Re: New Admin Theme for XOOPS (Beta)
    Publisher Bleekk 06/03/2024 18:53
  • Re: New Admin Theme for XOOPS (Beta)
    Publisher kakos 05/29/2024 14:51
  • Re: XOOPS 2.5.11 Final Released
    Publisher HymanSarwar 02/16/2024 5:22
  • Re: XOOPS 2.5.11 Final Released
    Publisher Mamba 12/31/2023 15:24
  • Re: XOOPS 2.5.11 Final Released
    Publisher alain01 12/29/2023 10:16

Who's Online

299 user(s) are online (21 user(s) are browsing XOOPS News)


Members: 0


Guests: 299


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Aug 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits

  • {{ record.sha.slice(0, 7) }} - {{ record.commit.message | truncate }}
    {{ record.commit.author.name }} {{ record.commit.author.date | formatDate }}

Archives

News archives

  • January 2017
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • July 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
  • April 2005
  • March 2005
  • February 2005
  • January 2005
  • December 2004
  • November 2004
  • October 2004
  • September 2004
  • August 2004
  • July 2004
  • June 2004
  • May 2004
  • April 2004
  • March 2004
  • February 2004
  • January 2004
  • December 2003
  • November 2003
  • October 2003
  • September 2003
  • August 2003
  • July 2003
  • June 2003
  • May 2003
  • April 2003
  • March 2003
  • February 2003
  • January 2003
  • December 2002
  • November 2002
  • October 2002
  • September 2002
  • August 2002
  • July 2002
  • June 2002
  • May 2002
  • April 2002
  • March 2002
  • February 2002
  • January 2002
  • December 2001
  • December 1969
About us
  • About Xoops
  • Why XOOPS?
  • Board of Advisors
  • Xoops Innovators
  • XOOPSers
  • XOOPS Etiquette
Learn
  • Books
  • FAQ
  • Core Guides
  • Module Guides
Use
  • Download Xoops
  • Module @ GitHub
  • Themes@ GitHub
  • Languages @ GitHub
  • Support Forums
  • International Support
Develop GitHub
  • Core @ GitHub
  • Module @ GitHub
  • Themes@ GitHub
  • Languages @ GitHub
  • Legacy XOOPS @ SourceForge
  • Coding Standards PSR-2
Contribute
  • $$$ Donations
  • Join Team
  • Core @ GitHub
  • Module @ GitHub
  • Themes@ GitHub
  • Languages @ GitHub
  • Report Core Bug
Connect
  • Facebook
  • LinkedIn
  • Flickr
  • YouTube
  • Ohloh
  • Twitter

Terms of Use | Privacy Policy | Hosted by Arvixe Hosting | RSS 2.0 Button

Design: B.Heyula