[an error occurred while processing this directive]

Previous | Home | Next

Sep 2, 2008

Setting the Size of the Rich Media Floating Window

Skip down to here if you read my last post

The Basics of SWF in PDF
One of the great new features of Adobe Acrobat 9 Pro and Pro Extended is the ability to add interactive SWF content developed in Flash or Flex. SWF files can be placed in a PDF using the new Flash Tool in Acrobat 9 and play using the built in Acrobat 9 Flash Player rather than the external one that your browser and desktop use. The built-in player provides greater security and consistency for SWF playback inside any PDF with that type of content. For those of you that attempted to use SWF in earlier versions of Acrobat, you remember that the user experience wasn’t all that great. Acrobat 9 provides tight integration between the PDF document and SWF as well as other content types that run in the Flash Player such as FLV and H.264 encoded video.

Read “Add multimedia files to a PDF” to learn how to add SWF content to PDF files using the new Rich Media Annotation rather than the legacy multimedia object.

Setting the Size of the Rich Media Floating Window
In addition to the built-in Flash player providing greater security and consistency for SWF playback, it also has built in functions that take advantage of features found only in Acrobat and Reader. The remainder of this article discusses how to control the size of the window when your SWF is not playing on the page.

The built in function "multimedia_setWidgetViewSize" can be used to respond to different states or layouts of your SWF application. The parameters are pretty simple; width and height. Unfortunately, you cannot control the initial location of the window. See the example PDF below and sample MXML file.

Example PDF

Sample Flex Application

permalink.gif Comments (1) Bookmark and Share


Comments

Thank you for a helpful example.

I have a swf file created in Flex running in a PDF which opens in a floating window when clicked.

I can get the floating window to close by allowing "Disable Content" in the context window, but I'm trying to achieve the same effect when an "OK" button is clicked in the swf file. This button calls a function in the PDF and should ideally then close the floating window.

Any idea how to do this?

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)