Well, Kevin knows A LOT about PHP, and it just so happens that a lot of PHP is Java-like, but without the need for a virtual machine. And obviously, Flash is based off of Java too. In fact, a lot of languages are based off of Java (or have something related to Java) except COBOL, but that is the worst language ever... I hate it >_<
Anyway.... I know DHTML and Java tid-bits really well, plus C++ (which has 90% like Java), so that's mainly how I know all that jazz.
This is actually why I'm trying to come up with a stable, powerful language that's not really based off of another one. Though it's gonna take me forever
I still need some local scripters, but Albany is nothing but red necks and country bumpkins
Btw, the code that you were going to use is incomplete. You have to declare the class MyButton and you much have a public child of MyButton (onPress). You also would have to remove that semicolon after that closing bracket. And the function is still incomplete. Something like this would make more sense:
MyButton.onPress = function(gotoAndPlay(2));
But even if you did
mean to make a function called MyButton, you would just be defining a function, not calling one. Though I don't think you can
define a function without declaring it's prototype.
And if MyButton.onPress is an attribute, and you do not need to call a function into a function, then just use
MyButton.onPress = gotoAndPlay(2);