Flash 8 and Beyond

Some background:
At the company I work for, we have a product that does realtime patent manipulation on user photos. Our web version of the product uses an Active-X control in symbiosis with a Flash GUI and tones of Javascript to communicate between them. Every time I suggested, to rewrite the Active-X functionality in Flash I got laughed at by the “real” developers in the company. After the same idea came from some different sources who were more familiar with the Active-X problematicalness I decided to write this article.
I’ve written this inside company article named “Flash 8 And Beyond” in the end of 2005 to clarify some ignorance about the Flash platform. The result was that my C.T.O. said that I’m rude and arrogant and me and this “Macromedia marketing text” can go f… do stuff to ourselves. Reading it now I think he got a point. I should have written the same text in a more modest way. However I got some good feedback from some of the “real” developers who thought Flash is just a toy and were surprised by it’s current abilities like: OOP and Pixel Engine and the future abilities like: Binary Data. Indeed a toy, but a mighty powerful one.
I bring here a slightly modified version, I only removed a few things for confidentiality reasons.
(When I say Flash-X I refer to the functionality of the Active-X rewritten in Flash)

Here it goes:

*About this article:
*
In this article I describe the main pros and cons of using the flash player over our homebrew ActiveX.

Pros – Look mom no ActiveX:

  1. No Intrusive Active-X Installation

a) Many users are not willing or can’t install any active-x on their computer. But will accept or already have the flash player Installed.
b) Flash is already Installed on 98% of desktop computers.
c) New Flash player versions are rare and much easier to install then regular active-X.
d) Our current activeX has too many features and too many Kilos. Some of it are no longer needed. (am I playing with fire here?! 😉
e) Today with every new feature we add to the active-x the user will have to go through the tiring installation process again. With flash the update we make are transparent to the user.
f) Website specific versions. The Flash-X will have only the features needed for the specific site, also transparent to the user.
g) Our Active-X doesn’t have true backward compatibility as the Flash player. (Force upgrade of new active-x is not considered as backward compatibility)
h) In the end more users will be able to use our technology.
i) Better user experience.

  1. Cross Platform

a) Will run on FireFox and all the major browsers.
b) Will run on none PC computers with different OS like MAC and Linux. 

  1. Better website integration

a) No need for multiple objects and html ‘divs’  And messy flash holes (masks) to see through.
b) In fact there is no integration coz the flash-X will be part of the flash website. Any progress bars, fading and many other effects can be easily implemented.
c) Less buggy – no need  for multiple calls.
d) Easier to debug.
e) Easier to develop (one IDE)

 *Cons – But look Beyond:*

  1. Slowness

a) Slowness, mainly because of backward compatibilities flash can be slower then other platforms. 

  1. SWF is an open format.

a) Everybody can see what you’re doing. Very good encryption is needed (this is true for any kind of code, nothing is completely safe)
b) It is not possible yet, in flash 8, to encrypt media inside the SWF, only code, so the bitmaps could be accessed.
A solution to this might be to use dynamic masks generated by code. Or look beyond to flash 9. 

Beyond – Flash 9 with Actionscript 3.0:

  1. Speed, lightning speed

a) In the upcoming version of flash, the calculating and rendering speeds are at least 10 times faster (This is according to my testing and others on the web with the Alpha version of the next flash player and ide). In these speeds we can sample and calculate a big image in no time. 

  1. Eclipse

a) The new Flash (aka Flex Builder) is based on the award winning Eclipse IDE. 

  1. Binary Data

a) Flash can read our own file format directly.

  1. Many more, some of it can be found here:
    http://labs.macromedia.com/wiki/index.php/ActionScript_3:overview

