How do I play U3D Animation using PDFNet SDK?


I embedded an u3d file which contains an animation in a pdf file
(similar to U3D sample project -

When I load the pdf file in Adobe Reader, I cannot play the animation
by clicking the "play button". I have to use the "slider control" to
anime manually.

Could you explain me why please ? How should I create my pdf to make
it possible to launch the u3d animation only by pushing the "play
button" ?

To run the animation, you need to add some JavaScript or to associate
an 'Action' object with the U3D annotation.

You may want to use CosEdit utility ( to
examine the structure of the existing PDF documents that contain U3D
annotations that can run animations.

Using this approach we wound that adding the following dictionary to
3D stream dictionary solves the problem:

Obj* an_dict = doc.CreateIndirectDict();
u3d_data_dict->Put("AN", an_dict);
an_dict->Put("PC", new Number(-1));
an_dict->Put("Subtype", new Name("Linear"));
an_dict->Put("TM", new Number(1));
an_dict->Put("Type", new Name("3DAnimationStyle"));

"AN" key was not documented in the PDF reference 1.6 (possibly an
omission by Adobe).

C# or VB.NET code is almost the same (apart from minor syntax