First you find out what is the maximum current rating of the cockpit.
If it requires 4 nos of AA batteries, then I guess voltage rating is 4 x 1.5v = 6v....
You can use a DC adapter.
Say, it requires/consumes 800mA of current. Then you can use a 1A DC adapter.
But, here is the catch.... Mostly, DC adapters have transformers of RMS values. That is, if it is a 220v AC to 6v DC adapter, then they generally uses a 6v transformer. Any transformer works on AC. But they do not considers the RMS & peak voltage factor. When that 6v AC is converted to DC, it becomes 6v x √2. That is, 6v x 1.414 = 8.484V, which is a higher voltage level and could be fatal for your system.
If I were in your place, I would first check the output DC voltage level of the adapter. If it is higher than 6v, then I will use a voltage regulator IC, LM7806 in series for a 6V constant supply. And adding a large electrolytic capacitor to reduce ripple voltage.