*Why to use Flash ?!
*
The Question should be: Why we haven’t used it already?
And the main reasons, in this order of importance, are:
 1. Flash was lack of a pixel engine.
 2. Flash actionscript was too slow to handle complex calculation.
 3. Flash SWF is an open format.

  1. In case you don’t already know there are some main things that set us apart and better then our competitors (check ‘About us’ section for more info). One of these things is the bitmap algorithm. In order to paint the bitmaps with the algorithm the active-x need access to every pixel in the image. This wasn’t possible till Flash 8 but now we can freely get and set pixels on the image and the bitmap Algorithm can be applied in flash. (it was possible to apply the algorithm in versions prior to 8 but this would have been a lot of hassle, since it’s not relevant any more I won’t go into details). Check my example of flash-x still with only a fraction of the algorithm. All we need to do is add the fancy Bitmap Algorithm 🙂
    Sorry can’t show you that.

  2. Some of you might think that flash Actionscript is the poor script language that you know from flash 4 where you can use it to make some fancy buttons and nothing more. Well this is not the case. Actioncript 2.0 is a full Object Oriented language similar to java. Any code or design pattern can be implemented with it. So in terms of the code there shouldn’t be any problem to port the Bitmap code into Actionscript 2.0. As for the speed we might lose some. Although, macromedia improve the flash player speed with every new version. It’s still inferior to some other platform. But this need to be tested the lost of speed might be bearable and even not noticeable at all.

  3. About the fact that Flash file format the SWF (pronounce as swiff) is an open format and the code can be examine fairly easily. We will have to use encryption on the important part of the code.
         
         
                 So far we’ve seen that the main reasons it was hard to implement the functionality of the active-x in Flash has been overcome.
    We’ll now see why we should use the flash player instead of the Active-X:

If we check the numbers we’ll see that at least xx% of the users that tried to Install the Active-X and use our system failed. This number is enormous as is by internet standards. But this number doesn’t show you all the users that failed to even attempt to install the active-x like firefox and mac users. This number also doesn’t show you the users who didn’t even want to try to install an Active-x from somebody they don’t really know and trust. This number also doesn’t show you the tiring process some of the users had to go throw until the installation succeeded (some failed several times before the succession).
This is the main reason why we should change to Flash player over our homebrew Active-X. And it’s a very big reason because non-compatibility is a very big and dirty word in today standards. Flash Player is installed on 98% of all desktop computers and it’s the most compatible thing you can find on the internet today.
  Our Active-X was created in the days were HTML still was the dominant way to create websites. Today our clients want beautiful and dynamic websites that are created in flash. Our Active-X doesn’t easily integrate into a flash websites and multiple workaround are needed. Like the —- object, flash holes so we can see the Active-X through and messy javascript to communicate between the Flash and the active-X. If Flash-x was used we wouldn’t have all these issue and website development would have been much more flawless and the outcome would be less buggy.

Conclusion -  The future of Flash, Sparkle, Ajax and others

Flash isn’t the superior technology in all aspects as some of you might know and probably like to say. But in this case it has the advantage. With it’s unmatched compatibility and strong capabilities. Flash is a mature technology that has proven itself over the years and keeps on improving. With the upcoming version of flash there is no doubt we should go with Flash. We need to start moving now so when the new player will be available we’ll have our product ready. Why waste all this time since this is the path we will eventually walk.

Sparkle – will be a creative tool from Microsoft that hopefully will let us make beautiful windows applications and websites. Currently it has no release date and it could be more then a year till its final release. It is not so much relevant to this ActiveX discussion since we’ll use it, if we’ll use it, for the website design and animation. The ActiveX installation will remain as it is now. Even if Sparkle will deliver all that it promises it will take, in my humble opinion, at least 3 years for websites developed with it to reach reasonable compatibility.

Ajax – it become a hype to even say that Ajax is a hype so I’ll try to avoid it. but really, Ajax is just an old technology with a new name. It became such a hype (sorry) since some big sites like google.com and amazon.com have used it to add some nice popping windows to their sites. This is also not so much relevant to this discussion. You can’t make with Ajax much more then some fancy menus and non-refreshing websites. But since it’s also been dubbed as a “flash killer” obviously with no serious reason, I mention it here.

  Other – there are no others.

Guy A

Read more posts by this author.