...

View Full Version : Re-write VBScript as JScript



Skyzyx
06-05-2003, 09:18 AM
I got this Flash detection script from PPK's site (http://www.xs4all.net/~ppk/js/index.html?/~ppk/js/flash.html).

I've been trying to implement it in a JavaScript Library (*.js) using document.write to write the VBScript, but I've been having problems getting it to work.

Is there any way to rewrite the following Microsoft VBScript code as Miscrosoft JScript code?



<SCRIPT LANGUAGE="VBScript">

on error resume next

If MSDetect = "true" Then
For i = 2 to 6
If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then

Else
flashinstalled = 2
flashversion = i
End If
Next
End If

If flashinstalled = 0 Then
flashinstalled = 1
End If

</SCRIPT>


I'd appreciate any suggestions.

Skyzyx
06-06-2003, 03:02 AM
*bump*

Graeme Hackston
06-06-2003, 02:49 PM
a guess

if (new Object("ShockwaveFlash.ShockwaveFlash.4")) {
alert('installed')
}

Graeme Hackston
06-06-2003, 02:50 PM
I think you'd need to loop through the version numbers

Skyzyx
06-13-2003, 07:03 AM
Got it!

http://host44.ipowerweb.com/~skyzyxco/scripts/flash.htm



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum