Foros del Web » Creando para Internet » HTML »

Redireccionar flash

Estas en el tema de Redireccionar flash en el foro de HTML en Foros del Web. Buenos días amigos: Quisiera preguntarle si alguien conoce de alguna función JavaScript para que si el dispositivo no tiene instalado el Flash Player vaya a ...
  #1 (permalink)  
Antiguo 22/11/2015, 01:47
 
Fecha de Ingreso: julio-2012
Mensajes: 234
Antigüedad: 11 años, 9 meses
Puntos: 9
Redireccionar flash

Buenos días amigos:
Quisiera preguntarle si alguien conoce de alguna función JavaScript para que si el dispositivo no tiene instalado el Flash Player vaya a ejemplo.html sino sigue a inicio.html.
Tengo una sitio hecho en Sswishmax y en tablets, celulares, etc no se ve nada, por eso mi intención es redireccioonar a un aviiso.
Gracias.
  #2 (permalink)  
Antiguo 22/11/2015, 13:46
Avatar de AngelKrak  
Fecha de Ingreso: noviembre-2014
Mensajes: 917
Antigüedad: 9 años, 5 meses
Puntos: 91
Respuesta: Redireccionar flash

Mira amigo, prueba con este codigo y dime si te Funciona ;) solo recuerda cambiar las Direcciones jejeje xD

Código HTML:
Ver original
  1. <script language="JavaScript">
  2. function detectarflash(){
  3. flashpage = "flash.htm"
  4. upgradepage = "plugin-flash.htm"
  5. nonflashpage = "html.htm"
  6. cantdetectpage = "no-se-pudo-detectar-plugin.html"
  7.  
  8. noautoinstall = ""
  9. if(navigator.appName == "Microsoft Internet Explorer" &&
  10. (navigator.appVersion.indexOf("Mac") != -1 //
  11. navigator.appVersion.indexOf("3.1") != -1)){
  12. noautoinstall = "true";
  13. }
  14. if (navigator.appName == "Microsoft Internet Explorer" &&
  15. noautoinstall != "true"){
  16. window.location=flashpage;
  17. }
  18. else if(navigator.plugins){
  19. if(navigator.plugins["Shockwave Flash"]){
  20. window.location=flashpage;
  21. }
  22. else if(navigator.plugins["Shockwave Flash 2.0"]){
  23. window.location=upgradepage;
  24. }
  25. else{
  26. window.location=nonflashpage;
  27. }
  28. }
  29. else {
  30. window.location=cantdetectpage;
  31. }
  32. }

y luego cargamos la funcion en el body ;)
Código HTML:
Ver original
  1. <body onLoad="detectarflash()">
  #3 (permalink)  
Antiguo 22/11/2015, 17:58
 
Fecha de Ingreso: julio-2012
Mensajes: 234
Antigüedad: 11 años, 9 meses
Puntos: 9
Respuesta: Redireccionar flash

No funciona amigo
Te muestro como lo hice
(Dentro del HTML principal donde se aloja el movie flash)

<head>
Código Javascript:
Ver original
  1. <script language="JavaScript">
  2. function detectarflash(){
  3. flashpage = "webinicial.html"
  4. upgradepage = "webinicial.html"
  5. nonflashpage = "html.htm"
  6. cantdetectpage = "errorflashredirect.html"
  7.  
  8. noautoinstall = ""
  9. if(navigator.appName == "Microsoft Internet Explorer" &&
  10. (navigator.appVersion.indexOf("Mac") != -1 //
  11. navigator.appVersion.indexOf("3.1") != -1)){
  12. noautoinstall = "true";
  13. }
  14. if (navigator.appName == "Microsoft Internet Explorer" &&
  15. noautoinstall != "true"){
  16. window.location=flashpage;
  17. }
  18. else if(navigator.plugins){
  19. if(navigator.plugins["Shockwave Flash"]){
  20. window.location=flashpage;
  21. }
  22. else if(navigator.plugins["Shockwave Flash 2.0"]){
  23. window.location=upgradepage;
  24. }
  25. else{
  26. window.location=nonflashpage;
  27. }
  28. }
  29. else {
  30. window.location=cantdetectpage;
  31. }
  32. }
  33. </script>
</head>

y
<body>
Código HTML:
Ver original
  1. <body onLoad="detectarflash()" bgcolor="#000000">
</body>

Gracias.!!!
  #4 (permalink)  
