Menu:

Sponsor

Discover Master of Alchemy, our first iPad/iPhone and iPod touch game!

Follow Me

 

Forum's topics

Latest Files

Archives

Top Rated

Categories

Photo Gallery


AMFPHP 0.9b Installation Guide

Introduction

In this tutorial we will learn how to install and configure AMFPHP (currently 0.9b version) on your server machine, assuming that you're not the server administrator. Moreover we will make a simple test connection using the NetConnection Debugger under Flash IDE.

What is AMF?

The AMF format was created by Macromedia as an attempt to replace the need for XML objects when transferring data between a Flash movie and the server. XML objects proved to be quite inefficient; large amounts of data were required to describe simple objects and the amount of bandwidth needed to transfer complex objects from some large Flash projects was simply not acceptable.
AMF is a binary format that can describe any Flash variable of any datatype (including custom objects containing multiple types and sub-objects). Macromedia has released several commercial packages to parse this data and incorporate it as native language constructs for ASP, Java, SSAS, and CFML. A Flash application using Flash Remoting technologies might send the following headers to your server. ( from amfphp.org )

1. What you need before start

First you need a copy of AMFPHP package. In this tutorial we will use the 0.9b version of the package. Download it from sourceforge project page at:
http://sourceforge.net/...group_id=72483&release_id=166546

Then we need a copy of the Flash Remoting Components from Macromedia. They are free for use:
(p.s. I assume you're using Flash MX, but it will work also under Flash MX 2004)
http://www.macromedia.com/.../downloads/components

I will use in this example Apache 1.3.27 as Web Server, for the installation under IIS, it should be the same, but I never used IIS and so I cannot be sure of that.

Obviously I assume that you've already installed on your machine Flash MX ;)

PHP 4.x installed on the server machine.

2. Install the components

2.1 Install Macromedia Remoting Components

Ok, first step. Install the Macromedia remoting component. Once installed you'll see under the 'Window' menu of your Flash two new menu items: NetConnection Debugger and Service Browser:

The NetConnection debugger is the debugger of all the amf packages received and sent to Flash. It will be always very useful while testing your applications because it show you all the informations about the communication between flash and server.

The Service Browser instead is a panel which shows you all the methods (and description) available for a certain service... example:

2.2 Install AMFPHP

Once you've dowloaded the amfphp-0.9.0.zip file and extracted to a temporary folder you will see inside the "sources" folder inside these directories:

Content of the zip file

The next step is to copy the "flashservices" folder into your root webserver folder. Assuming you're using apache and apache root folder is htdocs (usually c:\program files\apache group\apache\htdocs\ ). This mean to have this situation:

http://localhost/flashservices