Isn't flash actually a movie format?
ActionScript is just a little scripting language that is used in Adobe Flash. You cannot do anything in flash with C++, Java etc. Java applets can be an alternative to flash for writing website based games. For example, Desktop Tower Defence is Flash using Flash's internal scripting language ActionScript, whereas runescape is a game written using a Java Applet (for the client only).