My code in the previous post uses load() to do the loading of the main
file (even though the dependency is embedded.) This is perfectly valid
-- embedded dependencies can be mixed in any way. But I imagine you
also want to see the Loader3D.parseData() in action. Then just replace
the loader3D section in the above code with:

[Embed(source="model.awd", mimeType="application/octet-stream")]
var ModelData : Class;

var loader : Loader3D = new Loader3D();
loader.parseData(ModelData, null, context);
myScene.addChild(loader);


Cheers
/R


On Jun 1, 10:25 am, richardolsson <[email protected]> wrote:
> We will take a look at memory leaks ASAP, although probably not in the
> alpha cycle (right now we are focusing on restoring as much
> functionality as possible from old Away3D versions into Away4, and
> bugs like these will need to be taken care of in the beta cycle.)
>
> As for the embedding, just do:
>
> [Embed(source="path/to/image.jpg",
>   mimeType="application/octet-stream")] // MIME-type important!
>   var ImageData : Class;
>
> var context : AssetLoaderContext = new AssetLoaderContext();
> context.mapUrlToData('path/to/image.jpg', ImageData);
>
> var loader : Loader3D = new Loader3D();
> loader.load(new URLRequest('model.awd'), null, context);
> myScene.addChild(loader);
>
> This is no different from what has been posted in previous threads on
> this list. It has been tested and should be working absolutely fine.
> It is however extremely important that the URL/path that is passed to
> mapUrlToData() is the exact same as the one used in the AWD file. If
> it's not, then the resolver won't be able to find a matching mapping.
>
> When you say it's not working, what exactly is it that's not working?
> Are errors being thrown?
>
> Obviously documentation would help, but we are not focusing on
> documentation this early in the development cycle. Proper
> documentation will be released alongside the final version of Away3D
> 4.0, and then maintained for future dot-releases, but we cannot spend
> time on documenting an API that may still change, because that will
> have been wasted time. I hope you understand.
>
> Cheers
> /R
>
> On May 31, 10:02 pm, John Brookes <[email protected]> wrote:
>
>
>
>
>
>
>
> > Yes,two issues.
> > Memory, I see geometry and mesh still hanging around.
> > Subg/materials/methods etc all cleaned
>
> > screens from an OBJ that contains 8 cubes.
>
> > As for the embed, a working example would help(not just me). The awd is no
> > different from any other.http://dl.dropbox.com/u/20426629/Models.rar
>
> >  profile2.png
> > 165KViewDownload
>
> >  profile.png
> > 153KViewDownload

Reply via email to