how to set md5anim’s namespace?because I can not run the latest characterDemo.as

Software: Away3D 4.x

liuyi, Member
Posted: 19 October 2011 02:07 AM   Total Posts: 65

Hi all,

How to set md5anim’s namespace?because when
_animationController.play(“walk”, 0.5);

characterDemo.as can not find the action :walk

AssetLibrary.load(new URLRequest("../embeds/hellknight/idle2.md5anim"), nullnull, new MD5AnimParser()); // "idle");
    
AssetLibrary.load(new URLRequest("../embeds/hellknight/walk7.md5anim"), nullnull, new MD5AnimParser()); //"walk");
  

  
private function onAnimationComplete(event AssetEvent) : void {
   
   
var seq SkeletonAnimationSequence event.asset as SkeletonAnimationSequence;
  
   if (
seq{
    trace
("onAnimationComplete: "+seq.name,seq.originalName,seq.assetNamespace)
    
seq.name event.asset.assetNamespace;
    
_animationController.addSequence(seq);
   
}
   
if (event.asset.assetNamespace == "idle")
    
_animationController.play("idle"0.5);
  

trace result:

version: AwayPhysics v0.66 (18-10-2011)
onAnimationComplete: md5sequence md5sequence default
onAnimationComplete: md5sequence md5sequence default

   

Richard Olsson, Administrator
Posted: 19 October 2011 09:18 AM   Total Posts: 1192   [ # 1 ]

If I understand you correctly, you want to be able to define what namespace to use for a resource that you load. Use the “ns” argument to the load() or loadData() functions. It should be the third argument. The default value (as you have noticed in your code above) is “default”.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X