javascript:flush-flash
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン | 最新のリビジョン両方とも次のリビジョン | ||
javascript:flush-flash [2008/02/29 22:55] – image追加 dgbadmin | javascript:flush-flash [2008/04/07 23:15] – 0.1.1 dgbadmin | ||
---|---|---|---|
行 1: | 行 1: | ||
====== Flashを動的に表示してアクティブ化する - FlushFlash ====== | ====== Flashを動的に表示してアクティブ化する - FlushFlash ====== | ||
+ | |||
+ | コメントと更新履歴は[[http:// | ||
{{javascript: | {{javascript: | ||
行 7: | 行 9: | ||
それなら[[http:// | それなら[[http:// | ||
- | コメントと更新履歴は[[http:// | + | ところで、ある程度Flashを表示するWebサイトの場合は[[http:// |
===== 使い方の例 ===== | ===== 使い方の例 ===== | ||
行 21: | 行 24: | ||
flush.setTransparent(); | flush.setTransparent(); | ||
flush.into(" | flush.into(" | ||
+ | </ | ||
+ | |||
+ | メソッドチェーンもできる | ||
+ | <code javascript> | ||
+ | new FlushFlash("/ | ||
</ | </ | ||
行 27: | 行 35: | ||
<code javascript> | <code javascript> | ||
/** | /** | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
+ | */ | ||
+ | |||
+ | /** | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
*/ | */ | ||
FlushFlash = function(path, | FlushFlash = function(path, | ||
行 39: | 行 55: | ||
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 += '< | ||
行 80: | 行 117: | ||
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.txt · 最終更新: 2008/04/08 23:06 by dgbadmin