You should receive AssetType.MATERIAL, but the 3DS parser probably
doesn't implement this properly. All parsers are in very different
states right now, and it's something that we are aiming to stabilize
for beta release. Before then you will continue to see issues like
these (where not all assets are dispatched and some are dispatched
before being fully finalized).

What I would do in your case is just check for AssetType.MESH, and do
Mesh(event.asset).material.mipmap = false. No need to check for the
bitmap (unless your app logic needs it for some other reason.)


Cheers
/R

On May 18, 12:52 pm, Michael Iv <[email protected]> wrote:
> Richard you are right. But when checking for assetType == AssetType.MATERIAL
> the debuger doesn't enter the statement at all. For more info ,what I do is
> loading 3Ds model assuming that its texture is loaded automatically. That is
> why I switched to BITMAP .Also would like to ask you as a complete N00b what
> are the cases I would receive AssetType.MATERIAL type ?
>
>
>
>
>
>
>
>
>
> On Wed, May 18, 2011 at 1:47 PM, richardolsson <[email protected]> wrote:
> > @Michael:
> > That code looks dangerous. Right now you are assuming that the assets
> > that are returned are either bitmaps or meshes. If a material is
> > returned, that code will crash.
>
> > Either check for assetType == AssetType.MATERIAL (and set the assets
> > mipmap property) or do what you do now but make sure to check that the
> > asset is really a mesh (assetType == AssetType.MESH).
>
> > Cheers
> > /R
>
> > On May 18, 12:42 pm, Michael Iv <[email protected]> wrote:
> > > This worked:
>
> > > private function onAssetComplete(e:AssetEvent):void{
> > > if(e.asset.assetType == AssetType.BITMAP){
> > > BitmapDataAsset(e.asset).name;
> > >  }else{
> > > Mesh(e.asset).material.mipmap=false;
>
> > > }
> > > }
>
> > > :) .
> > > Feeling a total n00b with Away4 ;) !
>
> > > On Wed, May 18, 2011 at 1:33 PM, Michael Iv <[email protected]>
> > wrote:
> > > > @John it is 2048x512
>
> > > > @Richard so where do i ACCESS the mipmap property? on the material?
>
> > > > Tnx
>
> > > > On Wed, May 18, 2011 at 1:29 PM, John Brookes <[email protected]
> > >wrote:
>
> > > >> or
> > > >> Just resize the image in photoshop to power of 2 square
> > > >> It will still work.
>
> > > > --
> > > > Michael Ivanov ,Programmer
> > > > Neurotech Solutions Ltd.
> > > > Flex|Air |3D|Unity|
> > > >www.neurotechresearch.com
> > > >http://blog.alladvanced.net
> > > > Tel:054-4962254
> > > > [email protected]
> > > > [email protected]
>
> > > --
> > > Michael Ivanov ,Programmer
> > > Neurotech Solutions Ltd.
> > > Flex|Air |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.net
> > > Tel:054-4962254
> > > [email protected]
> > > [email protected]
>
> --
> Michael Ivanov ,Programmer
> Neurotech Solutions Ltd.
> Flex|Air |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.net
> Tel:054-4962254
> [email protected]
> [email protected]

Reply via email to