Returning to Away3d after a bit of a break… Lots of ‘Error: Type was not found or was not a compile-time constant’ type errors..

Software: Away3D 4.x

Mr Margaret Scratcher, Sr. Member
Posted: 26 February 2012 05:52 AM   Total Posts: 344

Hi guys!

After a long time working on non 3d stuff, and a bit of a new year’s day hard drive catastrophe, I’ve come back to old away3d projects to find that none of them work…

So many variables involved, where to start?

eg:

Subgeometry.as
57 Error: Type was not found or was not a compile-time constant: VertexBuffer3D.

I’ve got literally hundreds of errors like this…

I’ve downloaded the most recent version of away3d via smartgit, I’m not sure what else to try?

Any ideas?

   

Avatar
kurono, Sr. Member
Posted: 26 February 2012 07:10 AM   Total Posts: 103   [ # 1 ]

Did you set “-swf-version=13” in flex’s compiler settings?

   

Mr Margaret Scratcher, Sr. Member
Posted: 26 February 2012 04:02 PM   Total Posts: 344   [ # 2 ]
kurono - 26 February 2012 07:10 AM

Did you set “-swf-version=13” in flex’s compiler settings?

Using Flashdevelop, opened an old (previously working) project so yeah, that is still set…

The only thing I can think is thatwhen I downloaded Flashdevelop it automatically downloaded the Flex libraries.. Could it be that it didn’t download the right ones I wonder?

   

Mr Margaret Scratcher, Sr. Member
Posted: 26 February 2012 08:27 PM   Total Posts: 344   [ # 3 ]

Aha… It seems that the default Flex SDK that Flashdevelop downloads is 4.6… I just pointed Flashdevelop to the previously installed Flex 4.5 install from here: http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.5

And now I’ve got a few other errors, which are probably to do with the new version of away3d…

Stuff like:

10 Error: Type was not found or was not a compile-time constant: Cube.

Right… I’ll plough on…

   

Mr Margaret Scratcher, Sr. Member
Posted: 26 February 2012 08:58 PM   Total Posts: 344   [ # 4 ]

Okay, now directing Flashdevelop to the presious away3d libraries and getting

Error: Type was not found or was not a compile-time constant: Camera3D.

I’ll get there, just taking a while to figure out where I was at…

   

Avatar
kurono, Sr. Member
Posted: 26 February 2012 11:12 PM   Total Posts: 103   [ # 5 ]

“Type was not found or was not a compile-time constant: Cube.”
That’s right, Cube class doesn’t exist anymore. Use the CubeGeometry instead, like follows:

var mtl:ColorMaterial = new ColorMaterial(0xff0000);
   
with (mtl{
    specular 
.5;
    
gloss 100;
    
ambient 0.1;
    
bothSides false;
    
lightPicker = new StaticLightPicker(_lights);
    
diffuseLightSources LightSources.LIGHTS;
    
specularLightSources LightSources.LIGHTS;
   
}

   
var c:Mesh = new Mesh(new CubeGeometry(), mtl);
   
_view.scene.addChild(c); 

 

   
   
‹‹ Applying Lighting

X

Away3D Forum

Member Login

Username

Password

Remember_me



X