Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: Checking for ActiveX Controls |
From: | Jeff Tweddale |
Date: | Fri, 8 Jan 1999 18:39:14 GMT |
Hello. I hope you're still out there. Last year you wrote a posting to the Flash list about detecting Flash using VB. I have a good script that uses MIME types to detect Flash and Authorware's Web Player in NN browsers. But none that detects an ActiveX control well.
Do you have any idea where I can gather an ActiveX chek script - or a modifiaction of the one below - so that I can send a non-Web Player (Authorware) Active X user to a download page and a user who has the ActiveX to another page?
I'd really appreciate any help or advice you can provide. I pasted your last column below.
The basic idea behind the code is fairly simple. The CreateObject() VBScript function creates an ActiveX automation object for the Flash control. This call will fail and return "nothing" if Flash is not installed. By including "On error resume next", no error message will be displayed so the code can just check to see if the create succeed. To really make this code work well a check for IE should be added in the JavaScript code section before calling the FlashInstalled() function.
Jon
Here is the code that works for Flash - any idea how to get it working for Authorware's Web Player?:
<SCRIPT LANGUAGE="VBScript">
<!--
Function FlashInstalled()
Dim obj
On error resume next
Set obj = CreateObject("ShockwaveFlash.ShockwaveFlash") if obj then
FlashInstalled = true
else
FlashInstalled = false
end if
Set obj = Nothing
end Function
-->
</SCRIPT>
<br>
Shockwave Flash is <b>
<SCRIPT LANGUAGE="JavaScript">
<!--
if ( FlashInstalled() ) {
document.write("Installed");
} else {
document.write("Not Installed");
}
-->
</SCRIPT>
</b>.
Thanks in advance,
--------------------------------
Jeff Tweddale
The InternetCorps
776 Stanyan Street, Suite 7
San Francisco, CA 94117
(415) 668-6373 tel
(415) 659-0687 fax
jeffinternetcorps [dot] com
http://www.internetcorps.com
Replies
Re: FLASH: Checking for ActiveX Controls, Colin Moock
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]