Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] Flash Detection
- From: jaime at alazan.com (Jaime Iniesta)
- Subject: [Javascript] Flash Detection
- Date: Fri Mar 28 10:22:26 2003
Detecting if Flash is installed with JavaScript can be difficult as every browser behaves in a different way. To me, the best way to do this is using Flash to detect Flash... You can have a little Flash movie that redirects to the Flash main site. On that same starting page, you place an HTML redirection to the Non-Flash pages on a few seconds. If the visitos has Flash installed, the little movie (2 Kb or so) will redirect him/her to the Flash page. If not, the HTML redirection will redirect him/her to the non-flash page. Jaime -----Mensaje original----- De: javascript-bounces@xxxxxxxxxx [mailto:javascript-bounces@xxxxxxxxxx] En nombre de Marcelo Simon Enviado el: jueves, 27 de marzo de 2003 23:40 Para: [JavaScript List] Asunto: [Javascript] Flash Detection Hi all, I'm having a headache over this script to detect if is flash is present or not. If someone could see what my eyes are not seeing please help me . :) <img name="testMime" src="test.swf"> <script language="JavaScript"><!-- var can_play = false; var mimetype = 'application/x-shockwave-flash'; if (navigator.mimeTypes) { if (navigator.mimeTypes[mimetype] != null) { if (navigator.mimeTypes[mimetype].enabledPlugin != null) { can_play = true; } } } if (!can_play && navigator.appVersion.indexOf('MSIE') !=-1) { if (document.all && document.testMime.mimeType.toLowercase().indexOf('flash') !=-1) { can_play = true; } } if (can_play) window.location = 'plug.html'; else window.location = 'noplug.html'; //--> </script> TIA Marcelo Simon _______________________________________________ Javascript mailing list Javascript@xxxxxxxxxx https://lists.LaTech.edu/mailman/listinfo/javascript
- References:
- [Javascript] Flash Detection
- From: Marcelo Simon
- [Javascript] Flash Detection
- Prev by Date: [Javascript] form validation script
- Next by Date: [Javascript] form validation script
- Previous by thread: [Javascript] Flash Detection
- Next by thread: [Javascript] select
- Index(es):