Adding Flash to a Web Page
Bill Tait Nov 2011
Introduction
To create your own website, you will need to –
Getting a Domain Name
This means searching for a domain that is not already registered to someone else. It will have a specific name and an extension that represents the type of domain, separated by dots. So, for example, webtutor.co.uk is our domain name, where the webtutor part is our company name and the .co.uk represents the top level domain for a company in the UK. Webtutor also owns the domain name btutor.com, where .com is associated with a global or US company.
If your internet service provider (ISP) or your college offers free web space you can, of course, host your website on that. The only problem with this is that your web address is likely to be unattractive and difficult to remember. There is also the possibility that some day you will want to program the server, for example, to access an online database, and this is not usually possible on ISP web space. So it is better to get your own domain name and web host.
One way to get your own unique name is to find a search engine such as the one at whois.com or, for a UK domain, Nominet, and search until you find a name that is not currently registered. You are then invited to register and pay for the service. In fact you will have to pay annually or biennially to maintain the registration.
However, a more convenient approach is to find a web host first, then use their search engine to find a domain name. Then when you pay for the registration it will be to the same company that hosts your website and probably be much cheaper as well as more convenient.
Getting a Web Host
This means finding a company with an internet presence who will charge you (again annually) to store your web pages on one of their servers and make them visible on the internet. There are many such companies and they advertise regularly in magazines and on the internet so it is just a matter of comparing prices and services. It is also a good idea to get the opinions of existing customers.
The hosting company will then provide you with a username and a password so that you can login to your web space on their server and upload your web page files. So you write your web pages (as described below) then upload them as files to your server. The process uses a file transfer protocol (ftp) and you need a special software application to do this. This will probably be provided free by the hosting company but if not you can find free ftp software by searching the web. Alternatively some web page editors also include ftp features.
In general, these ftp packages are very easy to use. They display the folder on your computer, where your web files are stored and, in the same window, they show the folders on your remote web server to which they are to be transferred. They look and behave like folders on the same machine and the upload is simply a drag and drop or some similar procedure.
Writing a Web Page
A web page is a document file with the name extension .html or .htm. It has two forms. One is what appears on the display of a browser and is easily recognised as a web page. The other is the underlying code, which is known as html (hypertext markup language) and not so recognisable. In fact, all application software has these two forms but generally only the display version is visible to the user. When an html file is opened or downloaded into a browser it displays as a web page. When it is opened in a text editor it displays as html source code. You can also see the code by using the browser option to View Source, or similar.
There are many ways to write a web page. You can use an expensive web editor application such as Dreamweaver, or one of the many free web editors available on the web. You can also use Microsoft Word, or one of its open source alternatives to write web pages or do it the hard way and edit the html source code with a text editor such as Windows Notepad and Wordpad. Our own preference is for the free Notepad++. In all cases you must use a simple text editor that normally saves a .txt file but save it with a .html extension.
Adding Images and Other Components
Web pages are unusual compared to other software applications, such as word processors, in one important respect. They do not actually include images and other components such as audio files, video clips Java applets and Flash movies. Instead they contain only references to these enhancements which must be saved in separate files and uploaded to the web server along with the web page that wants to use them. When the web page displays it loads these components from its environment so they look like they are integral parts of the document. In fact, the web page contains only the file addresses so it is important that you save these files before adding their links to the page – so that it knows where to find them. And, of course, you should upload them to the server without changing the relative addresses. So, for example, if you want to display images stored in the same directory as your page file on your own computer, they must end up in the same folder as the pages on your server.
Style Sheets
One other aspect of web page authoring that deserves a mention at this stage is style sheets. Cascading style sheets (CSS) provide an easy way to configure the presentation of your web pages. You can write a style sheet document to define the fonts, colours and layout of your web page. You can add it to the actual page document or, better, save it as a separate .css file that can be referenced by all the web page files. This allows the other web pages to use the same styles and conform to the preferred look and feel of your website. We will produce a tutorial on style sheets in a later edition of Webtutor Tchnology.
Adding the Flash Application
The easy way is to use Dreamweaver or some other web page editing package to insert a Flash application. It will add all the required code. If you are using a simple text editor then you will have to add the code by hand. This should be inserted at the location in your page where you want the Flash applicaton to display. For an application called Chess.swf of size 400 by 400 pixels, the simplest html code is as follows:-
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="400">
<param name="movie" value="Chess.swf" />
<param name="quality" value="high" />
<embed src="Chess.swf" quality="high" width="400" height="400"></embed>
</object>
Then the complete web page might be as follows:-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Chess application</title>
</head>
<body>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="400">
<param name="movie" value="Chess.swf" />
<param name="quality" value="high" />
<embed src="Chess.swf" quality="high" width="400" height="400"></embed>
</object>
</body>
</html>
And, of course the Chess.swf file must be uploaded to the server in the same folder as the html file.
Summary
This is a very brief account of how to create and publish your own website. If it looks like something you would like to try then the simplest option is to purchase one of the many books on the subject and learn more about it.