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

Play-Stop-Rewind Buttons

PDF Creative
Registered: Aug 23 2009
Posts: 29
Answered

Hi, I'm trying to find a tutorial on how to embed buttons to control an audio file in a PDF (not streaming, an embeded audio file). Or can someone walk me through it please. I know how to make an mp3 play using javascript, but how do you make the file stop and rewind? Effectively, I'd like to create a jukebox mp3 player which can control a number of files. I have the button graphics, I just need to know how to do it with javascript in a PDF.

The included Flash mp3 player is a great inclusion in Acrobat 9 but it doesn't look great.

It is possible to make a Flash mp3 player of sorts in Adobe Captivate, by leaving the main movie area blank and just control an audio file in the Captivate Flash movie, but the sizing is awkward.

Thanks in advance.

If the web revolutionsied business and entertainment, the PDF is revolutionising "the document"

My Product Information:
Acrobat Pro Extended 9.1.3, Windows
PDF Creative
Registered: Aug 23 2009
Posts: 29
Do any Javascript experts have any idea?

If the web revolutionsied business and entertainment, the PDF is revolutionising "the document"

PDF Creative
Registered: Aug 23 2009
Posts: 29
Can anyone offer any help please.
Many thanks.

If the web revolutionsied business and entertainment, the PDF is revolutionising "the document"

daka630
Expert
Registered: Mar 1 2007
Posts: 1420
Have you read Jeff Freeman's article?
[url]http://www.adobe.com/devnet/captivate/articles/movieclip_to_pdf.php[/url]

and Bill McCoy's associated blog article?
[url]http://blogs.adobe.com/billmccoy/2008/02/how_to_add_flas.php[/url]

If not already done, it may be worth a browse of Bob Connolley's sites.
[url]http://www.pdfpictures.com[/url]

He showcases the book he has authored about his work at this site:
[url]http://www.dynamicmediabook.com/[/url]

I've used Jeff Freeman's article and been pleased with the results.

Have not done this, but it occurs to me that with Acrobat 9 and a Cp4 Aggregator Project one might be able to use Acrobat 9 Portfolios to good effect on something like what you describe. Or, individual PDFs containing Cp orchastrated by the Portfolio.

Alternatively, something interesting might be done with Acrobat 8 and Cp3 in an Acrobat Package.

Be well...

Be well...

PDF Creative
Registered: Aug 23 2009
Posts: 29
Thanks very much daka630. You can't get enough basic background on making interactive PDFs! It's all good stuff. But we should try to remain on-topic in this forum - it's the Javascript sub-forum.

I wonder if anyone can help with the Javascript actions to make an audio file play, stop, and rewind in a PDF.

Thanks in advance, I would really appreciate the knowledge.

If the web revolutionsied business and entertainment, the PDF is revolutionising "the document"

PDF Creative
Registered: Aug 23 2009
Posts: 29
Aha, found it! When you create legacy multimedia content and then create a button for it, the Javascript is there to find quite easily to control the audio file .. my grateful thanks to the wonderful work of Lynda.Com :)

If the web revolutionsied business and entertainment, the PDF is revolutionising "the document"

WesAtScottsdale
Registered: Dec 21 2009
Posts: 16
I'm looking to do something similar. Can you post any code samples?

Wes

PDF Creative
Registered: Aug 23 2009
Posts: 29
I explained how I found it, why don't you read my post again and try it yourself.

If the web revolutionsied business and entertainment, the PDF is revolutionising "the document"

WesAtScottsdale
Registered: Dec 21 2009
Posts: 16
I read your post and didn't find it particularly helpful:
"When you create legacy multimedia content and then create a button for it, the Javascript is there to find quite easily to control the audio file .. my grateful thanks to the wonderful work of Lynda.Com"

Does this mean the Javascript was found on Lynda.com, Adobe's Javascript reference guide or you came across it somewhere else when creating a button?

I just started researching this today so I'm sure I'll find it eventually, but I was hoping I wouldn't have to start from scratch. If you have the code to do this, please paste it here for others to make use of.

Thanks,
Wes

Wes

PDF Creative
Registered: Aug 23 2009
Posts: 29
OK, let me explain how to create legacy multimedia content. This is for Acrobat 9, I don't know if it was different in previous versions.

* Select the Sound Tool... create a small rectangle... release the mouse.
* A small 'insert sound' popup will appear.
* Look to the bottom-right of the window, and you'll see a blue clickable link entitled "create legacy multimedia content".
* Click the link and browse for Acrobat 5 or Acrobat 6 compatible media.
* If you right-click on the area where you created the rectangle, and choose Properties, you will see options for Javascript, and also if you click to Edit Rendition, you'll be able to embed a media player, 'show in document' etc.

Basically, legacy refers to audio and video formats that you could embed into PDFs BEFORE Flash.

I ended up doing this with Flash.

I asked in several forums and I am amazed at how, either, people who do have knowledge of javascrtipt in PDFs cannot be bothered to help, or in fact, hardly anybody has any knowledge about it. My guess there are folks out there who would know how to do it but because they can't see a use for media players in PDFs they can't get interested in explaining how to do it. I think those people do not have the right to waltz around proudly with their "expert" badge in forums like these, they are farcical.

Lynda.com are producers of excellent tutorials. Can't remember exactly which one has info about this, sorry.

If the web revolutionsied business and entertainment, the PDF is revolutionising "the document"