What You Need
The Flash file is "leditor.fla", and the PHP class file
is "Leditor.php", both available in this downloadable
archive (Leditor.zip, 168k). The Flash file requires Flash MX
2004, and uses some components from Flash MX 2004 Pro.
To install PHPObject, you need to install the free Macromedia
You also need Ghostwire's free PHPObject
Flash remoting libraries. As of this writing, the latest version
is v1.45. Newer versions may or may not work the same. Once you
have downloaded and expanded the PHPObject ZIP archive, double-click
on the file "PHPObject.mxp". This will launch the Extensions
Manager and walk you through the process of installing the relevant
You also need a web browser with a recent copy of the Flash plug-in.
Mac users, note that versions of Apple's Safari browser prior to
1.2 do not work correctly with Flash remoting, although Internet
Explorer 5 and Netscape 7 work fine.
To test out the sample level editor, you also need a web server
that has PHP4. The examples in this document use a Mac OS X system,
with the computer itself as the web server ("localhost").
However, any web-accessible server should work. You will need to
be able to put files in a directory (via ftp) and access them from
a web browser (via http://). Create a directory on your web server
(such as "leditor"). (Depending on how your server is
configured, you may need to change the file permissions of your
directory to allow everyone to write to it. Most FTP and SFTP programs
offer simple ways of setting these permissions.)
Finally, open up the "leditor.fla" file in Flash MX 2004.
Click on the first frame of the first layer and look at the ActionScript
in that frame. Near the top, you will see this line:
_global.defaultGatewayDir = "http://localhost/leditor/";
The second half of this line is the web URL to the directory you
created on the server. If this is not running on your local computer
("localhost"), then change it to the actual URL of the
directory you just created (such as "http://a.parsons.edu/~paul/leditor/").
Then, go into Flash's "Publish Settings" and make sure
it is set to create Flash Player 6 movies (not Flash Player 7!)
and publish the movie to the file "leditor.swf".
Setting Up the Game Editor
To run the level editor, copy the following files into the directory
you created on your web server:
» leditor.swf which you just published from Flash, above.
» index.html from the leditor download.
» Sample_Level.xml from the leditor download.
» Leditor.php from the leditor download.
» Gateway.php from the PHPObject download (in its "server"
» config.php from the PHPObject download (in its "server"
To test it, pull up your leditor directory in your web browser.
You should see something like this:
If you've gotten this far, great! You can open the sample level,
or use the level objects to draw your own level and save it to the