Ver Mensaje Individual
  #11 (permalink)  
Antiguo 13/01/2010, 17:50
currodelatajadera
 
Fecha de Ingreso: marzo-2009
Mensajes: 47
Antigüedad: 15 años, 8 meses
Puntos: 0
Respuesta: ayuda urgente con web en flash

Código HTML:
Ver original
  1. <title>index</title>
  2. <script language="JavaScript" type="text/javascript">
  3. <!--
  4. //v1.7
  5. // Flash Player Version Detection
  6. // Detect Client Browser type
  7. // Copyright 2005-2008 Adobe Systems Incorporated. All rights reserved.
  8. var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
  9. var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
  10. var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
  11. function ControlVersion()
  12. {
  13. var version;
  14. var axo;
  15. var e;
  16. // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
  17. try {
  18. // version will be set for 7.X or greater players
  19. axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
  20. version = axo.GetVariable("$version");
  21. } catch (e) {
  22. }
  23. if (!version)
  24. {
  25. try {
  26. // version will be set for 6.X players only
  27. axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
  28.  
  29. // installed player is some revision of 6.0
  30. // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
  31. // so we have to be careful.
  32.  
  33. // default to the first public version
  34. version = "WIN 6,0,21,0";
  35. // throws if AllowScripAccess does not exist (introduced in 6.0r47)
  36. axo.AllowScriptAccess = "always";
  37. // safe to call for 6.0r47 or greater
  38. version = axo.GetVariable("$version");
  39. } catch (e) {
  40. }
  41. }
  42. if (!version)
  43. {
  44. try {
  45. // version will be set for 4.X or 5.X player
  46. axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
  47. version = axo.GetVariable("$version");
  48. } catch (e) {
  49. }
  50. }
  51. if (!version)
  52. {
  53. try {
  54. // version will be set for 3.X player
  55. axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
  56. version = "WIN 3,0,18,0";
  57. } catch (e) {
  58. }
  59. }
  60. if (!version)
  61. {
  62. try {
  63. // version will be set for 2.X player
  64. axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
  65. version = "WIN 2,0,0,11";
  66. } catch (e) {
  67. version = -1;
  68. }
  69. }
  70.  
  71. return version;
  72. }
  73. // JavaScript helper required to detect Flash Player PlugIn version information
  74. function GetSwfVer(){
  75. // NS/Opera version >= 3 check for Flash plugin in plugin array
  76. var flashVer = -1;
  77.  
  78. if (navigator.plugins != null && navigator.plugins.length > 0) {
  79. if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
  80. var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
  81. var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
  82. var descArray = flashDescription.split(" ");
  83. var tempArrayMajor = descArray[2].split(".");
  84. var versionMajor = tempArrayMajor[0];
  85. var versionMinor = tempArrayMajor[1];
  86. var versionRevision = descArray[3];
  87. if (versionRevision == "") {
  88. versionRevision = descArray[4];
  89. }
  90. if (versionRevision[0] == "d") {
  91. versionRevision = versionRevision.substring(1);
  92. } else if (versionRevision[0] == "r") {
  93. versionRevision = versionRevision.substring(1);
  94. if (versionRevision.indexOf("d") > 0) {
  95. versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
  96. }
  97. }
  98. var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
  99. }
  100. }
  101. // MSN/WebTV 2.6 supports Flash 4
  102. else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
  103. // WebTV 2.5 supports Flash 3
  104. else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
  105. // older WebTV supports Flash 2
  106. else if (navigator.userAgent.toLowerCase().indexOf("webtv" ) != -1) flashVer = 2;
  107. else if ( isIE && isWin && !isOpera ) {
  108. flashVer = ControlVersion();
  109. }
  110. return flashVer;
  111. }
  112. // When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
  113. function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
  114. {
  115. versionStr = GetSwfVer();
  116. if (versionStr == -1 ) {
  117. return false;
  118. } else if (versionStr != 0) {
  119. if(isIE && isWin && !isOpera) {
  120. // Given "WIN 2,0,0,11"
  121. tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"]
  122. tempString = tempArray[1]; // "2,0,0,11"
  123. versionArray = tempString.split(","); // ['2', '0', '0', '11']
  124. } else {
  125. versionArray = versionStr.split(".");
  126. }
  127. var versionMajor = versionArray[0];
  128. var versionMinor = versionArray[1];
  129. var versionRevision = versionArray[2];
  130. // is the major.revision >= requested major.revision AND the minor version >= requested minor
  131. if (versionMajor > parseFloat(reqMajorVer)) {
  132. return true;
  133. } else if (versionMajor == parseFloat(reqMajorVer)) {
  134. if (versionMinor > parseFloat(reqMinorVer))
  135. return true;
  136. else if (versionMinor == parseFloat(reqMinorVer)) {
  137. if (versionRevision >= parseFloat(reqRevision))
  138. return true;
  139. }
  140. }
  141. return false;
  142. }
  143. }
  144. function AC_AddExtension(src, ext)
  145. {
  146. if (src.indexOf('?') != -1)
  147. return src.replace(/\?/, ext+'?');
  148. else
  149. return src + ext;
  150. }
  151. function AC_Generateobj(objAttrs, params, embedAttrs)
  152. {
  153. var str = '';
  154. if (isIE && isWin && !isOpera)
  155. {
  156. str += '<object ';
  157. for (var i in objAttrs)
  158. {
  159. str += i + '="' + objAttrs[i] + '" ';
  160. }
  161. str += '>';
  162. for (var i in params)
  163. {
  164. str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  165. }
  166. str += '</object>';
  167. }
  168. else
  169. {
  170. str += '<embed ';
  171. for (var i in embedAttrs)
  172. {
  173. str += i + '="' + embedAttrs[i] + '" ';
  174. }
  175. str += '> </embed>';
  176. }
  177. document.write(str);
  178. }
  179. function AC_FL_RunContent(){
  180. var ret =
  181. AC_GetArgs
  182. ( arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
  183. , "application/x-shockwave-flash"
  184. );
  185. AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
  186. }
  187. function AC_SW_RunContent(){
  188. var ret =
  189. AC_GetArgs
  190. ( arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
  191. , null
  192. );
  193. AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
  194. }
  195. function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  196. var ret = new Object();
  197. ret.embedAttrs = new Object();
  198. ret.params = new Object();
  199. ret.objAttrs = new Object();
  200. for (var i=0; i < args.length; i=i+2){
  201. var currArg = args[i].toLowerCase();
  202. switch (currArg){
  203. case "classid":
  204. break;
  205. case "pluginspage":
  206. ret.embedAttrs[args[i]] = args[i+1];
  207. break;
  208. case "src":
  209. case "movie":
  210. args[i+1] = AC_AddExtension(args[i+1], ext);
  211. ret.embedAttrs["src"] = args[i+1];
  212. ret.params[srcParamName] = args[i+1];
  213. break;
  214. case "onafterupdate":
  215. case "onbeforeupdate":
  216. case "onblur":
  217. case "oncellchange":
  218. case "onclick":
  219. case "ondblclick":
  220. case "ondrag":
  221. case "ondragend":
  222. case "ondragenter":
  223. case "ondragleave":
  224. case "ondragover":
  225. case "ondrop":
  226. case "onfinish":
  227. case "onfocus":
  228. case "onhelp":
  229. case "onmousedown":
  230. case "onmouseup":
  231. case "onmouseover":
  232. case "onmousemove":
  233. case "onmouseout":
  234. case "onkeypress":
  235. case "onkeydown":
  236. case "onkeyup":
  237. case "onload":
  238. case "onlosecapture":
  239. case "onpropertychange":
  240. case "onreadystatechange":
  241. case "onrowsdelete":
  242. case "onrowenter":
  243. case "onrowexit":
  244. case "onrowsinserted":
  245. case "onstart":
  246. case "onscroll":
  247. case "onbeforeeditfocus":
  248. case "onactivate":
  249. case "onbeforedeactivate":
  250. case "ondeactivate":
  251. case "type":
  252. case "codebase":
  253. case "id":
  254. ret.objAttrs[args[i]] = args[i+1];
  255. break;
  256. case "width":
  257. case "height":
  258. case "align":
  259. case "vspace":
  260. case "hspace":
  261. case "class":
  262. case "title":
  263. case "accesskey":
  264. case "name":
  265. case "tabindex":
  266. ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
  267. break;
  268. default:
  269. ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
  270. }
  271. }
  272. ret.objAttrs["classid"] = classid;
  273. if (mimeType) ret.embedAttrs["type"] = mimeType;
  274. return ret;
  275. }
  276. // -->
  277. </head>
  278. <body bgcolor="#336699">
  279.  
  280. <script language="JavaScript" type="text/javascript">
  281. AC_FL_RunContent(
  282. 'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0',
  283. 'width', '100%',
  284. 'height', '100%',
  285. 'src', 'index',
  286. 'quality', 'high',
  287. 'pluginspage', 'http://www.adobe.com/go/getflashplayer_es',
  288. 'align', 'middle',
  289. 'play', 'true',
  290. 'loop', 'true',
  291. 'scale', 'noscale',
  292. 'wmode', 'window',
  293. 'devicefont', 'false',
  294. 'id', 'index',
  295. 'bgcolor', '#336699',
  296. 'name', 'index',
  297. 'menu', 'true',
  298. 'allowFullScreen', 'false',
  299. 'allowScriptAccess','sameDomain',
  300. 'movie', 'index',
  301. 'salign', ''
  302. ); //end AC code
  303. <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="100%" height="100%" id="index" align="middle">
  304. <param name="allowScriptAccess" value="sameDomain" />
  305. <param name="allowFullScreen" value="false" />
  306. <param name="movie" value="index.swf" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="bgcolor" value="#336699" /> <embed src="index.swf" quality="high" scale="noscale" bgcolor="#336699" width="100%" height="100%" name="index" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer_es" />
  307. </body>
  308. </html>