Antiguo 22/11/2015, 19:16
Avatar de AngelKrak  
Fecha de Ingreso: noviembre-2014
Mensajes: 917
Antigüedad: 9 años, 5 meses
Puntos: 91
Respuesta: Redireccionar flash

Prueba con esto y dime que tal amigo ;)

Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <meta charset="UTF-8">
  4.     <title>Document</title>
  5.     <script type="text/javascript">
  6. function detectarflash(){
  7. flashpage = "flash.htm"
  8. upgradepage = "plugin-flash.htm"
  9. nonflashpage = "html.htm"
  10. cantdetectpage = "no-se-pudo-detectar-plugin.html"
  11.  
  12. noautoinstall = ""
  13. if(navigator.appName == "Microsoft Internet Explorer" &&
  14. (navigator.appVersion.indexOf("Mac") != -1 &&
  15.     navigator.appVersion.indexOf("3.1") != -1)){
  16. noautoinstall = "true";
  17. }
  18. if (navigator.appName == "Microsoft Internet Explorer" &&
  19. noautoinstall != "true"){
  20. window.location=flashpage;
  21. }
  22. else if(navigator.plugins){
  23. if(navigator.plugins["Shockwave Flash"]){
  24. window.location=flashpage;
  25. }
  26. else if(navigator.plugins["Shockwave Flash 2.0"]){
  27. window.location=upgradepage;
  28. }
  29. else{
  30. window.location=nonflashpage;
  31. }
  32. }
  33. else {
  34. window.location=cantdetectpage;
  35. }
  36. }
  37. </head>
  38. <body onLoad="detectarflash()">
  39. </body>
  40. </html>
  #5 (permalink)  
Antiguo 22/11/2015, 21:14
 
Fecha de Ingreso: julio-2012
Mensajes: 234
Antigüedad: 11 años, 9 meses
Puntos: 9
Respuesta: Redireccionar flash

Cita:
Iniciado por AngelKrak Ver Mensaje
Prueba con esto y dime que tal amigo ;)

Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <meta charset="UTF-8">
  4.     <title>Document</title>
  5.     <script type="text/javascript">
  6. function detectarflash(){
  7. flashpage = "flash.htm"
  8. upgradepage = "plugin-flash.htm"
  9. nonflashpage = "html.htm"
  10. cantdetectpage = "no-se-pudo-detectar-plugin.html"
  11.  
  12. noautoinstall = ""
  13. if(navigator.appName == "Microsoft Internet Explorer" &&
  14. (navigator.appVersion.indexOf("Mac") != -1 &&
  15.     navigator.appVersion.indexOf("3.1") != -1)){
  16. noautoinstall = "true";
  17. }
  18. if (navigator.appName == "Microsoft Internet Explorer" &&
  19. noautoinstall != "true"){
  20. window.location=flashpage;
  21. }
  22. else if(navigator.plugins){
  23. if(navigator.plugins["Shockwave Flash"]){
  24. window.location=flashpage;
  25. }
  26. else if(navigator.plugins["Shockwave Flash 2.0"]){
  27. window.location=upgradepage;
  28. }
  29. else{
  30. window.location=nonflashpage;
  31. }
  32. }
  33. else {
  34. window.location=cantdetectpage;
  35. }
  36. }
  37. </head>
  38. <body onLoad="detectarflash()">
  39. </body>
  40. </html>
  #6 (permalink)  
Antiguo 23/11/2015, 22:15
 
Fecha de Ingreso: julio-2012
Mensajes: 234
Antigüedad: 11 años, 9 meses
Puntos: 9
Respuesta: Redireccionar flash

Cita:
Iniciado por AngelKrak Ver Mensaje
Prueba con esto y dime que tal amigo ;)

Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.     <meta charset="UTF-8">
  4.     <title>Document</title>
  5.     <script type="text/javascript">
  6. function detectarflash(){
  7. flashpage = "flash.htm"
  8. upgradepage = "plugin-flash.htm"
  9. nonflashpage = "html.htm"
  10. cantdetectpage = "no-se-pudo-detectar-plugin.html"
  11.  
  12. noautoinstall = ""
  13. if(navigator.appName == "Microsoft Internet Explorer" &&
  14. (navigator.appVersion.indexOf("Mac") != -1 &&
  15.     navigator.appVersion.indexOf("3.1") != -1)){
  16. noautoinstall = "true";
  17. }
  18. if (navigator.appName == "Microsoft Internet Explorer" &&
  19. noautoinstall != "true"){
  20. window.location=flashpage;
  21. }
  22. else if(navigator.plugins){
  23. if(navigator.plugins["Shockwave Flash"]){
  24. window.location=flashpage;
  25. }
  26. else if(navigator.plugins["Shockwave Flash 2.0"]){
  27. window.location=upgradepage;
  28. }
  29. else{
  30. window.location=nonflashpage;
  31. }
  32. }
  33. else {
  34. window.location=cantdetectpage;
  35. }
  36. }
  37. </head>
  38. <body onLoad="detectarflash()">
  39. </body>
  40. </html>
