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

deleting/replacing flash video completely

melanie333
Registered: Apr 14 2010
Posts: 25
Answered

Hi!
Here is my problem. I have 26 videos that I am working with as I design a large interactive pdf. there are hundreds of links involved- including 'seek to time' in the videos (over 300 links there alone). So- then my clients call and say- Wait we made a minor change in these four videos. Yikes! So when I delete the old video and add the new one- the old video still remains somewhere. The reason I know this is because the PDF file size stays the same once I delete the old video and save. Where did it go? I cant find it anywhere- yet it is somewhere- taking up my precious space as I am trying to keep this below 4GB. This is before I even replace it with the new video. How do I delete a video completely- and the memory it takes up too? It would be a great bonus if the links would remain hot after I replace the video.
Thank You!
Melanie

My Product Information:
Acrobat Pro 9.0
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
You're going to regret asking, but the answer is that if there are links targeting a rich media annotation (RMA) using the "multimedia operation (acrobat 9)" methods, you can't delete the annotation's embedded video from the PDF stream. The RMA wrapper itself vanishes from the page and the PDF structure tree, but the video file remains as an embedded object, and no amount of hitting it with a stick will get rid of it.

The reason is obscure (to do with the need for a MMO9 link to have an end-point) and I'm working on it, but for now the only solution if you've used multimedia actions in your links is to delete the RMA [u]and[/u] all the links targeting the RMA, at which point the embedded FLV file is magically removed.

To get round this problem, [i]do not use the multimedia operations in the link actions panel[/i] - instead use "run a Javascript" and manually target the RMA using ActionScript. That way, Acrobat has no idea what the end point is, and won't insist on keeping the RMA in the stream.

For example if you have a link which should seek to the 10 second point in the first video on the current page, set the action to "run a Javascript" and in the editor, type this one line:

[b]getAnnotsRichMedia(pageNum)[0].callAS("multimedia_seek",10);[/b]

For the other operations, see the Acrobat 9 SDK.


If all the links use this JS action, you can delete the video and replace it with something else, and the links will keep working. The only thing to watch is if you've got more than one RMA on a page, you need to put the correct number in the square brackets, and you may need to play about to find what the number should be (it'll change if you replace one on a page with others present, as the array is in "date drawn" order, not position in the flow).
melanie333
Registered: Apr 14 2010
Posts: 25
Wow!! This is perfect!! Luckily I just have one video per page. I will give this a try! THANK YOU!!!!
Melanie
melanie333
Registered: Apr 14 2010
Posts: 25
ok- I just tried it and it did not work. I added a video. Clicked on the link too. Custom link, actions, run java script, added your script. the video did not play. i left your link as is, but I am assuming I can add a page number where you put 0 and also a different amount of seconds (rather then 10). I tried using yours and adding my own numbers and the video did not play. what am I doing wrong?
UVSAR
Expert
Registered: Oct 29 2008
Posts: 1357
The [0] in the line of code refers to the number of the RMA on the page (starting from zero) and the variable "pageNum" is an internal Acrobat function that returns the current page, again counting from zero, so the example means

"target the first rich media annotation on the current page, and seek to 10 seconds"

To specify the 5th annotation on page 50 and seek to 20 seconds, bearing in mind the zero-start rule, you would enter

[b]getAnnotsRichMedia(49)[4].callAS("multimedia_seek",20);[/b]


Assuming there's only one RMA on each page, and the links are on the same page as the RMA they are targeting, the example code in my earlier post will work without any changes. (assuming of course you've got JavaScript turned on in Acrobat's general preferences!)