Browser Communication

[ LiB ]

I thought it might be a good idea to explain what goes on behind the scenes before you jump into any scripting. If you understand how the Web works, you can work with the Webnot against it. If you know all this stuff already, just bear with me.

When you type in a Web address, it is resolved through a Domain Name Server (DNS) at your Internet Service Provider (ISP). An initial response called "header information" is sent back to the browser on your computerand is followed by HTML that formats the contents on your screen. Once the HTML contents are loaded, your page can then load Web forms and Flash movies. These forms and movies can communicate with the server where the Web site is stored. This is exactly what we are going to focus on. See Figure 13.3 so you can get a better idea of how you are connected to the Internet.

Figure 13.3. You're connected to the Internet through an ISP.

graphic/13fig03.gif


The communication part is difficult to understand, but there are common protocols that the Internet uses to communicate. By learning a few rules, you can easily use these protocols. There is a standard called CGI, or Common Gateway Interface , which is a set of rules of how communication is transferred from client (your computer) to the host (Web server). This standard is what we will be using in this chapter.

All Web forms have Send buttons (sometimes referred to as Submit buttons ) and when someone presses the button on a Web form, the information stored in the form is sent back to a script that is stored on the server. This script runs on the server and manipulates the data that was sent. The script has the capability to spit back another HTML file to show the results. The script can even access a database as big as Amazon.com and output a list from a database search, amongst other things. See Figure 13.4 for a visual of what happens when the average Web surfer clicks on a Send button.

Figure 13.4. Communication after a user clicks on the Send button

graphic/13fig04.gif


NOTE

NOTE

Due to space and time limitations, this chapter will not cover how to program CGI scripts. There are an abundance of books on this subject that can help you test your Flash movies. The reason this chapter is included is because when working in a team, the Flash developer must know how to work with the other Web programmers.

[ LiB ]


Game Development with ActionScript
Game Development with ActionScript
ISBN: 1592001106
EAN: 2147483647
Year: 2004
Pages: 162
Authors: Lewis Moronta

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net