AssetLibrary Confused Event Style

Software: Away3D 4.x

Concept Z, Sr. Member
Posted: 30 June 2011 08:37 AM   Total Posts: 124

Hi, away3d team ,

When i digged into the UVAnimationTest.as ,i found that:

import away3d.library.AssetLibrary;
import away3d.loaders.misc.AssetLoaderContext;
import away3d.loaders.parsers.Parsers;

.................................
[Embed(source "/../embeds/uveyes/eyes.3ds",mimeType "application/octet-stream")]
private var MeshData:Class;

.................................

AssetLibrary.enableParsers(Parsers.ALL_BUNDLED);  

AssetLibrary.addEventListener(LoaderEvent.RESOURCE_COMPLETEonComplete);
AssetLibrary.parseData(MeshData);

..................................


private function 
onComplete(ev LoaderEvent):void
{
    _eyes 
Mesh(AssetLibrary.getAsset('Cylinder'));
    
_eyes.material _mat;
    
_eyes.scale(100);
    
_eyes.rotationY 180;
    
_view.scene.addChild(_eyes);
  

 

I was just a little confused about such event style,  it seems not a logical and elegant event style

 Signature 
signature_image

Anyone can cook but only the fearless can be great

   

Richard Olsson, Administrator
Posted: 30 June 2011 09:56 AM   Total Posts: 1192   [ # 1 ]

What exactly is the event style that you’re objecting against? Can you elaborate on what you think isn’t logical or elegant?

   

Avatar
Choons, Sr. Member
Posted: 30 June 2011 08:39 PM   Total Posts: 281   [ # 2 ]

it looks great to me. I like the AssetLibrary loading process because it mirrors the regular Flash Loader process

   
   
‹‹ Homework Business

X

Away3D Forum

Member Login

Username

Password

Remember_me



X