interfacing arduino mega 2560 with Flash [firmata+AS3Glue 1.6]

Hello
I'm beginning to use Arduino for a project for a Adobe AIR application.

For that project I need 20 Digital Inputs and 4 Digital Outputs, and I can't use pins over 14.

So my question is :
is there a limit in Firmata or in AS3Glue ?
what can I do to solve my problem ?

is there and other solution for interfacing Flash/Adobe AIR with an arduino board ?

Iif your Arduino doesn't have enough pins, you can get a bigger Arduino (easy solution)

I don't know what Firmata or AS3Glue are, but the first person that comes along that does is going to ask:

Is there a limit for what?

Hello,
I'm using an arduino 2560 because this model has more than 24 pins.
So it's not a hardware problem.

AS3Glue is an actionScript class (for Flash or Adobe AIR),
with this class Flash and Arduino can communicate together.

I am inspired by this tutorial for my project

My project is a box with 20 buttons (my 20 inputs) and 4 lights (my 4 outputs)
when a button is pushed down arduino sends an order to my Adobe Air application
then the application shows a message on the screen (wrong) or (right).
If the message is right the Adobe Air application sends a message to the board which turns the light on.

I did a first test with one button and one light and it works fine
when I'm going over the pin 14 that don't work.

I'm going to try to connect firmata and processing to my arduino mega2560
in order to know if the problem isdue to firmata or as3glue.

So I did a test with firmata and processing.

I can send an order since the pin 2 to the pin 21 when I use Processing and StandardFirmata.
I'm so close...
why doesn't it work until the 25th pin ?
=(

Update
I found this topic which seems to be linked to my problem
http://arduino.cc/forum/index.php/topic,56850.0.html

this is my problem too,

the problem is from the as3glue class because it has limited pin for writeDigitalPin(), it only support pin 2-13.

i need help...

thanks in advance

I've updated the Flash Library arduino.as and now it is compatible with the Arduino Mega 2560 writeDigitalPin above 13.

I've tested and it works (pin 22 .. 53)

may be useful.

sorry for my bad english

this is link for download

I've included the changes from Mochammad on the as3glue site and in the bundle (including a modified example):
http://code.google.com/p/as3glue/downloads/detail?name=arduino_as3glue_bundle_v20.zip

great one.