send me offline your obj please

Fabrice

On Apr 1, 2011, at 1:27 PM, Darcey Lloyd wrote:

> Nope same error.
> 
> I have tried:
> 
> [Embed(source="superman.obj", mimeType="application/octet-stream")]
> private var model1Asset:Class;
> modelContainer = ObjectContainer3D(ResourceManager.instance.parseData(new 
> model1Asset(), "Model1",true));
> 
> and
> 
> modelContainer = 
> ObjectContainer3D(ResourceManager.instance.getResource("superman.obj",false));
> 
> 
> 
> Both result in:
> ObjParser MTL LOAD ERROR: unable to load .mtl file
> TypeError: Error #1009: Cannot access a property or method of a null object 
> reference.
>       at away3d.loading.parsers::OBJParser/parseLine()[D:\wamp\www\Dev\Away3D 
> Broomstick\Away3D4_MeteorGame\src\away3d\loading\parsers\OBJParser.as:212]
>       at 
> away3d.loading.parsers::OBJParser/proceedParsing()[D:\wamp\www\Dev\Away3D 
> Broomstick\Away3D4_MeteorGame\src\away3d\loading\parsers\OBJParser.as:168]
>       at 
> away3d.loading.parsers::ParserBase/onInterval()[D:\wamp\www\Dev\Away3D 
> Broomstick\Away3D4_MeteorGame\src\away3d\loading\parsers\ParserBase.as:283]
>       at flash.utils::Timer/_timerDispatch()
>       at flash.utils::Timer/tick()
> 
> OBJParser.as
> 208:                          case "usemtl":
> 209:                                  if(_mtlLib){
> 210:                                          _materialIDs.push(trunk[1]);
> 211:                                          _activeMaterialID = trunk[1];
> 212:                                          _currentGroup.materialID= 
> _activeMaterialID;
> 213:                                  }
> 214:                                  break;
> 
> 
> 
> File structure:
> 
> [src dir]
> Main.as
> Superman.obj
> Superman.mtl
> Texture1.jpg
> Texture2.jpg
> 
> [bin-debug]
> Main.swf
> Superman.obj
> Superman.mtl
> Texture1.jpg
> Texture2.jpg
> 
> 
> Do I need to embed the MTL file or specify loading it somewhere?
> 
> 
> D
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> On 1 April 2011 12:14, Darcey Lloyd <[email protected]> wrote:
> @Fabrice
> Damn, tortoise playing up again, even my repo browser says 3101 will 
> un-install and get latest version.
> 
> @John
> My file system is
> 
> [src dir]
> Main.as
> Superman.obj
> Superman.mtl
> Texture1.jpg
> Texture2.jpg
> 
> [bin-debug]
> Main.swf
> Superman.obj
> Superman.mtl
> Texture1.jpg
> Texture2.jpg
> 
> 
> 
> 
> 
> On 1 April 2011 12:09, John Brookes <[email protected]> wrote:
> Just make sure on path.
> 
> With flash develop.
> If I have the Main.as in src and the mtl and obj in bin
> 
> bin
> -->my.obj
> -->my.mtl
> -->MyprettyImage.jpg
> 
> src
> -->main.as
> 
> I would have to use
> var url:String = "../bin/objCube.obj";
> 
> if everything is in src then
> var url:String = "../src/objCube.obj";
> 
> Otherwise it throws either mtl error or parse error.
> 
> 

Reply via email to