Like in all engine versions; it can be nice to be able to set position of the 
handle before its loaded or rotations.
but you must wait that everything is surely loaded before do anything else.
also now, we have greatly improved the loading, Means that when this event is 
fired everything is parsed and loaded. that includes the maps.

soon there will be parsing and loadingresource progresses events available too.

In the examples, like the head demo, the sources are embeded and the obj file 
doesn't have material info(mtl)
so then its different. You can use the parsedata method and you have it all ok.

Fabrice



On Mar 2, 2011, at 10:22 PM, Andrew wrote:

> Nope! That must be why. Ill rewrite it and test out using the
> RETRIEVED listeners and let you know if that works.
> 
> On Mar 2, 3:30 pm, Fabrice3D <[email protected]> wrote:
>> Do you do like this?
>> 
>> [..]
>> ResourceManager.instance.addEventListener(ResourceEvent.RESOURCE_RETRIEVED, 
>> onResourceRetrieved);
>> ResourceManager.instance.addEventListener(LoaderEvent.LOAD_ERROR, 
>> onResourceLoadingError);
>> ResourceManager.instance.addEventListener(LoaderEvent.LOAD_MAP_ERROR, 
>> onResourceMapsLoadingError);
>> 
>> ResourceManager.instance.getResource("mymd2url.md2" );
>> 
>> }
>> 
>> private function onResourceRetrieved(e : ResourceEvent) : void
>> {
>>         _mesh = Mesh(e.resource);
>>         BitmapMaterial(_mesh.material).bitmapData = myDiffuseMap;
>> 
>> Fabrice
>> 
>> On Mar 2, 2011, at 7:53 PM, Andrew wrote:
>> 
>>> I tried :
>> 
>>> _meshMaterial = new BitmapMaterial(new Texture().bitmapData);
>>> _mesh = Mesh(_resourceManager.getResource("assets/modelpack25/
>>> generator.md2"));
>>> _mesh.material = _meshMaterial;
>> 
>>> It's still coming up white.
>> 
>>> -Andrew
>> 
>>> On Mar 2, 1:35 pm, Andrew <[email protected]> wrote:
>>>> Hey, I have a quick questions about using MD2 Models and Applying
>>>> Material.
>> 
>>>> I noticed in the LoaderMD2Test.as that it uses the:
>> 
>>>> var material : DefaultMaterialBase;
>> 
>>>> material = DefaultMaterialBase(_mesh.modelMaterial);
>> 
>>>> material.normalMap = new Norm().bitmapData;
>>>> material.specularMap = new Spec().bitmapData;
>>>> material.diffuseMethod = new EnvMapDiffuseMethod(_diffuseMap);
>> 
>>>> Is the DefaultMaterialBase inheriting the skin that is used on
>>>> the .MD2 model.
>> 
>>>> I added another MD2 model and changed the skins but I'm not getting
>>>> the skin to be applied.
>> 
>>>> When I removed the normalMap, Spec, & Diffuse it's basically just a
>>>> mesh with white.
>> 
>>>> Can anyone lead me to get just the blank mesh with the default skin
>>>> that is currently textured on it.
>> 
>>>> I tried just using:
>> 
>>>> var material : BitmapMaterial = new
>>>> BitmapMaterial(Texture().bitmapData, true, false, true);
>>>> material = BitmapMaterial(_mesh.material);
>>>> material.normalMap = new Norm().bitmapData;
>> 
>>>> Texture() is the class Embed associated with the regular texture. I'm
>>>> sure im doing this completely wrong.
>> 
>>>> Thanks,
>>>> -Andrew

Reply via email to