I see in a lot of tutorials that people choose to not give their variables any value inside the class tags, but let the constructor function handle this instead, like this example:
package
{
import flash.display.MovieClip;
public class Example extends MovieClip
{
private var myNumber:Number;
private var myBoolean:Boolean;
public function Example()
{
myNumber = 10;
myBoolean = true;
}
}
}
I’m curious why they do this, is it some sort of best practise thing?