These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Disable swf file

Anonymous
Answered

Hi all

Is it easy to disable/hide a swf file using javascript.

I have a button that shows/enables it but there is no options to disable/hide it? Is this possible using the custom option in multimedia actions or does it have to be a javascript action.

If so, can anyone help me or give me advice please. The swf file is called banner.swf Any help is greatly appreciated:-)

My Product Information:
Acrobat Pro 9.3.1, Macintosh
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
use the activated property of the rich media annotation. To disable the first RMA on the current page:

getAnnotsRichMedia(pageNum)[0].activated = false;


If you know the internal name of the RMA, you can use getAnnotRichMedia(pageNum,"internal name")
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Hiding an RMA annotation, as well as other operations like resizing and moving them, were supposed to be part of the RMA from the beginning. But I think they fell off plate somewhere along the line. But that doesn't mean it can't be done. Look at the blog entry from Joel Geraci:

http://blogs.adobe.com/pdfdevjunkie/hide_and_show_rich_media_in_pd.php

Thom Parker
The source for PDF Scripting Info
[url=http://www.pdfScripting.com]pdfscripting.com[/url]

The Acrobat JavaScript Reference, Use it Early and Often
[url=http://www.adobe.com/devnet/acrobat/javascript.php]http://www.adobe.com/devnet/acrobat/javascript.php[/url]

Then most important JavaScript Development tool in Acrobat
[url=http://www.pdfscripting.com/public/34.cfm#JSIntro][b]The Console Window (Video tutorial)[/b][/url]
[url=http://www.acrobatusers.com/tutorials/2006/javascript_console][b]The Console Window(article)[/b][/url]

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

smitchell15 (not verified)
Thats brilliant thank you both, that worked a treat and sorted my problem :-) The link was very good too thank you again