1/*__________________________________________________ 2 3 soFlashObject.js (ver 0.9 / 2005.10.14) 4 (c) 2005 T.Hayashi <[email protected]> 5 __________________________________________________*/ 6 7function soFlashObject() { 8 this.majorVer = 0; 9 this.minorVer = 0; 10 this.revision = 0; 11 this.beta = 0; 12 this.tgtMajorVer = 1; 13 this.tgtMinorVer = 0; 14 this.tgtRevision = 0; 15 this.altHtml = 'Please download the latest version of the free <a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Flash Player</a>'; 16 this.w = 200; 17 this.h = 200; 18 this.param = {}; 19 this.param.allowScriptAccess = 'sameDomain'; 20 this.param.quality = 'high'; 21 this.param.menu = 'false'; 22 this.verChk(); 23}; 24 25soFlashObject.prototype.verChk = function() { 26 var np = navigator.plugins,nm = navigator.mimeTypes,mt = 'application/x-shockwave-flash',p; 27 if(nm && nm[mt] && nm[mt].enabledPlugin) { 28 for(var i=0; i< np.length; i++) { 29 p = np[i].description; 30 if(p.indexOf('Flash') >= 0) { 31 p = p.split(' ').join('').replace('ShockwaveFlash',''); 32 if(p.indexOf('r') >= 0) p = String(p.replace('r','.') + '.0').split('.'); 33 else if(p.indexOf('b') >= 0) p = p.replace('b','.0.').split('.'); 34 break; 35 } 36 } 37 } else if(window.ActiveXObject) { 38 try { 39 var f = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); 40 p = f.GetVariable('$version').split(' ')[1].split(','); 41 } catch(e) {}; 42 } 43 if(typeof(p) != "undefined") { 44 with(this) {this.majorVer = Number(p[0]);this.minorVer = Number(p[1]);this.revision = Number(p[2]);beta = Number(p[3])}; 45 } 46 47}; 48 49soFlashObject.prototype.flaHtml = function() { 50 if(!this.src) return false; 51 if(!this.id) this.id = this.src.substring(0,this.src.indexOf('.')); 52 var temp1 = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="'+this.w+'" height="'+this.h+'" id="'+this.id+'" align="middle">'; 53 var temp2 = '<embed width="'+this.w+'" height="'+this.h+'" name="'+this.id+'" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"'; 54 temp1 += this.objParam('movie',this.src); 55 temp2 += this.embParam('src',this.src); 56 for(var prop in this.param) {temp1 += this.objParam(prop,this.param[prop]);temp2 += this.embParam(prop,this.param[prop])}; 57 temp1 += temp2 + ' /></object>'; 58 return temp1; 59}; 60 61soFlashObject.prototype.objParam=function(a,b) {return '<param name="'+a+'" value="'+b+'" />'}; 62soFlashObject.prototype.embParam=function(a,b) {return ' '+a+'="'+b+'"'}; 63soFlashObject.prototype.enable=function() {var a = this.majorVer * 10000 + this.minorVer * 1000 + this.revision;var b = this.tgtMajorVer * 10000 + this.tgtMinorVer * 1000 + this.tgtRevision;return (a >= b)}; 64soFlashObject.prototype.flaWrite=function() {document.write(this.flaHtml())}; 65soFlashObject.prototype.altWrite=function() {document.write(this.altHtml)}; 66soFlashObject.prototype.write=function() {if(this.enable()) {this.flaWrite()} else {this.altWrite()}}; 67soFlashObject.prototype.getHtml=function() {if(this.enable()) {return this.flaHtml()} else {return this.altHtml}};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.