Foros del Web » Creando para Internet » Flash y Actionscript »

Detectar FLASH

Estas en el tema de Detectar FLASH en el foro de Flash y Actionscript en Foros del Web. Hola me gustaria saber si hya alguna manera de hacer que si no tiene el usuario el flash instalado en su navegador no vea la ...
  #1 (permalink)  
Antiguo 08/10/2007, 07:53
Borjimante
Invitado
 
Mensajes: n/a
Puntos:
Detectar FLASH

Hola me gustaria saber si hya alguna manera de hacer que si no tiene el usuario el flash instalado en su navegador no vea la presentación y salga un mensaje anunciandoselo

Un saludo
  #2 (permalink)  
Antiguo 08/10/2007, 08:23
Avatar de SinguerInc  
Fecha de Ingreso: octubre-2007
Ubicación: Barcelona, España
Mensajes: 551
Antigüedad: 16 años, 6 meses
Puntos: 5
Re: Detectar FLASH

Esto es mas o menos lo que recomienda adobe... espero que te sirva, debes conseguir el file AC_OETags.js
y en el caso que el usuario no tenga flashplayer instalado se ve lo que dice en "alternateContent"

Código:
<script src="AC_OETags.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 9;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// -----------------------------------------------------------------------------
// -->
</script>
<script language="JavaScript" type="text/javascript">
<!--
// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
var hasProductInstall = DetectFlashVer(6, 0, 65);

// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);


// Check to see if a player with Flash Product Install is available and the version does not meet the requirements for playback
if ( hasProductInstall && !hasRequestedVersion ) {
	// MMdoctitle is the stored document.title value used by the installation process to close the window that started the process
	// This is necessary in order to close browser windows that are still utilizing the older version of the player after installation has completed
	// DO NOT MODIFY THE FOLLOWING FOUR LINES
	// Location visited after installation is complete if installation is required
	var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
	var MMredirectURL = window.location;
    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
    var MMdoctitle = document.title;

	AC_FL_RunContent(
		"src", "playerProductInstall",
		"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
		"width", "304",
		"height", "112",
		"align", "middle",
		"id", "test",
		"quality", "high",
		"bgcolor", "#869ca7",
		"name", "test",
		"allowScriptAccess","sameDomain",
		"type", "application/x-shockwave-flash",
		"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
} else if (hasRequestedVersion) {
	// if we've detected an acceptable version
	// embed the Flash Content SWF when all tests are passed
	AC_FL_RunContent(
			"src", "test",
			"width", "304",
			"height", "112",
			"align", "middle",
			"id", "test",
			"quality", "high",
			"bgcolor", "#869ca7",
			"name", "test",
			"allowScriptAccess","sameDomain",
			"type", "application/x-shockwave-flash",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
  } else {  // flash is too old or we can't detect the plugin
    var alternateContent = 'Alternate HTML content should be placed here. '
  	+ 'This content requires the Adobe Flash Player. '
   	+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
    document.write(alternateContent);  // insert non-flash content
  }
// -->
</script>
<noscript>
  	<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="KannibalImageScroll" width="304" height="112"
			codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
			<param name="movie" value="test.swf" />
			<param name="quality" value="high" />
			<param name="bgcolor" value="#869ca7" />
			<param name="allowScriptAccess" value="sameDomain" />
			<embed src="test.swf" quality="high" bgcolor="#869ca7"
				width="304" height="112" name="test" align="middle"
				play="true"
				loop="false"
				quality="high"
				allowScriptAccess="sameDomain"
				type="application/x-shockwave-flash"
				pluginspage="http://www.adobe.com/go/getflashplayer">
			</embed>
	</object>
</noscript>
todo el codigo....lo puedes remplazar por algun objeto javaScript, googlea " SWFObject" por ejemplo y no tienes que escribir todo eso...
  #3 (permalink)  
Antiguo 08/10/2007, 16:44
 
Fecha de Ingreso: agosto-2006
Mensajes: 2
Antigüedad: 17 años, 8 meses
Puntos: 0
Re: Detectar FLASH

Utiliza swfobject

Última edición por max23; 18/02/2010 a las 18:43
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta

SíEste tema le ha gustado a 1 personas




La zona horaria es GMT -6. Ahora son las 20:52.