Some replacements are HTML 5, WebGL, and WebAssembly. These are much safer than Flash, which suffered from various security problems.