3 Replies Latest reply on Nov 30, 2010 1:48 PM by George_Johnson

    Is there a way to use a statically defined appearance stream in a dynamically created annotation?

    greytooth

      Hello,

       

      I want to create a document with cascading 'popups'.  Not the built-in text-only popup, but an annotation containing an appearance stream that defines text and images.  I'm currently using widget annotations based on a pushbutton field.

       

      Each page in my document has many citations that refer to other pages in the document.  When a user hovers over the citation, I want a 'popup' to appear containing a depiction of the destination.  However, as the destination will itself have citations, I also want the 'popup' to contain citations that the user can hover over, triggering another popup, etc.  In this way, a user could navigate throughout the document without leaving the page or even clicking the mouse.

       

      Obviously, with even a modest number of citations per page, pre-calculating and statically defining all of these widgets causes a combinatorial explosion, making the document sluggish and very large.

       

      Instead, I'd like to statically define appearance streams once per document, and then dynamically create annotations and assign the appropriate appearance stream using JS as the user navigates.

       

      So far I've created a named AP in the names dictionary, but I haven't been able to use it to dynamically set an appearance stream of a dynamically created widget annotation.

       

      Also, I've called Doc.getIcon(), passing in the named AP, which returns an Icon object.  However, after field.buttonSetIcon() and passing in the named AP, the button does not display the icon.

       

      Is there a way to use a statically defined appearance stream in a dynamically created annotation?

       

      Thank you,

      Dave