current frame MD5 example

Software: Away3D 4.x

Avatar
oladitan, Member
Posted: 12 April 2013 11:21 PM   Total Posts: 71

Hello. I am using looking at the Intermediate_MD5Animation example that comes with the away3d 4.1.0 examples. I have added some code to try and access the current frame of animation:

import away3d.animators.states.AnimationClipState;
public var 
clipStates:Vector.<AnimationClipState>;
clipStates = new Vector.<AnimationClipState>; 
if (event.asset.assetType == AssetType.ANIMATION_NODE{

var node:SkeletonClipNode event.asset as SkeletonClipNode;
var 
name:String event.asset.assetNamespace;
var 
clipState:AnimationClipState = new AnimationClipState(animatornode); // added code
clipStates.push(clipState); // added code
node.name name

in the onEnterFrame function i have added :

for each(var clipState:AnimationClipState in clipStates{
trace
(clipState.currentFrame);

When I do this I get all zeros for my output even though the character is clearly playing animation. How do I access the current frame of an MD5 animation. thank you.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X