Thread View: pl.comp.lang.javascript
3 messages
3 total messages
Started by arsson
Sun, 06 Jan 2002 22:50
czy jest mozliwe (flash) ?
Author: arsson
Date: Sun, 06 Jan 2002 22:50
Date: Sun, 06 Jan 2002 22:50
6 lines
1042 bytes
1042 bytes
Witam !!! Problem jest taki ...czy jest mozliwe zeby za pomoca js sprawdzic czy ktos ma plugin flasha i jesli ma to ladowac strone normalnie a jesli nie ma to rozpoczac monitowanie o pobranie.. arsson dziekuje
Re: czy jest mozliwe (flash) ?
Author: Zbigniew Braniecki
Date: Mon, 07 Jan 2002 21:23
Date: Mon, 07 Jan 2002 21:23
13 lines
1336 bytes
1336 bytes
> Problem jest taki ...czy jest mozliwe zeby za pomoca js sprawdzic czy ktos > ma plugin flasha i jesli ma to ladowac strone normalnie a jesli nie ma to > rozpoczac monitowanie o pobranie.. W ns6 tak, w ns4 zupelnie inaczej a w IE tylko za pomoca VBScripta. Gdzies kiedys znalazlem jakies rozwiazanie, ale nie podam Ci linka :) pozdr. Gandalf -- Alladyn Team (http://alladyn.art.pl) proud member
Re: czy jest mozliwe (flash) ?
Author: Tomasz Przetacki
Date: Tue, 08 Jan 2002 09:57
Date: Tue, 08 Jan 2002 09:57
71 lines
3080 bytes
3080 bytes
> Witam !!!
> Problem jest taki ...czy jest mozliwe zeby za pomoca js sprawdzic czy ktos
> ma plugin flasha i jesli ma to ladowac strone normalnie a jesli nie ma to
> rozpoczac monitowanie o pobranie..
Może to ci coś pomoże
var requiredVersion = 5;
var flash2Installed = false;
var flash3Installed = false;
var flash4Installed = false;
var flash5Installed = false;
var maxVersion = 5;
var actualVersion = 0;
var hasRightVersion = false;
var oeTags = '';
var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;
if (isIE && isWin) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('flash2Installed =
(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
document.write('flash3Installed =
(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
document.write('flash4Installed =
(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
document.write('flash5Installed =
(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
document.write('</SCR' + 'IPT\> \n');
}
function detectFlash()
{
if (navigator.plugins) {
if (navigator.plugins["Shockwave Flash 2.0"] ||
navigator.plugins["Shockwave Flash"]) {
var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
var flashDescription = navigator.plugins["Shockwave Flash" +
isVersion2].description;
var flashVersion =
parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
flash2Installed = flashVersion == 2;
flash3Installed = flashVersion == 3;
flash4Installed = flashVersion == 4;
flash5Installed = flashVersion == 5;
}
}
for (var i = 2; i <= maxVersion; i++) {
if (eval("flash" + i + "Installed") == true) actualVersion = i;
}
if (actualVersion >= requiredVersion) hasRightVersion = true;
if (hasRightVersion) {
if (oeTagsFlash == 'brak') {
oeTags = oeTagsGif
} else {
oeTags = oeTagsFlash;
}
} else {
oeTags = oeTagsGif;
}
}
detectFlash();
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads