I think you have to use the old DTS exporter compatible version to animate. That's what threw me away from animating. That old version barely works enough for me to export to DTS
The new one works, I've used it. I animate with the action editor, and then I click the "Create Sequence from Actions" or whatever button and export normally.
@OP: You can't animate in 2.71. As soon as you open it in 2.49 to export, the animations will be wiped. Animations must be done in 2.49.
To animate it, select your armature object, go into edit mode, create a new bone, move it into position with whatever you want to animate, and then go into pose mode for that armature. Select the bone, then Shift-select the object you're animating, and hit Ctrl-P. Click "Bone" in the box that pops up. Your object is now ready for animating. Go to the action editor window, and create a new animation (name it something). Now animate ("I" for keyframes)! Once you're done with the animation, time to export. For the animations, you'll need to set up a couple things. In the Sequence tab, select the "Create Sequences from Actions", and on the animation that appears, make sure "Export" on the animation selected, and "Cyclic" and "Dsq" deselected. Then, export!
As for the code, I can't deal with that right now, sorry. If you want to learn how to detect a spacebar press, download my Snowboard and look at the scripts. For playing animations, use the playThread(); function. Sorry, that's all I can type up at the moment. :(