- It was based upon ECMAScript 4.
- The ActionScript code was open source, and the actual reference code for ECMAScript 4.
- The JIT runtime of ActionScript 3 was open sourced (Tamarin) and "donated" to Mozilla to use as the basis for a faster JS runtime.
Also, your comparison of Flash with Apple's Cocoa/OS platform frankly makes no sense. The situation is vastly different. Swift is in exactly the same position as Objective-C. It's under no greater threat to disappear than Objective-C is.