Actionscript is nearly identical to forms of Javascript, so I'm not sure what you find about learning your time with Flash that wouldn't be transferrable.
Adobe Animate CC is the new version of Flash Pro that builds for HTML5, and if that doesn't float your boat, there's a wealth of JS libraries like pixi and p5.js that look extremely inviting.
There was a time that was a great career path. However, you never can predict how well a technology will perform, especially if it's tied to a closed platform. I suppose this speaks to the power of open source.
Then again, Animate CC should allow you to use those skills for the various platforms it supports.