ArgumentError: Error #1063: Argument count mismatch on Car(). Expected 2, got 0.


Here's the code:

package {
public class Car {
private var speed:Number;
private var direction:String;
public function Car(speed:Number,direction:String) {
this.speed = speed;
this.direction = direction;
}
public function showVelocity():void {
trace("The car's velocity is "+this.speed
+" KPH "+this.direction);
}
public function crash():void {
trace("Boom!");
}
}
}

Then I built a class inside of the package Car class and called the
method:

var yugo:Car = new Car(10, "North");
yugo.showVelocity();

Reply via email to