Recently I formatted my computer and went on to install Mozilla Firefox. The first plugin which Mozilla asked me to install, as soon as I started surfing the Internet, was the flash player. Flash is very important part of backbone of web 2.0. It is present everywhere. Picnik is solely based on flash and Youtube will cease to grow without flash. But did you ever think how this tiny stuff actually works?
Why was flash needed?
If you keep flash aside then the other way which one can use to display animation is animated GIF images: a series of image files displayed one after another. But this isn’t the best method. Such files consume huge memory space (because images are duplicated number of times) and it cannot even incorporate sound with them.
Flash was able to overcome these problems and now you know why it is the de-facto of Internet.
How does flash overcome the memory usage problems?
A complete flash movie isn’t downloaded in one shot as the delay might irritate the user. Instead the image which needs to be animated is downloaded and stored in client memory. Later the flash player downloads the instructions which tells the flash player what to do with each of the elements in original image. These instructions are read and executed by the system processor.
For example in case of flash based tutorial the button images are downloaded first and later the instructions (which were downloaded second), which might be collection of various events, are executed by processor subsequently.
Flash uses streaming technique i.e. part of file is executed in foreground and the rest is downloaded in background. Thus flash starts playing the movie even if size is large.
How does flash overcome the sound problem?
Flash is able to incorporate sound with it. Still, due to varying Internet speeds and differences in file sizes of sound and image files, it is hard to transfer sound with flash files.
The event sounds work similarly as images: sounds are loaded and instructions like when to play which sound file are loaded next.
In case of streaming sound the sound stream is given preference over images and this ensures that images and sound do not get out of sync.
The future of flash?
Java applets and Ajax might be close warriors but due to Adobe’s strong support flash will continue to rule for many years to come.
Bonus sneak peek - Shockwave!!
Shockwave is similar to flash though shockwave can make more versatile animations then flash.
- Shockwave was created for media like CDs while flash was built with Internet architecture in mind.
- Shockwave uses proprietary file format while flash uses open source and is cross-platform.
Share This