What is Flash? Part 1
Introduction
Flash provides dynamic content for your website. By “dynamic”, I mean something that grabs your attention with moving graphics, sound and video. Flash also provides interactive content, allowing you to interact with a website to get information or experience entertainment. For example, Flash can be used to get interest rates and property values from you and then quickly calculate your monthly mortgage payment. Flash could just as easily read your actions on the keyboard so you can play a game of Donkey Kong.
How does this differ from a normal computer application? Speaking from a user-interaction perspective, there’s not much difference, other than you don’t have to install and initialize the application. You need only point your browser to a website that has the desired Flash application, and then run it. It’s far more convenient than a normal computer application.
Why put Flash in web pages? Strictly speaking, Flash need not run within a web page. When not running within a web page, Flash runs in what’s called the “Adobe Air” environment. The environment must be installed on your computer as an application, and then the Flash application then runs within the Air environment. Most people run Flash within web pages, however, because it is easy and does not require installation of Air. Besides, web page designers depend on Flash to add pizzazz to their sites. Without animations, videos, mortgage calculators, and a wide variety of multimedia eye-candy, web pages could become stale and boring.
- What types of applications can be run within Flash? Almost anything a regular computer can run. The applications generally fall into the following categories:
- Simple applications, such as mortgage calculators, photo albums and stock tickers
- Animated graphics, such as banner ads, educational demonstrations and cartoons
- Interactive graphics, including games, 3D product views and book previews
- Video content of several varieties:
- Download-and-play
- Progressive download (Video on Demand)
- Streaming (live)
Where can Flash be run? Because Flash is designed to run within websites, it can be deployed almost anywhere a browser can be displayed. This includes browsers running under a wide variety of operating systems, including Windows, Mac, Linux as well as portable devices like the Apple iTouch. In all cases, each Flash application acts identical on all platforms, providing a consistency across many different types of hardware and variations of operating systems.
Indeed, it is immensely convenient that Flash can run within browsers on all the major operating systems. This not only gives the viewing public a consistent environment, but it is tremendously convenient for people who develop Flash applications. They need only develop the application one time, and it runs in all environments. This concept is known as “write-once-run-everywhere.”
The “write-once-run-everywhere” concept turns out to be highly efficient when compared to developing applications that run directly on host operating systems. “Write-once-run-everywhere” relieves the programmer from having to worry about the details of the computer hardware. For example, applications that run directly on host operating systems, like word processors, need to be re-compiled and separately debugged for each operating system. Furthermore, there may be major differences within the same operating system, so program development time is multiplied. It becomes inefficient and expensive to develop such applications.
Behind the Scenes
So how does Flash do it? We’ll answer that question in great detail over the course of the next few installments of this series, but suffice it to say for now that Flash “does it” by creating a special environment within which Flash applications run. This special environment is not generally installed on a new browser. This is why you’re sometimes asked to load the Flash runtime environment when you browse to a web page that has a Flash application. If you say “yes”, your browser will download the Flash runtime environment – which is actually an application that runs in your host operating system – and install it on your machine. Once the Flash runtime environment is installed, you can then view Flash applications running within your browser.
It is this “runtime environment” where the magic of Flash lives. Think of the runtime environment as a virtual computer. Like any computer, this virtual computer can execute commands that will make it draw pictures, load and play movies, make sound effects, calculate the square root of pi, and so on. The word “virtual” in this sense means that the computer doesn’t actually exist except within the confines of the Flash runtime environment that you installed.
Furthermore, as a virtual computer, there are some things that are missing. For example, the Flash runtime environment cannot access to your hard drive. Also, it cannot establish its own network connection to anything other than the website that hosts the Flash applicatin. These things are intentionally missing in order to ensure that the virtual computer cannot reach into your “real” computer and access sensitive information or reformat your hard drive or break into computers on the network or any other acts of malice. In a sense, the Flash runtime environment is a sort of sandbox where applications can play and do things but cannot do any harm outside the walls of the sandbox.
There are two notable exceptions to the sandbox analogy above:
- A Flash application running within your browser may be given permission to access a website other than the one that provided the application, but only if the other website owner has provided adequate permission in the form of a “cross-domain policy file.”
- When a Flash application is running within the Adobe Air environment (as opposed to a browser environment), it can then have access to your hardware as well as the network.
Even though there are some security restrictions on Flash when running through your browser window, the Flash runtime environment provides an exciting opportunity for programmers who wish to provide useful applications for viewers. Often, these applications may seem trivial, such as animated advertising banners (and the spinning light on the lighthouse at the top of this webpage), but Flash is capable of so much more. Flash can be used to integrate animation and video to provide effective educational environments. Flash can also be used to remotely control surveillance cameras for security. In short, as a virtual computer, Flash can be programmed to do almost anything a normal computer can do.
Review
In this installment, we became familiar with how Adobe Flash is used and what it can do. We also briefly touched upon the Flash runtime environment and why it is so important for running applications. We learned why programmers like the “write-once-run-everywhere,” environment because it is simple and efficient. Finally, we learned a bit about the Flash security model and how it creates a type of sandbox that safeguards your computer and prevents malicious Flash applications on rogue websites from exposing your computer to harm.
Next Friday, we’ll go into more detail and explore some of the many capabilities of Flash. We’ll learn more about animation, video and something called “ActionScript,” which is the programming language that drives Flash applications.
See you next week!
Dan
Set as favorite
Bookmark
Email this
Trackback(0)
Comments (0)

Write comment



