Can AS3Glue work with the Arduino Mega?

Are you sure about that? As far as I know Arduino 0018 comes with the latest version of firmata, which supports the Arduino Mega.

Check out this link: http://www.maxuino.org/?p=8

With the release of Arduino 0018 comes a new version of Firmata that at long last supports the Arduino Mega and the Teensy boards.

...the new Firmata which supports Arduino Mega, Teensy and Sanguino is the Firmata svn, currently in a branch called “hardwareAbstraction”.