The best way to create Flash applications depends on the application you create and the technology that you are using to build the application.
An online application lets a user influence a website by interacting with it. For example, the application might collect information from the user (such as a username and password for a registration), information might be added to the site (such as in a forum), or the user might interact in real time with other site visitors (such as a chat room or interactive white board). Results from the server often appear in the SWF file, depending on the interaction. These examples are applications that involve the user and different kinds of server interaction. A website that does not use visitor information or data is not an application (for example, a portfolio, cartoon animation, or static informational site). Flash applications involve an interactive process between the user, a web application, and a server. The basic process is as follows:
A user enters information into a SWF file.
The information is converted into data.
The data is formatted and sent to a web server.
The data is collected by the web server and sent to an application server (for example, ColdFusion, PHP, or ASP).
The data is processed and sent back to the web server.
The web server sends the results to the SWF file.
The SWF file receives the formatted data.
Your ActionScript processes the data so the application can use it.
When you build an application, you must select a protocol for transferring data. The protocol alerts the application when data is sent or received, in what format the data is transferred, and how it handles a server’s response. After data is received in the SWF file, it must be manipulated and formatted. If you use a protocol, you do not have to worry about data being in an unexpected format. When you transfer data using name-value pairs, you can check how the data is formatted. Check that the data is formatted correctly, so you do not receive XML formatted data and so the SWF file knows what data to expect and work with.