Archive for 'Software'

Differences between AS2.0 and Java

ActionScript 2.0 is much more object oriented and Java-like than its predecessor, which makes it easy to learn for Java programmers. Here are some key differences, which may help make the transition easier.

Using the event framework outside Components

The v2 component architecture introduced a new event dispatching and handling framework, in which event objects are produced by components and consumed by whatever listeners are attached to them. For more information on this, refer to the Flash documentation under “Using the event object”. The following sample code illustrates the basic principles. listener = new [...]

Useful undocumented properties of the Loader.progress event

I discovered two useful undocumented properties of the event object emitted by the Loader class.

Setting styles for a component class

Details on how exactly to set the default style for all instances of a particular component.

Math.log() is really ln

In AS2.0, the Math.log(x) function actually gives you ln x (base e).