It won't allow me to create anMXML application in a pure Actionscript joject. 
So I careted a simple as.script . The problem seems the program itself. After I 
finished it and try to compiled it it was showing those same errors way before 
I create the AS script to call the method:
public function test():void
{
var yugo:Car = new Car(10, "North");
yugo.showVelocity( );
}

This AS.script returns the same error and the program seems perfect.

--- In [email protected], "ellistein52" <ellistei...@...> wrote:
>
> 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