Adobe's Actions Script 3 programming language is designed for file and data transfer tasks, including retrieving and sending information to a database. Use AS3 file and data transfer classes, methods and properties to connect your Adobe Flash program to multiple databases. Different database types -- for example, MySQL, Microsoft Access or an AIR-generated local SQL database -- require different connection methods.

MySQL Databases

Step 1

Create one AS3 file in Adobe Flash Builder or an AIR Flash file in the Flash Professional software package.

Step 2

Type the "URLRequest" method in the AS3 file and specify its argument as the file location of the PHP connection file on the Web server.

Step 3

Create a text file to place the PHP connection code that connects the AS3 file to the database to a MySQL database.

Step 4

Use the "mySQLconnect" function in the PHP connection file for connecting to the MySQL database with AS3. Specify the host server name, your user name and your password for the MySQL database as the arguments in the PHP "mysql_connect" function. Use the PHP "mysql_select_db" function to select the specific MySQL database with the PHP variable you used to store the "mysql_connect" function.

Microsoft Access

Step 1

Create one AS3 file in Adobe Flash Builder or an AIR Flash file in the Flash Professional software package. Type the "URLRequest" method in the AS3 file, and specify its argument as the file location of the ColdFusion connection file on the Web server.

Step 2

Set the ColdFusion database connection information and the type of database to connect to with the ColdFusion Administrator. Click the Add New Data option, and then enter Microsoft Access for the driver type. Click Add. Enter a data source name to access the database connection information, the database name you want to connect to, the name of the database server and the login credentials.

Step 3

Create a text file with a text editor to place the ColdFusion connection code that connects the AS3 file to the Microsoft Access database. Type the ColdFusion "cfquery,datasource" command in the file with the datasource name you specified in the ColdFusion administrator.

SQL Databases

Step 1

Create one AS3 file in Adobe Flash Builder or an AIR Flash file in the Flash Professional software package.

Step 2

Use an SQLConnection object with either the open or openAsync database connection method in the AS3 file to connect to a local SQL database.

Step 3

Use the name of the local SQL database, stored in a file object, with the "resolvePath" method as the argument for the SQLConnection object.