' IE flash detection
' Teste la creation d'une instance ActiveX de l'objet plugin Flash
' Affecte et retourne UseFlash = 1 si la creation de l'objet réussi et si le plugin Flash >= 5

On Error Resume Next

Private i, x, MM_FlashControlVersion

x = null
MM_FlashControlVersion = 0
FlashMode = False

For i = 5 To 1 Step -1
 Set x = CreateObject("ShockwaveFlash.ShockwaveFlash." & i)
 MM_FlashControlInstalled = IsObject(x)

 If MM_FlashControlInstalled Then
  MM_FlashControlVersion = CStr(i)
  Exit For
 End If
Next

FlashMode = (MM_FlashControlVersion >= 5)

If FlashMode = true  Then
  UseFlash = 1
End If
