AS3 Library for the WordPress API

I’m sorry to say that I no longer have the time nor the inclination to update this library – please feel free to download for any personal, commercial, or other use, but I will no longer be updating this page or the source code.

Hi there.

I’ve developed an (almost) fully featured ActionScript library for WordPress XML-RPC, that any flash developer can use to build flash front-ends for WordPress managed sites. The library builds on the work of Akeem Philbert (who developed this excellent XML-RPC library), and is designed to make connecting Flash with WordPress easy and straightforward.

About the library

I developed this for the simple reason that there didn’t seem to be one available. I wanted a WordPress service that could make sensible method calls in an easy way rather than having to pass everything through XMLRPCObject, and I wanted results that would be strongly typed versions of the XML-RPC results, with separate event types for each call. My WPService class does exactly that, and I hope some of you out there find it useful.

Download: » version 1.01



Documentation in ASDoc format is included in the download and is also online here:
AS3 WordPress Documentation


The use of this library is intended to be straightforward – there are three basic steps:

  • Create a WPService
  • Add event listeners to listen for server results
  • Make a method call using one of the service method groups

1. Create a WPService

var service:WPService = new WPService(myBlogUrl, myUserName, myPassword);

2. Add event listeners


3. Make a service call using one of the service method groups.


The WPService class has methodgroups for making calls relating to blogs, posts, pages, categories, tags, comments and authors, eg: service.posts.getRecentPosts(); will make a call to wp.getRecentPosts using the blogUrl, username and password you used to initialize the service.

A simple example

This class will get the 20 most recent posts from your blog and trace their details to the output window.
You will need to replace URL, USER, and PASS with your correct details.

   import flash.display.Sprite;
   import com.absentdesign.core.webapis.wordpress.*;

   public class Example extends Sprite{
      private var service:WPService;
      private static const URL:String = "";
      private static const USER:String = "your_user_name";
      private static const PASS:String = "your_password";

      public function Example(){
         service = new WPService(URL,USER,PASS);

      protected function getRecentPostsHandler(event:ServiceEvent):void{

      protected function traceData(data:*):void{
         if(data is WPStruct){
         else if(data is Array){
            for each(var struct:WPStruct in data){


This library is free to use, modify and distribute under a New BSD licence. If you do find it useful, please let me know at reuben[at]absentdesign[dot]com, or leave a comment below.

If you use the library for a commercial project (or just really like it), you may even want to consider a donation:

A caveat

There are a few things in the WordPress XML-RPC spec that were not included in the library (most notably wp.getOptions and wp.uploadFile), but these may be included in future releases. This is only version 1, and it has only been tested by me so far. Some things are bound to go wrong – if you have a problem with the library then please let me know!


v1.01 : updated to include setPostCategories method (mt.setPostCategories).