First cut of the JavaScript->AS3 AVM1 migration