Can I add views using the CameraRotate JavaScript?

Tony DeYoung – January 24, 2006

Was this tutorial useful to you?

Rating:

Log in to rate:
Print version of this tutorial

By default, the CameraRotate.js [JS: 16 KB] script overrides the camera movement and view management in Acrobat 3D. For example, if you activate the selected view from a button and move the object (with CameraRotate.js enabled), the view will return to the position set from the camera before the button is clicked.

If you want to save views you have to set the parameters yourself using the following examples:

//Example code (untested) 
//Add this to the cameraRotate.js 
//Angles should be in radians 
var CameraView1 = new CameraPosition(new Vector3(0,0,0), 0.7, 0, 10); 
//Add this code to a button 
var context = getAnnots3D(0)[0].context3D; 
context.CameraController.setCameraPos(CameraView1); 

Products covered:

Related topics:

Merge and combine files, Enhance PDF using JavaScript

Top Searches:

PDF, PDF Reader, PDF editor, PDF writer , Edit PDF, Create PDF, Interactive PDF, Action Wizard

2 comments

Patty Friesen

1, 2013-03-05 05, 2013

Hi Karl,

Can you post your question in the Answers Q&A forum and perhaps one of our experts can answer it for you:

http://answers.acrobatusers.com/

Thanks,

Patty

Karl

5, 2013-02-27 27, 2013

One mistake found: CameraController != cameraController

I tried it several times, but it doesn’t work.

Isn’t it just possible to “get” the “camera position” when you click on a button and then “set” the “camera position”?

Leave a reply:

Fields marked with * are required.

Download
Acrobat XI trial

Get the trial now

Get expert advice.

{/exp:ce_cache:it}