I always modify the line 179 of ResourceLoadSession.as to:
if (_ignoreDependencies){
this._handle = _resource;
dispatchEvent(new
ResourceEvent(ResourceEvent.RESOURCE_RETRIEVED,
_resource, _uri));
return;
}
Then it work for my case of load 3ds model.
Hope that helps.
On 3月27日, 上午6时26分, Fabrice3D <[email protected]> wrote:
> Fixed here and there and added class in examples section
> EmbedParseDataTest.as
>
> note that for some file type, such as 3ds image load will probably fail.
> This is an async issue. I'll try adress this one asap.
>
> example shows the embed and parsing of 4 file formats
> obj also loads maps if mtl is provided.
>
> in worst case from all files tested on my machine, you end with no maps
> loaded, geometry is displayed with default map.
>
> waiting on old max files to test the animation missing bytes...
>
> Fabrice
>
> On Mar 24, 2011, at 4:19 PM, MADCATX wrote:
>
>
>
>
>
>
>
> > Hello, I'm trying to load embedded model files, but without success.
> > Following code produces error:
>
> > [Embed(source="model.3ds", mimeType="application/octet-stream")]
> > private var modelObj:Class;
>
> > public function LoadModel() :void
> > {
> > ResourceManager.instance.parseData(new modelObj(), "model", true,
> > Max3DSParser);
> > }
>
> > Error Thrown:
>
> > Error #1034: Type Coercion failed: cannot convert
> > ResourceLoadSession@1f82c151 to away3d.loading.IResource.
> > Fault, ResourceManager.as:179
>
> > The following code works alright:
>
> > public function LoadModel() :void
> > {
> > ResourceManager.instance.getResource("model.3ds", true);
> > }
>
> > Most models in .obj format seems to be parsed properly when using
> > embedded model, but some models still throws error. 3ds files always
> > throw error when are being parsed from embedded file.