Hi wsvdmeer,

Its very easy and is very similar to other loading processes.
first you need to import like for any other loaders the AWData class

import away3d.loaders.AWData;

via loaders

var loader:Loader3D;
loader = AWData.load(file_url);
loader.addOnSuccess(onLoaderSuccess);
loader.addOnError(onLoaderError);

or
var loader:Loader3D = new Loader3D();
loader.addOnSuccess(onLoaderSuccess);
var awd: AWData = new AWData();
loader.loadGeometry(file_url, awd);

private function onLoaderSuccess(e:Loader3DEvent):void
{
        this.object3d = e.loader.handle;
        view.scene.addChild(this.object3d);
// note: the use of this is optional here, it just to show you a class var use as Object3D
}

if you have changed the default export "images" folder relative to the awd you can set a custom url for the sources using pathToSources setter or via initobject;

var awd: AWData = new AWData();
awd.pathToSources = mynewpathurl;
loader.loadGeometry(file_url, awd);

you also can embed the file or load the string file from database
and give it to the AWData.parse(myclassembed);
in this case also, if the "images" default folder is not located where swf plays, pass a custom path using pathToSources setter


Fabrice



On Nov 17, 2009, at 11:56 AM, wsvdmeer wrote:

Can someone explain how to use the AWData class?
I have a .awd model exported from Prefab already but i have no idea
how to load/parse/add the model

Reply via email to