Flash is a very
popular technology used to add animations, video, and audio to websites. This article
begins by looking at how to use it in your web pages. We
then focus on how to add video and audio to your site, using either the new
HTML5 <video> and <audio> elements or a hosted service (such as
YouTube or SoundCloud).
Before doing all things at the same time you have
to know that how flash work and some important things we need in this regard.
How flash works:
Since the late
1990s, Flash has been a very popular tool for creating animations, and later for
playing audio and video in websites.
Whether you are
creating an animation or a media player in Flash, the files you put on your website
are referred to as Flash
movies.
If you want to
create your own Flash movie, you need to purchase the Flash authoring environment
from Adobe. There are, however, several companies that offer Flash animations
and slideshows, as well as video and audio players that you can use without purchasing
this tool.
When you create a
Flash file in the Flash authoring environment, it is saved with the .fla
file extension. In order to use this file on a web page it has
to be saved in a different format known as SWF. (It has the .swf
file extension.) When you export the movie into SWF format,
Flash creates code that you can use to embed the Flash movie in your page. Traditionally,
this code used the HTML <object> and
<embed> tags. However, now it is more common to
use JavaScript.
To view Flash,
browsers need to use a plugin (an extra piece of software that runs in the browser)
called the Flash Player. Statistics commonly indicate that 98% of browsers on
desktop computers have the Flash plugin installed. (The percentage of mobiles
and tablets with it is much less.) There is not space in this book to teach you
how to create Flash movies (there are many books devoted to that one topic)
but this article will show you how to add
Flash movies to your site.
When Flash was
first released, it was developed to create animations. The technology quickly
evolved, however, and people started to use it to build media players and even
entire websites. Although Flash is still very popular, in recent years people have
been more selective about when they use it (and now rarely consider building an
entire website in Flash). Despite this, Flash does have a future on the web
because there are some things it does very well, such as creating animations.
There are several
reasons why fewer websites are using Flash these days, including: In 2005-6, a
set of JavaScript libraries were launched (including Prototype, script.aculo.us,
and JQuery) which made it easier for people to create animated effects using JavaScript.
When Apple launched the iPhone in 2007 and later the the iPad in 2010, they
took the decision not to support Flash.
There have been
laws introduced to ensure that websites are usable by those with visual or physical
impairments — and Flash has been criticized because Flash content does not
always meet accessibility requirements. In 2008, browsers started to support
HTML5 <video> and <audio>
tags. At the time of writing, Flash is still a popular way of
playing video and audio on the web but more and more people are switching to
HTML5.