Handling 3d objects using JavaScript for Acrobat 3D Annotations API

I am trying to learn how to handle 3d objects with this manual: http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/js_3d_api_reference.pdf
When I execute some code, for example,
myTimeHandler= new TimeEventHandler();
myTimeHandler.onEvent= function( event )
console.print( "Current simulation time is:" + event.time );
console.print( " second(s)" );
runtime.addEventHandler( myTimeHandler );
I get an error like this:
TimeEventHandler is not defined
Why?
P.S. I have 3d object in the document, and can get it with function getAnnots3D.

You have to run the code in the context of the 3D annotation (by attaching the script to the annotation's properties panel, or by right-clicking the active 3D scene and choosing "run a javascript". You cannot run it in the console.

Similar Messages

  • Creating folders in Javascript for Acrobat

    I cannot find a method for creating a folder in Javascript for Acrobat.  I know how to do it in InDesign but the same object (i.e. the folder object) does not seem to be available for Acrobat. 
    I have a multi-page PDF in a folder.  I want to create a subordinate folder in the same folder as the PDF and then extract all pages to the subordinate folder in the folder holding the PDF.  How do I do  that?
    In other words:
    MyFolder/MyMultiPagePDF.PDF
    I create
    MyFolder/Extracted/
    and then I create
    MyFolder/Extracted/PDFPage1.PDF
    MyFolder/Extracted/PDFPage2.PDF
    MyFolder/Extracted/PDFPage3.PDF
    etc.
    I know how to do the extraction, but I do not know how to create the folder on the fly using Javascript.
    Please help, anyone.
    R,
    John

    Thank you, Mr. Johnson.  I appreciate your candor and your quick response.
    R,
    John

  • What's a browser compability of JavaScript for Acrobat ?

    I have a pdf with two fields that needs to be filled by user.
    I am using a Javascript for Acrobat to display a prompt dialog asking user to enter a data. it works pefectly fine on my local computer, but whenever I open it using various browsers I am running into different problems:
    Firefox:  20.0.0 No prompt dialog is showing up. Error (warning) message in developer's console: [09:49:17.064] Warning: TODO: unimplemented annotation type: FreeText
    Safari: 6.0.4 Certificate is displayed sideways. No prompt dialog is showing up. No errors in the developer's console.
    Chrome  26.0.1410.65  : works fine!
    Opera  12.15 nothing shows up, no pdf, warning or anything else.
    So it doesn't work on 3 out of 4 browsers that I checked.
    My pdf is embedded into the following file.
    http://uwf.edu/cde/mobileweb/certificate.cfm
    Is there a way to make it work on those browsers?

    Each of these browsers has its own PDF viewer. Some of them can optionally be set up, by the end user, to use Adobe Reader instead.
    (Don't overlook Windows 8 IE10, which defaults to running Windows 8 Reader.)
    And don't overlook the mobile browsers on iPad, iPhone, Android...
    Now each piece of software works, or doesn't, according to the designs and errors of their own developers. It would be a useful and helpful project if someone compared whether these viewers support interactive forms, and JavaScript, and if so what part works... but I have never seen the results of such a project. There are other pitfalls: Mac Preview, and hence Mac Safari, will fill a form but return a form which appears blank.
    You might try insisting that your users use Adobe Reader.

  • How to validate an text field item using javascript for numbers only.

    hi,
    how to validate an text field item using javascript for numbers only.please help me on this urgent
    please mail me solun if posible on [email protected]

    Hi,
    Page HTML header
    <script>
    function onlyNum(evt) {
      // Usage: onKeyPress="return onlyNum(event)"
      evt = (evt) ? evt : window.event;
      var charCode = (evt.which) ? evt.which : evt.keyCode;
      if (charCode > 31 && (charCode < 48 || charCode > 57)) {
        var status = 'This field accepts numbers only!';
        alert(status);
        return false;
      var status = '';
      return true;
    </script>Item HTML Form Element Attributes
    onKeyPress="return onlyNum(event)"Br,Jari

  • Returning a SharePoint 2013 termset in a tree structure using JavaScript for MultiLingual

    Hi,
    How do we get the path of term,if my term label is in some other locale, lets say for Spanish but using currentTerm.get_pathOfTerm() property it returns default path of my term store, i.e English.
    But i need the path to use my values returned in Spanish ???
    Do we have any idea how to achieve this. ??
    Regards,
    Avinash

    Hi,
    According to your post, my understanding is that you want to get term path using JavaScript for MultiLingual.
    Per my knowledge,
    SP.Taxonomy.Term.pathOfTerm property (sp.taxonomy) gets the path for this
    Term in the
    TermStore default language.
    To get path for MultiLingual, I recommend that you can use
    Term.GetPath method (Int32) which
    gets the path for the current
    Term in the specified lcid.
    If the lcid is not a valid TermStore language, then the default language is used.
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • How to hide/disable menu items using Javascript in Acrobat 9 pro or later

    We just wanted to know on how to hide/disable menu items for e.g. 'Open' menu item under 'File' menu in Acrobat 9 or later on Mac using Javascript. It would be useful if you could provide if any other option is in place already.

    Not sure it will work, but you can try using the app.hideMenuItem() method. See reference here.

  • Using Javascript With Acrobat Forms

    Hello,
    I have been attempting to use Javascript with forms made using Acrobat X Pro. Particularly, I am attempting to use the Font palette with Text fields as described in http://partners.adobe.com/public/developer/en/tips/CalcScripts.pdf .
    One example of this is the Strikethrough property.  TextField1.caption.font.lineThrough = "linethrough" and TextField1.font.lineThrough = "linethrough". I see that "linethrough" is an enumeration (Having values of 0,1, and 2). But I have tried this numerous times, in various ways, and it does not work. I also tried other Font properties and could not get them to work. Is there more setup to this? I am still very much new to developing Forms, and it was frustrating for me to not find a resource that outlined all of the stuff you could do with Forms. My only prior experience with Javascript is for web pages. The pdf I mentioned above seemed promising, but I'm having trouble implementing it.
    I appreciate any help for this!

    For questions about LiveCycle Designer use the forum LiveCycle Designer.

  • Using JavaScript with Acrobat XI Standard

    I am part of a transition team setting up a new correctional facility. I am working with our IT dept to purchase licenses for Acrobat XI. I need to get a definitive answer on using JavaScript with XI standard. The forms I am working with have a variety of scripts mostly button activated. Actions include saving and renaming files to a networked drive. Money is always an issue so if I can use XI standard that would be the better financial choice. The documents will not be created using XI standard just processed.

    This is the Reader forum; the Acrobat one is here:
    http://forums.adobe.com/community/acrobat

  • Javascript for Acrobat XI

    Hello everyone.
    Using the creative cloud I just upgraded from Acrobat 8 to Acronbat XI.  I cannot find the Javascript documentation for that version of Acrobat, nor can I find the SDK for that version of Acrobat.   I was able to find the Acrobat 8.0 Javascript documentation, but that's about the latest I can find.  Is that the latest version?
    TIA!
    John

    Here is the link to the documentation for Acrobat JavaScript versions 8 on.
    Here is the link to MDN JavaScript documentation and other resources. JavaScript Guide & JavaScript Reference.
    The material in the Acrobat SDK is not dynamic while the Acrobat JavaScript for version 9 and version X are both dynamic and can easily be updated by Adobe.

  • How to use  Javascript for anchors as I cant get it to work at all?

    I am currently trying to build my own web site using iweb 08. I am a total newby so this question is for anyone who knows about javascript, particularly Cyclosaurus. I have tried in vain to use Cyclosaurus's javascript for anchors in my FAQ's page via html snippet. I must be doing something wrong, so can you help?
    1). I copied and pasted the javascript anchors code into a html snippet
    2). I changed the, anchors.push(3146) to no's 1, 2 and so on for each question
    3). I then changed 'change this to your page' to faq's
    4). I don't understand anything else from this point so please can you help to rectify my total incompetence and explain it in detail.
    This is what i have tried to do.... anchors.push(1);//faq's. followed by my question? y position
    Is this correct or have I gone totally wrong
    Please help
    Many Thanks

    I have finally published my site and yes Cyclosaurus anchors javascript worked great. It won't work when you are working on your site pages, not until you publish your site.
    Follow Cyclosaurus instructions above, it was after where I got stuck. So this is for the many people who need very clear instructions from start to finish. Otherwise you can spend countless hours scrolling through these forums. Here is what you have to do next:
    Each question must be numbered. So your first question would be numbered "1" and so on. Highlight your question at the top of your page. Open inspector and go into hyperlink
    Tick enable hyperlink box and select link to an external page. Delete everything but http:// and type in #1
    Repeat this for each question - next question would be #2 and so on
    Remember to hyper link all your "back to top" or "Top" as #0
    That's it, your good to go to go
    Thanks again to everyone

  • Tabbing with in textbox using javascript for html

    Assume a default date (mm/dd/yyyy)with in a textbox. On getting the focus to the textbox the focus should be on mm(should be highlighted), when it is replaced by a month, it should automatically focus on the date dd, when dd is replace it should get to yyyy. How to achieve this using javascript.

    Javascript != Javago ask on a Javascript forum.

  • Acrobat XI annots.api error

    I've been running Acrobat XI Standard for a few months. Just today it started giving me an error on startup of the plug_ins\Annots.api is either not designed to run on Windows or it contains an error.
    How can I fix this please?
    Thanks.

    Thank you for that suggestion. I did not know about the REPAIR option.
    I ended fixing the problem with the latest update. I had to download it manually, even though I had the options set to automatically update and assumed I had the latest update.
    Best regards.

  • Get location/coordinates for a field using JavaScript in Acrobat Professional

    Good day,
    I am looking for a way to get the coordinates of a text field.
    I would like to create a listbox and set the location of the listbox top left to the text fields bottom left coordinates, I have had a look at the scripting guides ... could not turn up anything.
    I know how to create and populate this listbox using the JavaScript code, only problem is, to get the coordinates of the text box.

    Try this:
    1. Move or change the dimensions of the text boxes on the extracted page in the configuration that you want.
    2. When you are satisfied with the new configuration, modify the following JavaScript to use the names of the text boxes that you want to include on the page.
    //find_rect //find coordinates of text boxes whose names are included in the var rct,ary = ["fld_1","fld_2","fld_3","fld_4"]; //...etc.
    for (j = 0; j<ary.length; j++){
    console.println(ary[j]);
    rct = this.getField(ary[j]).rect;
    for (i= 0; i< rct.length; i++) console.println(rct[i]);
    3. Add the modified code to the document level of form. (as a doc level javascript but with no function name or brackets included.
    4. When you run the code, the coordinates for the fields that you have included in the array will be printed in the console window:
    Example:
    fld_1
    21
    777
    296
    717
    fld_2
    30
    769
    65
    729

  • Is it possible to handle multiple events using Jscript for a button in Apex

    Hi,
    I've application wherein in one of the pages for a button, I need to trigger 2 events as: 1. redirect to a new page upon 'click' of the button
    2. display a set of values on 'mouse over' that button.
    I'm able to handle both separately, but not in one button. I would like to know if there is any limitation in Apex that we cant handle multiple events? Currently I've put a text item near the button, and called the Jscript for mouse over event in that as a temporary workaround. Can someone let me know if this is feasible? If not any other alternative to handle this?
    Thanks in advance,
    gsachidh

    Hi Gsachidh,
    well interesting problem you're facinng. Indeed, it can't be specified using the 'Button Attributes' So we have to come up with an workaround.
    A quick en dirty solution would be to specify it with the 'Optional URL Redirect options'. In a normal button, with processing on same page, this would be 'no target'. but in case of additional things to be done this can be used, using an target URL. I used this many times, in example with popUp windows for refreshing the caller object when changes are made. In your case we have to add next to the href an onmouseover event. this can be done with;
    Target set to => URL
    URL - target => javascript:doSubmit('<button_name>');" onMouseOver="javascript:showTooltip('tooltip');"
    Here the " is the key, letting ApEx know the target (href) is doSubmit('<button_name>'), just like when no target would be specified and adding a new javascript event; onMouseOver.
    Although this is a dirty solution in my opinion, it is the best i could come up with. I have another idea in how to do this, that is by adding this event dynamically with javascript with an addEvent. But i don't have an example at the moment for this scenario.
    Simon
    Message was edited by:
    S1M0N

  • Capture onclick event on flash object using javascript

    May the admins forgive me if this is in the wrong forum.
    How to capture the onclick event on a web page when the click
    happens on an embedded flash object?
    You can't. At least not in IE. For some arcane reason either
    microsofts developers or the flash guys decided to overrule the DOM
    in IE.
    So the onclick event is never fired, in any browsers, when
    the user clicks an embedded flash object like this:
    However there's a workaround. Add the wmode="transparent"
    parameter. This make the onclick event okay in Firefox, but still
    not IE - where the flash movie is transparent the click event
    fires, but only those places.
    Instead use the onmousedown and onmouseup events which fires
    anywhere on the flash.

    >
    I tried each of the following in the the Element HTML Form Element Attributes for the File Browse item:
    onClick=javascript:alert(this.value);
    onClick=javascript:popupURL('http://www.google.com');
    onFocus=javascript:alert(this.value);
    onChange=javascript:alert(this.value);And what happened?
    [A few points on good practice:
    1. In the XHTML normally used in APEX 4.0 mark-up, all XHTML, including attribute/event handler names, should be in lower case: <tt>onclick</tt>, <tt>onfocus</tt>, <tt>onchange</tt>...
    2. Attribute values should always be quoted.
    3. The <a href="http://crisp.tweakblogs.net/blog/313/the-useless-javascript-pseudo-protocol.html">"javascript:" pseudo-protocol is evil</a>. There are a few places in APEX where we may have to resort to using it as URL is all we're offered to work with, but it's always better to use an event handler of some kind, either inline or (better) registered dynamically at runtime following the principles of <a href="http://en.wikipedia.org/wiki/Unobtrusive_JavaScript">unobtrusive JavaScript</a>. +It absolutely should not be used in inline event handlers.+
    So:
    {code}
    onclick="alert(this.value);"
    etc

Maybe you are looking for

  • Error while running program FAGL_DR_PROVISION

    HI Experts, Need Your help regarding below error while posting Bad debt reserve through program FAGL_DR_PROVISION. 704 Tax code in procedure TAXSG is invalid Message no. BL001 Regards Chandra

  • How to activate new pricing procedure for old Pur Document

    Dear all, we have added some condition type  in our pricing procedure,every thing is ok but my question is this new condition added in pricing procedure are not reflecting in previously created purchasing document/po, how can we do it I kw that if we

  • Diffeence b/w thin and thick driver

    diffeence b/w thin and thick driver

  • Portal performance report

    Hi Portal GURUs, We have configured Portal Activity Reports for monitoring hits but we required to monitor Portal Performance. Please suggest me if there is any in built features to get these reports? Regards Kiran

  • System is ignoring a existing PR in MRP

    Hi all, I'm facing a problem here when executing MRP. System is ignoring a existing PR for a material and generating a new planned order... When checking the status in MD04 I can see the old PR with exception 07... My problem is that this PR is old b