Help with export to AS3 class

Software: Away3D 4.x

Leroy Isbell, Newbie
Posted: 03 August 2015 09:20 PM   Total Posts: 4

Hello All,
I am new to programming with Flashdev and Away3d. So I am still in the learning process.

The problem I am having is the process of exporting a awd or a export with a class from Prefab to load into Flashdev to compile an output.
I have looked all over the web for a example or a tutorial on a complete process of importing your model and exporting and loading in to code with no luck.

Could someone point me on the right path.

thanks in advance,


Fabrice Closier, Administrator
Posted: 04 August 2015 09:56 AM   Total Posts: 1265   [ # 1 ]

Prefab’s exports do come with a project file.
This class is there to show you how it works. Its an example of implementation.

so if you target the PrefabProject class as main class, the export will compile and replicate what you have exported from Prefab.

Your specific class (the class you gave a name yourself) isn’t extending sprite. Its extending ObjectContainer3D, so you cannot compile this class standalone. You need to provide it a scene (again, look at the class how it works)

to insert/import the classes into your project its very easy.
in the class where you have your view, say you exported “”
add import myModel;
and when your view is declared and addChilded, simply do:

var myModel:MyModel = new MyModel();
view.scene.addChild( myModel);

that’s it.

now if you want to access materials, meshes, containers, animators
simply loop over the class provided arrays like
myModel.meshes, myModel.containers, myModel.materials etc..

again, look at the provide3d project class, which runs out of the box and show you how to use it into your project or allow you to start from it.

exporting awd is the same, simply use a loader3d. Note that away4.16 has a bug in awd encoding, so either export the awd and modify the compression tag in parser or export with no compression. I have already provided a fix to the parser, search this forum.



Leroy Isbell, Newbie
Posted: 06 August 2015 05:10 PM   Total Posts: 4   [ # 2 ]

Thank worked great.
I have a second problem and posting that new problem now.
Thanks again,



Away3D Forum

Member Login