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"), null, null, new MD5AnimParser()); // "idle");
AssetLibrary.load(new URLRequest("../embeds/hellknight/walk7.md5anim"), null, null, 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