Hey Fabrice thanks for the help:) I'm still having problems getting it to work. I've build my project in Flashdevelop and i'm getting the following errors with the static function parse/load and the variable _container: (I'm to lazy to translate it and i know your dutch :P)
\src\away3d\loaders\AWData.as(299): col: 29 Error: Aanroep van een mogelijk niet-gedefinieerde methode parse via een verwijzing van het type 'static' Class. return Loader3D.parse(data, AWData, init).handle; ^ \src\away3d\loaders\AWData.as(317): col: 29 Error: Aanroep van een mogelijk niet-gedefinieerde methode load via een verwijzing van het type 'static' Class. return Loader3D.load(url, AWData, init); ^ \src\away3d\loaders\AWData.as(233): col: 25 Error: Gebruik van niet- gedefinieerde eigenschap _container. _container = isMesh? mesh : aC[0]; ^ On 17 nov, 12:14, Fabrice3D <[email protected]> wrote: > 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
