tags:

views:

31

answers:

1

I'm trying to port the code from flipbook component in Flex to Air 1.5.1, it gave this error 1137: Incorrect number of arguments. Expected no more than 0.

delta = new Vector(new Point(x,_pointOfOriginalGrab.y),new Point(x+10,_pointOfOriginalGrab.y+1));

How do I make it work in Air?

+1  A: 

From the Flex documentation, it looks like Vector constructor accepts a length for it's first argument and fixed for its second argument. You can rewrite you code as this:

delta = new Vector();
delta.push(new Point(x,_pointOfOriginalGrab.y));
delta.push(new Point(x+10,_pointOfOriginalGrab.y+1));

Here's the documentation page:

Vector Documentation

Ben Johnson
nope, it doesn't accept any argument in Air project
proyb2
Oh, it worked by disabled the "Strict type checking" option in Flex builder.
proyb2