When i tried with IDE's debug mode, i got error from Loader3D class
and the null object reference showed when pathArray.pop() occurs.
public function loadTextures(data:*, parser:AbstractParser):void
{
mode = PARSING_GEOMETRY;
if (url) {
var pathArray:Array;
if (url.indexOf("\\") != -1) url =
url.split("\\").join("/");
if(url.indexOf("/") != -1)
pathArray = url.split("/");
pathArray.pop();
var path:String;
if(url.indexOf("/") != -1)
path = (pathArray.length > 0)?
pathArray.join("/") + "/" :
pathArray.join("/");
//set texturePath to default if no
texturePath detected
if (texturePath == "" && url)
texturePath = path;
//set mtlPath to default if no mtlPath
detected
if (mtlPath == "" && url)
mtlPath = path;
}
//prepare data
this.parser = parser;
parser.addOnSuccess(onParserComplete);
parser.addOnError(onParserError);
parser.addOnProgress(onParserProgress);
parser.parseGeometry(data);
}
On Dec 9, 2:18 am, Dona <[email protected]> wrote:
> Yead..i used the debug mode but i can't see any traces!...just showing
> the error message that i've mentioned before.
>
> On Dec 9, 2:06 am, Aji Pamungkas <[email protected]> wrote:
>
>
>
>
>
>
>
> > Wow... that's weird... :D
>
> > Maybe you can try set Debug.active = true, to see what is going on when your
> > app is loading DAE.
>
> > On Wed, Dec 8, 2010 at 9:40 PM, Dona <[email protected]> wrote:
> > > Yes...
>
> > > On Dec 9, 1:32 am, Dona <[email protected]> wrote:
> > > > Yes <init_from>pumaMap.jpg</init_from>
>
> > > > On Dec 9, 1:29 am, Aji Pamungkas <[email protected]> wrote:
>
> > > > > Is it like this in your DAE :
> > > > > <init_from>pumaMap.jpg</init_from>
>
> > > > > ?
>
> > > > > On Wed, Dec 8, 2010 at 9:27 PM, Dona <[email protected]> wrote:
> > > > > > Hi Aji,
>
> > > > > > I've checked my dae file, inside that i can see only one texture
> > > > > > file
> > > > > > named "pumaMap.jpg", that i've given in right path!
>
> > > > > > Thanks
>
> > > > > > On Dec 9, 12:57 am, Aji Pamungkas <[email protected]>
> > > > > > wrote:
> > > > > > > Hi Dona,
>
> > > > > > > Open your collada file with text editor, find all textures that
> > > exist
> > > > > > > inside, and make sure, they are in the right folder.
>
> > > > > > > Good luck. :)
>
> > > > > > > On Wed, Dec 8, 2010 at 8:40 PM, Dona <[email protected]> wrote:
> > > > > > > > Hi,
>
> > > > > > > > I was trying to load a collada object.But it throws an error
>
> > > > > > > > TypeError: Error #1009: Cannot access a property or method of a
> > > null
> > > > > > > > object reference.
> > > > > > > > at away3d.loaders::Loader3D/loadTextures()
> > > > > > > > at away3d.loaders::Loader3D/onGeometryComplete()
> > > > > > > > at flash.events::EventDispatcher/dispatchEventFunction()
> > > > > > > > at flash.events::EventDispatcher/dispatchEvent()
> > > > > > > > at flash.net::URLLoader/onComplete()
>
> > > > > > > > My code :
> > > > > > > > var collada : Collada = new Collada();
> > > > > > > > var loader:Loader3D = new Loader3D();
>
> > > > > > loader.addEventListener(Loader3DEvent.LOAD_SUCCESS,
> > > > > > > > onLoadCollada);
>
> > > > > > > > loader.addEventListener(Loader3DEvent.LOAD_ERROR,
> > > onErrorCollada);
>
> > > loader.loadGeometry("puma_run.dae",collada);
> > > > > > > > scene.addChild(loader);
>
> > > > > > > > I've used away3D 3.6.1v.
>
> > > > > > > > Thank You
>
> > > > > > > --
> > > > > > > Aji Pamungkas
>
> > > > > --
> > > > > Aji Pamungkas
>
> > --
> > Aji Pamungkas