Disculpame por la respuesta vacia anterior, andaba mal el foro y no me guardaba el mensaje.
Te comentaba, ahora el redireccionar flash funciona pero no ingresa a la pagina desde una pc comun, se queda refrescando o actualizandose continuamente con el internet explore 10.

Te dejo el vinculo de la pagina asi chequear lo que te digo.
http://gdfemia.com/web/estatica/webinicial.html

Y lo hice asi
Código HTML:
Ver original
  1. <meta charset="UTF-8">
Código HTML:
Ver original
  1. <body onLoad="detectarflash()">
Código Javascript:
Ver original
  1. <script type="text/javascript">
  2. function detectarflash(){
  3. flashpage = "webinicial.html"
  4. upgradepage = "webinicial.html"
  5. nonflashpage = "html.htm"
  6. cantdetectpage = "errorflash.html"
  7.  
  8. noautoinstall = ""
  9. if(navigator.appName == "Microsoft Internet Explorer" &&
  10. (navigator.appVersion.indexOf("Mac") != -1 &&
  11.     navigator.appVersion.indexOf("3.1") != -1)){
  12. noautoinstall = "true";
  13. }
  14. if (navigator.appName == "Microsoft Internet Explorer" &&
  15. noautoinstall != "true"){
  16. window.location=flashpage;
  17. }
  18. else if(navigator.plugins){
  19. if(navigator.plugins["Shockwave Flash"]){
  20. window.location=flashpage;
  21. }
  22. else if(navigator.plugins["Shockwave Flash 2.0"]){
  23. window.location=upgradepage;
  24. }
  25. else{
  26. window.location=nonflashpage;
  27. }
  28. }
  29. else {
  30. window.location=cantdetectpage;
  31. }
  32. }
  33. </script>

Gracias.!
  #7 (permalink)  
Antiguo 24/11/2015, 00:26
Avatar de AngelKrak  
Fecha de Ingreso: noviembre-2014
Mensajes: 917
Antigüedad: 9 años, 5 meses
Puntos: 91
Respuesta: Redireccionar flash

no entendi jejeje, pero fijate en mi pagina, funciona bien .-.

http://cs.angelkrak.hol.es/archivos/ss.html
  #8 (permalink)  
Antiguo 28/11/2015, 03:35
 
Fecha de Ingreso: julio-2012
Mensajes: 234
Antigüedad: 11 años, 9 meses
Puntos: 9
Respuesta: Redireccionar flash

El problema esta aqui

Código HTML:
Ver original
  1. <body bgcolor="#000000" onLoad="detectarflash()">

En onload

Internet explore 10 como lo interpretara y lo que me hace esta actualizar la pagina automaticamente sin parar, lo que no permite el ingreso a la web por dicho navegador desde la pc.
El re direccionamiento web movil por pagina flash funciona bien, pero sacando el onload logicamente no anda.
  #9 (permalink)  
Antiguo 28/11/2015, 07:15
Avatar de AngelKrak  
Fecha de Ingreso: noviembre-2014
Mensajes: 917
Antigüedad: 9 años, 5 meses
Puntos: 91
Respuesta: Redireccionar flash

conmigo funciona bien en IE 10, nose cual sera tu error jejeje xD
  #10 (permalink)  
Antiguo 28/11/2015, 16:30
 
Fecha de Ingreso: julio-2012
Mensajes: 234
Antigüedad: 11 años, 9 meses
Puntos: 9
Respuesta: Redireccionar flash

La verdad nose que raro

Lo configure de este modo
Código Javascript:
Ver original
  1. function detectarflash(){
  2. flashpage = "webinicial.html" -----> pagina en flash
  3. upgradepage = "" ----------> campo en blanco
  4. nonflashpage = "html.htm"
  5. cantdetectpage = "error.html" -----> pagina de error flash

Última edición por el_loco90; 28/11/2015 a las 16:35 Razón: agregar

Etiquetas: flash, redireccionar
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




La zona horaria es GMT -6. Ahora son las 01:43.