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

How can I create a slider?

flaschen_post
Registered: Aug 17 2009
Posts: 10

Hi,

I'm creating 3D Pdfs with generated animations via JavaScript. One of my goals is to control the animations with a slider. So far I wasn't able to create a satisfying solution.

I tried to use a field button as slider button and change its location on a mouse down event. A function for setting the new position is called by an interval. The interval should be running as long as the mouse is pressed. As far as I can tell due to the event handling of Acrobat, the function for position change is only called once and all ongoing operations are stopped while keeping the mouse button down.

I'm not sure if I'm on the right track with using a field button to create a slider. Maybe there is an easier and more elegant way.

Does anybody have an idea how I could create a slider?

My Product Information:
Acrobat Pro Extended 9.1.3, Windows
johnsons
Registered: Aug 17 2009
Posts: 1
hi..i too dont have an idea on this..iam looking for an answer on this..can anybody help on this..


[url=http://site.com/]anchor[/url]
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
As a matter of fact, starting with Acrobat 9 there is a way to create sliders and other alternate and advanced controls for a PDF by using the Rich Media (or Flash) Annotation. Here's an article on creating buttons, which provides the basics for doing this.

http://www.acrobatusers.com/tutorials/2008/08/js_flash_buttons

I've created sliders and other kinds of controls and even gave a presentation on this at both the PDF Central Conference and the Adobe MAX last year. The old PDF Central Conference page is gone, but the old MAX info, including the notes and examples from my presentation are still there. The flash sliders in my example can be copied and pasted into your own PDFs. Joel Geraci's Blog also has lots of good info about this topic.

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

But unfortunately, while it seems like a great thing, using flash controls in a PDF is not ready for prime time. There are several bugs and short comings in the Rich Media Annot implimentation. If you are going to put a flash annot on a PDF it has to be the only interactive element on the page. It can't be used with any other form fields. Maybe one day Adobe will fix the problems, but for now I'd suggest forgetting the idea.


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

flaschen_post
Registered: Aug 17 2009
Posts: 10
Hi,

Thanks for the quick response. I added a slider via swf and so far everything is working - although I have other interactive elements. I'm concerned about the bugs you mentioned. What kind of errors could occur?
scottamber
Registered: Aug 26 2009
Posts: 1
In IE6, the second link is light grey and the first link is black like all of the rest of the text.
Both links are made the same and I couldn't figure out why they were showing up as different colors.

Regards..




Scott....


[url=http://www.realestateprovoutah.com]Provo Real Estate[/url] | [url=http://ww.buddylodge.com]best hotels bangkok[/url] | [url=http://www.computermateinc.com]medical billing practice management software[/url] | [url=http://www.fightsexualharassment.com/]employee rights ca[/url]
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
I've created several different forms using Flash annotations as extra controls, like the sliders. In some cases the regular PDF fields are redrawn correctly and in some cases they are not. Sometimes, when the Flash Annotation is given the keyboard focus the regular PDF fields will disappear and will not be redrawn until something forces a redraw. Such as clicking on a field, or changing the view. I do not know what the difference is between forms that work and forms that don't. But I am pretty sure that it's some little quirk burried deep in the Acrobat code that's the problem. Probably related to bad programming practices. At one time I prepared a lot of material, including tutorials and even an SDK to make integrating Flash with PDF JavaScript much easier. But I haven't published because of the unreliability of it all. It's a real bummer and I do not recomend using Flash controls in PDF.

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

flaschen_post
Registered: Aug 17 2009
Posts: 10
So far I was able to integrate Flash sliders into my PDF via IAC. There were quite some problems that I had to deal with, especially with the richmedia array. That also includes my 3D annot. One out of 10 times Acrobat isn't able to set the rect for my 3D annot. So far I wasn't able to figure out what causes the problem exactly. With the release of the ComObjects I was able to reduce the occurrence of the error. So I think it has something to do with the IAC and VB.
Due to my requirements I can live with the errors in my VB application. But I wouldn't recommend interacting with richmedia via IAC if the application is used regularly and by less experienced users.

Miriam