User Guide

Guidelines for Flash applications 121
Guidelines for Flash applications
The best way to create different Flash applications depends on the application you create and the
technology that you are using to build the application. There are guidelines that can help make
the application process easier. There are also several decisions you need to make.
This section describes some guidelines and suggestions for different types of projects and
applications.
For more information, see the following topics:
“Building Flash Applications” on page 121
“Organizing files and storing code” on page 125
“Creating secure applications” on page 127
Building Flash Applications
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. However,
a website that does not use visitor information or data is not an application (for example, a
portfolio 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:
1.
A user enters information into a SWF file.
2.
The information is converted into data.
3.
The data is formatted and sent to a web server.
4.
The information is collected by the web server and sent to an application server (for example,
ColdFusion, PHP, or ASP).
5.
The data is processed and sent back to the web server.
6.
The web server sends the results to the SWF file.
7.
The SWF file receives the formatted data.
8.
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 has been sent or received, in what format the data is transferred,
and how it handles a servers 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 are transferring data using name/value pairs, you can check
how the data is formatted. You need to check that the data is formatted correctly, so you do not
end up receiving XML formatted data and vice versa, so the SWF file knows what data to expect
and work with.