Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: RE: FLASH: OT: vbscript in Moock detect for Flash
From: Nick Ryan
Date: Mon, 18 Dec 2000 21:14:10 GMT

A guess:

I suspect that IsObject may return an object reference (which can
evaluate to true)
or null (which doesn't evaluate to false).

In the ie3a version you have the lines:
document.write('on error resume next \n');
document.write('if
IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")) then \n');
document.write(' flash5Installed=true \n');
document.write('else \n');
document.write(' flash5Installed=false \n');

Perhaps the IsObject test on Flash5 generates an error because it
returns null and you
do the equivalent of if null. If so,
the resume next may be causing the javascript engine (somewhat scarily)
to resume from the next line i.e. inside the if statement rather than
the
following else. This would cause flash5Installed to be set to true and
the
rest of the if statements to be skipped.

In the ie1 version you have:
document.write('flash5Installed =
(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
and then later:
alert('flash5installed is ' + flash5installed);

I again suspect that IsObject may return an object reference (which can
evaluate to true)
or null (which doesn't evaluate to false).
Thus you would be setting flash5Installed to null in the first bit of
code and
would explain the runtime error of trying to do an alert on a null
variable
and also why the code:
for (var i = 2; i <= 5; i++) {
if (eval("flash" + i + "Installed") == true)
actualVersion = i;
}
still works.

-----Original Message-----
From: Helen Triolo [designerati-technica [dot] com (mailto:designerati-technica [dot] com)]
Sent: 18 December 2000 20:27
To: flasheratchinwag [dot] com
Subject: Re: FLASH: OT: vbscript in Moock detect for Flash


No answers on this from the state courts, so I'm bumping it up to the
supreme court in hopes that someone here will know...

Scenario: running IE5, flash activex disabled per Macromedia
instructions, all copies of swflash.anyextension deleted from hard
drive, coded with subset and variants of Moock detection routine

Case 1) http://i-technica.com/flashdetect/detect_ie1a.html: popup
alertbox shows actualVersion=0 as expected, gif displayed as expected,
no prompts, everything peachy

Case 2) http://i-technica.com/flashdetect/detect_ie3a.html (code same in
all but 2nd section of javascript, but should function same): popup
alertbox shows actualVersion=5 and then does the "Do you want to install
and run Flash 5.0?" prompt. Why does it think actualVersion=5?

Case 3) http://i-technica.com/flashdetect/detect_ie1.html (same code as
case 1, but with 2 lines added in body javascript to display variables
flash5installed and flash3installed): popup alertbox shows
actualVersion=0, followed by runtime error, flash5installed undefined.
Why undefined instead of false? And if flash5installed is undefined,
why isn't actualVersion also undefined?

Any answers to 2 or 3 would be much appreciated.

Regards,
Helen
-----------------------------------------------------
i-Technica http://i-technica.com 301.424.6037
developer resources: http://i-technica.com/whitestuff

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save 200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre

Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save 200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Re: FLASH: OT: vbscript in Moock detect , Helen Triolo

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]