Controlling an animation in loaded as3 object

Software: Away3D 4.x

drbii, Member
Posted: 08 July 2014 02:55 AM   Total Posts: 72

I know how to control an vertex animation in a loaded awd, but I have recently started loading objects as an as3.  Now I am trying to figure out how to control my vertex animations that I have in my as3 class.  I am sure I exported them from prefab (clicked the include animation button).  They imported…they are playing, looping over and over.  I knew how to do this with loader obj, but with it being as3 now I am confused.  I just can’t figure out how to access the animator and stop and start it.  Anybody have any pointers?  Thanks all!

   

Avatar
Fabrice Closier, Administrator
Posted: 08 July 2014 09:12 AM   Total Posts: 1265   [ # 1 ]

As materials, meshes or containers, you have an animators array if you want access a given animator directly.
You can also access these from meshes.

var va:VertexAnimator = myClass.animators[0];
or if you loop over meshes
var va:VertexAnimator = VertexAnimator(Mesh(meshes[loopindex]).animator);

If you want more details about the construct, open in package ‘data’ of the export, a class with the [meshName]AnimData en look at the buildAnimation method.

For details about how to use the animators in general, look at the many examples on Github with animators or search on this forum.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X