Mouse actions, (on release, on roll over etc) only work now this way?

So the only way now in actionscript 3.0 to trigger a mouse action is to write a listener and then an event handler ?

no longer can we write actionscript directly to the movie clip like this:

on(release){

this.gotoAndStop(2);

}

and no longer can we just write this in the main timeline to get to a movieclip:

button.onRelease = function() {
button.y =+ 20;
}

So I just wanted to confirm this, as always any help is appreciated.