-
1. Re: RichMediaExecute actions not working with 3D content
Dave Merchant Jan 30, 2013 4:45 AM (in response to A. Grahn)Your URL isn't working - server not found.
"Rich-Media-Execute" is a pathway between the Acrobat API and an Actionscript function exposed by the SWF running inside a conventional Rich Media annotation. It cannot call JavaScript within a 3D annotation.
-
2. Re: RichMediaExecute actions not working with 3D content
A. Grahn Jan 30, 2013 7:13 AM (in response to Dave Merchant)Dave Merchant wrote:
Your URL isn't working - server not found.
Hopefully this one works:
ftp://ftp.hzdr.de/pub/incoming/grahn/malteex.pdf
Dave Merchant wrote:
"Rich-Media-Execute" is a pathway between the Acrobat API and an Actionscript function exposed by the SWF running inside a conventional Rich Media annotation. It cannot call JavaScript within a 3D annotation.
It should work for both, ActionScript and JavaScript, according to
http://www.adobe.com/content/dam/Adobe/en/devnet/acrobat/pdfs/adobe_supplement_iso32000.pd f
Here is a quote from Table 8.48b, `Entries in a RichMediaCommand dictionary', the /C entry:
(Required; ExtensionLevel 3) A text string specifying the
script command (a primitive ActionScript or JavaScript
function name).
If the target instance (specified by the TI key in the
parent rich-media-execute action dictionary) is Flash
content, the command string represents an ActionScript
ExternalInterface call to the script engine context
specific to the target instance. If the target instance is a
3D model, the call is made in the global context of the
annotation’s instance of the 3D JavaScript engine.
-
3. Re: RichMediaExecute actions not working with 3D content
Dave Merchant Jan 30, 2013 4:12 PM (in response to A. Grahn)You're misreading the standard - sorry that section isn't worded very clearly, but such is the nature of a document written by committee
There are three types of 'multimedia' annotation in the ISO standard, but only two of them are genuine 'rich media' annotations:
- Annot type /3D as defined in the ISO base spec is your run-of-the-mill 3D scene with a JavaScript engine and a model; nothing else. It is not considered to be a 'rich media annotation' by Adobe.
- Annot type /RichMedia subtype /RichMedia as defined in the ISO EL3 spec is a SWF file with some bundled assets and is run inside an instance of Flash Player, without any JavaScript API whatsoever.
- Annot type /RichMedia subtype /3D as defined in the ISO EL3 spec is a 3D annotation which has one or more SWF files attached to the Resources table, e.g. to display on a material or as a viewport foreground/background element. It has both the 3D JavaScript API and an instance of Flash Player running within the scene.
Taking the para:
If the target instance (specified by the TI key in the parent rich-media-execute action dictionary) is Flash content, the command string represents an ActionScript ExternalInterface call to the script engine context specific to the target instance. If the target instance is a 3D model, the call is made in the global context of the annotation’s instance of the 3D JavaScript engine
What it actually means in terms of Adobe's implementation is:
If the TI key points to a RichMedia annotation of subtype /RichMedia (i.e. an embedded SWF file) the command defined by the /CMD dictionary is sent as an ActionScript ExternalInterface call to the Flash Player instance running that annotation, and the return path for any such function is within the context of the Document object (the currently-active PDF file). If the TI points to a Rich Media annotation of subtype /3D, the command defined by the /CMD dictionary is sent as an ActionScript ExternalInterface call to the Flash Player instance running inside that 3D scene, and will be listened to by any SWF file loaded into the 3D scene which has declared such a function to ExternalInterface.
In both cases the function name being called is always ActionScript, in a loaded SWF file; it's not JavaScript. The ISO standard's reference to the script engine context is talking about the parent API in which Flash Player is executing - i.e. is the SWF loaded into the document ('this') or into the 3D engine ('context3D').
Here is an example PDF showing how the RichMediaExecute action works.
-
4. Re: RichMediaExecute actions not working with 3D content
A. Grahn Jan 31, 2013 12:43 AM (in response to Dave Merchant)Objection, your honour,
The first sentence in the /C key description clearly states that the command may be a JavaScript function name...
JavaScript sent to a FlashPlayer instance???
Sending a JavaScript command to the 3D instance of a RMA should be possible, according to this first very sentence in the /C key description. Alas, it is either bugged in Reader/Acrobat or simply wasn't implemented.
Thanks for the example file.
The RichMediaExecute action therein is not targeted at a specific 3d or Flash instance but to the RMA as a whole, because the /TI entry is absent. The command (name of an ActioScript function exposed by the Flash file bound to a material) is therefore sent to all instantiated entities (be it Flash or 3D) of the RMA specified by the /TA entry. It will finally be executed by the running Flash file, because it is the only one to understand the command name.
-
5. Re: RichMediaExecute actions not working with 3D content
Dave Merchant Jan 31, 2013 3:26 AM (in response to A. Grahn)The EL3 and EL5 specs are a little more relaxed about what could be implemented, compared with what the Acrobat Family actually does. The whole RMA system is in effect proprietary thanks to the involvement of Flash Player, so there are inevitable caveats to allow for something else to come along (e.g. in the future we may have HTML5+JS in place of the SWF content).
While I agree the wording of the current EL3 spec suggests that the /C string is declared to the JSAPI as well, in practice it's not, and never has been. I don't see that ever changing but feel free to send a feature request.
A. Grahn wrote:
The first sentence in the /C key description clearly states that the command may be a JavaScript function name...
JavaScript sent to a FlashPlayer instance???



