I downloaded the latest FOAM version
http://code.google.com/p/foam-as3/
and it looks like the same Vector-related errors also occurs in all their 
examples.

Looks like FOAM needs to be updated to support Flex 4/Air 2. Maybe the "Vector" 
name used in FOAM conflicts with a new "Vector" class in Flex 4 or something???

Maybe there is a quick fix to solve this one Vector error?

Don




--- In flexcoders@yahoogroups.com, "fusionpage" <fusionp...@...> wrote:
>
> I tried to open the FOAM physics form example (built for Flex 3) in Flex 
> 4/Air 2
> http://dougmccune.com/blog/2008/02/26/examples-from-my-360flex-session-using-open-source-community-projects/
> 
> And get the compiler errors below. I've posted a comment on Doug's blog but 
> thought I'd also bounce it off this list.  Any ideas?
> 
> 
> compiler error is on this line in the setGravity function
> _gravityForce = new Gravity( new Vector(xValue, yValue) );
> 
> public function setGravity(yValue:Number=0, xValue:Number=0):void {
> 
> if(_gravityForce) {
> foam.removeGlobalForceGenerator(_gravityForce);
> }
> else {
> foam.simulate();
> }
> 
> _gravityForce = new Gravity( new Vector(xValue, yValue) );
> foam.addGlobalForceGenerator(_gravityForce);
> }
> 
> here are the errors:
> 
> 1067: Implicit coercion of a value of type __AS3__.vec:Vector to an unrelated 
> type org.generalrelativity.foam.math:Vector. PhysicsContainer.as
> 
> 1137: Incorrect number of arguments. Expected no more than 0. 
> PhysicsContainer.as
> 
> I'm using Flash Builder 4 with Flex 4 SDK w/ Air 2 SDK.
> 
> Looks like an SDK compatibility issue
> 
> Any ideas?
> Thanks,
> Don
>


Reply via email to