Hello all. I am trying to get Ely Greenflied's Flexbook to work in the Flex 4 SDK. But am running into some troubles. The component is erroring on the Vector functions in the Flexbook.as file.
It is throughing the following error everytime the vector function is call:
"Incorrect number of arguements. Expected no more than 0."
And the line of code that is erroring is:
delta = new Vector(new Point(x,_pointOfOriginalGrab.y),new Point(x+10,_pointOfOriginalGrab.y+1));
Does anyone have any ideas to help me get this working please? Thanks!
ive never been able to construct a new Vector and populate it in one line of code - not sure if its me or a quirk of the Vector class.
anyway, try changing code to:
delta = new Vector.<Point>();
delta.push(new Point(x,_pointOfOriginalGrab.y),new Point(x+10,_pointOfOriginalGrab.y+1));
and see if that works
Hello Lee. Thanks for the help, unfortunately the new code gets a different error. I am hoping it's just an easy syntax issue, but I cannot see anything that stands out. There are actually 2 errors that occur on the 2nd line of code and they are:
"1084: Syntax error: expecting rightbrace before new."
"1084: Syntax error: expecting rightparen before new."
Thanks again for your help!
not sure what the problem could be - the code compiles ok for me.