Extract the zip archive
PHPObject is distributed in a zip file - extract the archive into a temporary directory. Important: only use the official distribution file downloaded from this website; use files distributed elsewhere at your own risk
Install the actionscript files
You will find a PHPObject.mxp file. This is an extenstion package that will be installed by the Macromedia Extension Manager. If you have downloaded and installed extensions from Macromedia Exchange before, you would already have the Extension Manager. It is a free program that lets you install new extensions and keep track of the ones you already have easily.
Run the PHPObject.mxp file (double-click). This will install the PHPObject actionscript files to the FlashMX include directory (Configuration/Include).
If your system doesn't recognize the .mxp extension, it means that you do not have the Extension Manager. Please download the Extension Manager installer.
Install the server-side gateway
You will also find Gateway.php and config.php from the zip file. You need to upload the Gateway.php and config.php to a public directory of your choice (put both files in the same directory). There is no PHP extension to install, and you also shouldn't need to configure your php.ini. As long as you can run PHP4, you are ready to go. This means that you can use PHPObject even if you are using shared hosting.
Configuring your gateway
You can configure your gateway. Open the config.php file with your favorite text editor and change any variables you want. You can set the key, directories to look for php classes, whether to enable support for multibyte characters, etc.
PHP class files
Note that the PHP classes you wish to use should be saved in individual files, and the file names should match the names of the classes. For example, the Foo class must be saved in a file called Foo.php, the PhotoAlbum class must be saved in a file called PhotoAlbum.php.
You should be able to use any of your existing PHP classes without further modifications (eg. there is no need to set up a methodTable array containing available methods).
You may want to try looking through the PHP Classes Repository for PHP classes written by other developers.
Testing
Upload the Foo.php file to the server. Open the test.fla with FlashMX and edit the path to your gateway. If you have changed the key in the gateway, change it here as well. Publish the movie and check that you see the initial $num and $story values from the Foo.php class being shown in the movie (wait for this to happen before clicking any of the buttons; you shouldn't have to wait too long - network dependent). Clicking the math operations buttons will send current $num to the server for manipulation and the resulting $num will be returned and displayed. The $story will be replaced by a feedback of what operation was done. If all these works, it means your PHPObject installation has been successful. Congratulations!
What should you see?
The following is the test.swf in action: