Programming basics
Properties, Methods, Events
Such descriptions of Button as width, height, x , y are it's properties. If name of the button instance on the stage is btCancel it's horizontal position may be referred as btCancel._width . Those are properties of Button object, and their values characterize exactly btCancel.
Method is a functionality pertinent to certain object. For example "myMovie" is a name of variable of the type MovieClip. myMovie.remove(); illustrates how method remove() of MovieClip object works. If called like that it will simply destroy the instance of movie symbol on the stage.
In ActionScript methods and properties are written through dot (.) notation. Properties also have underscores before them.
Events "happen" to the objects. Typical events could be onLoad, onDrag, onClick. When methods called an object knows exactly what to do. When event happens – for example user clicks the button – nothing is going on by default. Programmer needs to write the code for the event.
If you completed our previous basic Flash course – you have used such button event handlers like
on(release) {
stop();
}
Code is executed when button is released.