Autor | Zpráva | ||
---|---|---|---|
Mufna Profil |
#1 · Zasláno: 24. 8. 2009, 13:33:13 · Upravil/a: Mufna
Zdravím Vás. Mám flash animaci vloženou pomocí flashobject.js. Nepoužívám novější SWFobject.js, protože bylo nutné flash aktivovat v IE7 a Opeře. S flashobject.js mám (kupodivu) potíže v Opeře starší než 9 (8,7, dál už to netestuji) a na druhé straně v nejnovějším IE 8. Vše ostatní (IE6, IE7, Chrome, FF 2, FF 3, Opera 9+) vypadá, že jede bez problémů. Problém je ten, že se nevytvoří SWF objekt. Poradíte mi, zda by ho šlo nějak jednoduše vytvořit ?
Konzole mi hlásí chybu "object required" na řádku 19. Zkusil jsem vytvořit nový objekt (viz zakomentovaná část kódu), ale asi s tím je třeba ještě něco dalšího udělat. com.deconcept.FlashObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, redirectUrl, detectKey){ this.DETECT_KEY = detectKey ? detectKey : 'detectflash'; this.skipDetect = com.deconcept.util.getRequestParameter(this.DETECT_KEY); this.params = new Object(); this.variables = new Object(); this.attributes = new Array(); // var swf = new Object(); 19. if(swf) this.setAttribute('swf', swf); if(id) this.setAttribute('id', id); atd. } Pak bych musel ještě upravit funkci (což bych snad už zvládl) com.deconcept.FlashObject.prototype.getHTML = function() { var flashHTML = ""; if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "PlugIn"); } flashHTML += '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') + '" name="'+ this.getAttribute('id') +'"'; var params = this.getParams(); for(var key in params){ flashHTML += ' '+ key +'="'+ params[key] +'"'; } pairs = this.getVariablePairs().join("&"); if (pairs.length > 0){ flashHTML += ' flashvars="'+ pairs +'"'; } flashHTML += '></embed>'; } else { // PC IE if (this.getAttribute("doExpressInstall")) { this.addVariable("MMplayerType", "ActiveX"); } flashHTML += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'" id="'+ this.getAttribute('id') +'">'; flashHTML += '<param name="movie" value="' + this.getAttribute('swf') + '" />'; var tags = this.getParamTags(); if(tags.length > 0){ flashHTML += tags; } var pairs = this.getVariablePairs().join("&"); if(pairs.length > 0){ flashHTML += '<param name="flashvars" value="'+ pairs +'" />'; } flashHTML += '</object>'; } return flashHTML; } |
||
Časová prodleva: 3 dny
|
|||
Chamurappi Profil |
#2 · Zasláno: 28. 8. 2009, 00:51:31
Reaguji na Mufnu:
Prosím o odkaz na živou ukázku. |
||
Časová prodleva: 15 let
|
0