Step 1
In your project, add a reference to Fuel.AmfNet.dll

Step 2
Register "Fuel.AmfNet.GatewayHandler, Fuel.AmfNet" as an HttpHandler
In the system.web element of your web.config, place the following lines:
<httpHandlers>
   <add verb="*" 
        path="gateway.php" 
        type="Fuel.AmfNet.GatewayHandler, Fuel.AmfNet"/>
</httpHandlers>


Step 3
Create functions like you normally would:
 namespace Company.Security
 {
    public class User
    {
      private int _userId;
      private string _userName;
      public int UserId
      {
         get { return _userId; }
      }
      public string UserName
      {
        get { return _userName; }
        set { _userName = value; }
      }
   
      public User GetUser(int userId)
      {
         //implementation
         return foundUser;
      }
   }
 }


Step 4
Setup your flash movie to use the gateway setup in step 2:
var service:Service = 
  new Service(
      'http://www.openmymind.net/gateway.php', 
      null, 
      'Company.Security.User, Company');
The 1st parameter is the path to the gateway, this is directly tied to the path specified in Step 2. Note that unlike Macromedia's implementation, there is no physical file "gateway.php". You can name this imaginary file anything you like in your web.config (so long as it ends with .php), and matches the name in your flash movie

The 2nd parameter is the logger to send debug messages to

The 3rd parameter is the .NET type name to load. This follows the same rule as any .NET types. For example, if the assembly is located in the GAC, the fully quantified name must be specified. The format for assemblies located in the local bin folder is: Namespace.Class, AssemblyName

If your class resides in a 2005 web project, the assembly name is likely "App_Code" unless you changed it

Step 5
Call the .NET method in flash, passing in appropriate parameters, and hookup callback to receive the response:
var pc:PendingCall = service.GetUser(1);
pc.responder = 
   new RelayResponder(
         this, "onSuccess", 
         "onFault");
function onSuccess(re:ResultEvent)
{    
    trace(re.result.UserName);
} 
How To