javascript:flush-flash
差分
このページの2つのバージョン間の差分を表示します。
次のリビジョン | 前のリビジョン | ||
javascript:flush-flash [2008/02/28 22:57] – 作成 dgbadmin | javascript:flush-flash [2008/04/08 23:06] (現在) – 0.1.1a copyrightの年を訂正 dgbadmin | ||
---|---|---|---|
行 1: | 行 1: | ||
====== Flashを動的に表示してアクティブ化する - FlushFlash ====== | ====== Flashを動的に表示してアクティブ化する - FlushFlash ====== | ||
+ | |||
+ | コメントと更新履歴は[[http:// | ||
+ | |||
+ | {{javascript: | ||
object/ | object/ | ||
それなら[[http:// | それなら[[http:// | ||
+ | |||
+ | ところで、ある程度Flashを表示するWebサイトの場合は[[http:// | ||
行 19: | 行 25: | ||
flush.into(" | flush.into(" | ||
</ | </ | ||
+ | |||
+ | メソッドチェーンもできる | ||
+ | <code javascript> | ||
+ | new FlushFlash("/ | ||
+ | </ | ||
+ | |||
行 24: | 行 36: | ||
<code javascript> | <code javascript> | ||
/** | /** | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
+ | */ | ||
+ | |||
+ | /** | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
*/ | */ | ||
FlushFlash = function(path, | FlushFlash = function(path, | ||
行 36: | 行 56: | ||
this.params = options || {}; | this.params = options || {}; | ||
this.params[" | this.params[" | ||
- | } | + | }; |
/** | /** | ||
- | | + | |
+ | | ||
+ | */ | ||
+ | FlushFlash.prototype.avoidCache | ||
+ | if (this.path.match(/ | ||
+ | this.path += "&"; | ||
+ | } else { | ||
+ | this.path += "?"; | ||
+ | } | ||
+ | this.path += " | ||
+ | return this; | ||
+ | }; | ||
+ | /** | ||
+ | | ||
+ | | ||
*/ | */ | ||
FlushFlash.prototype.setTransparent = function() { | FlushFlash.prototype.setTransparent = function() { | ||
this.params[" | this.params[" | ||
- | } | + | return this; |
+ | }; | ||
/** | /** | ||
- | | + | |
- | | + | |
+ | | ||
*/ | */ | ||
FlushFlash.prototype.setBgColor = function(color) { | FlushFlash.prototype.setBgColor = function(color) { | ||
this.params[" | this.params[" | ||
- | } | + | return this; |
+ | }; | ||
/** | /** | ||
- | | + | |
+ | | ||
*/ | */ | ||
FlushFlash.prototype.allowAccess = function() { | FlushFlash.prototype.allowAccess = function() { | ||
this.params[" | this.params[" | ||
- | } | + | return this; |
+ | }; | ||
/** | /** | ||
- | | + | |
- | | + | |
+ | | ||
*/ | */ | ||
FlushFlash.prototype.setFlashVars = function(vars) { | FlushFlash.prototype.setFlashVars = function(vars) { | ||
this.params[" | this.params[" | ||
- | } | + | return this; |
+ | }; | ||
/** | /** | ||
- | | + | |
- | | + | |
*/ | */ | ||
FlushFlash.prototype.build = function() { | FlushFlash.prototype.build = function() { | ||
- | var params = this.params; | ||
var o = ""; | var o = ""; | ||
o += '< | o += '< | ||
o += ' type=" | o += ' type=" | ||
+ | var params = this.params; | ||
for (var i in params) { | for (var i in params) { | ||
o += '< | o += '< | ||
行 77: | 行 118: | ||
o += '</ | o += '</ | ||
return o; | return o; | ||
- | } | + | }; |
/** | /** | ||
- | | + | |
*/ | */ | ||
FlushFlash.prototype.write = function() { | FlushFlash.prototype.write = function() { | ||
document.write(this.build()); | document.write(this.build()); | ||
- | } | + | }; |
/** | /** | ||
- | | + | |
- | | + | |
*/ | */ | ||
FlushFlash.prototype.into = function(elementId) { | FlushFlash.prototype.into = function(elementId) { | ||
document.getElementById(elementId).innerHTML = this.build(); | document.getElementById(elementId).innerHTML = this.build(); | ||
- | } | + | }; |
</ | </ | ||
javascript/flush-flash.1204207051.txt.gz · 最終更新: 2008/02/28 22:57 by dgbadmin