FreeMind Flash Viewer Broken With Flash 10?

FreeMind Flash Viewer Broken With Flash 10?

After some mildly confusing debugging, I finally discovered why my MindMap Viewer was not working with some configurations of Firefox 3, Flash, and Linux or Mac.  I first noticed this myself on Linux a couple weeks ago (Ubuntu / FF3 / Flash 10), and assumed this had something to do with my recent upgrade to Firefox version 3.   Then today, a viewer commented on a recent post that they were seeing the following error on a Mac:

“Flash plugin or Javascript are turned off. Activate both and reload to view the mindmap”

Since it was working on my Mac (in hindsight running Flash 9), I decided to investigate further.
The viewer fundamentally relies on FreeMind to render the mind maps, and supports the Flash and Java plugins.  It turns out that the original version of the FreeMind Flash viewer I downloaded back on Oct. 2007 had issues correctly detecting the version of Flash if version 10 was installed.
Although this wasn’t a direct problem with the flash viewer itself, there was an issue with the copy of flashobject.js.  FlashObject, which was the precursor to the new SWFObject, helps abstract some of the difficulty of embedding flash content, and messaging the user to download the current flash version if it’s not currently enabled in their browser.  Unfortunately, the version of FlashObject that the FreeMind viewer used was 1.1.1 from 5/17/2005.  After careful inspection of the current FreeMind wiki viewed source of a map that was working and noticed that their version of flashobject.js (although listed as 1.1.1) had 2 additional lines added to the getFlashVersion() function:

var aux= y.charAt(y.indexOf(‘.’)-2);
if(“0123456789”.indexOf(aux)!=-1) flashversion=aux+flashversion;

Unfortunately, the method that flashobject used to determine that version had incorrectly parsed the version string (e.g. “Shockwave Flash 10.0 r12) using this logic:  flashversion = y.charAt(y.indexOf(‘.’)-1) and misidentifed the version as 0!  The 2 additional lines above correct the problem above.
I revisited the Freemind Flash viewer website, and download the latest version to see if this new code was there as well.  Although the version was still listed as 1.0b, it appears that the flash version “hack/fix” was put in place on 10/17/08.  I’m glad the problem was fixed, and mystery solved, but there a couple developer lessons to be learned here:
1) Document Document Document.  Although flashobject.js is now deprecated, the fixed version should have been put in version control.  And, the README and version number of should have been updated to reflect the change and correct support for Flash 10.  Oddly enough, I could find no mention of these changes on the FreeMind wiki or the discussion forum on Sourceforge.
2) Upgrade 3rd party libraries.  I’m sure FlashObject was getting the job done, but unforuntately broke when Flash 10 was released.  Since it’s an unsupported/deprecated project it required some developer to hack in those 2 lines of code.  It’s unclear if it was the original Flash viewer developer, or somebody from FreeMind.  It would probably be worthwhile to replace FlashObject with the newer (and supported) version of SWFObject 2.  After doing some Googling, it seems developers on other project have experienced a similar problem with FlashObject and are opting to upgrade.

(Visited 1,594 times, 1 visits today)

One Response

  1. Vignesh says:

    Hello there, that was a nice intel with flashobject.js
    I thought this problem would solve my issue but still didn’t. Its the problem with IE 7 browser (this is for Work 🙁 !!) – unable to open Hyperlinks properly with the old freemind browser. Opening files doesn’t seem to be an issue; but the mouse gets stuck to the mindmap. Freemind app seemed very casual because of this, allowing these inconveniences. No sol I could find. Pls post if you had encountered any links, and findings on this issue.

Leave a Reply

Your email address will not be published. Required fields are marked *