1 Reply Latest reply on Mar 14, 2012 1:00 AM by Michiel Koers

    [CS5][JSX] How to place a video from an URL

    Michiel Koers

      Hey everyone,

       

      I found some great help in this forum in the past, so I hope someone can help me again this time.

       

      I'm using Indesign CS5 on a mac. I write in Javascript.

      What i try to do is dynamically placing a video from a URL.

      I thought I could do this by adding a rectangle, then in the rectangle place a movie and finally add the URL to it.

      This does not work. I'm lost at how to proceed.

       

      Here is the code that i hoped would do the trick (just the relevant lines from a bigger script)

       

      var myDocument = app.documents.item(0);

      var myPage = myDocument.pages.item(0);

       

      frameVideo = myPage.rectangles.add({geometricBounds:[0, 0, 144, 144]});

      onlineVideo = frameVideo.movies.add();

      onlineVideo.url= "http://www.meffect.nl/rocvideo/91870.mp4";

       

      When i run this script I don't get any errors, but the video in the URL is not loaded.

      Should I use something like

      onlineVideo= frameVideo.place(URL("http://www.meffect.nl/rocvideo/91870.mp4"));

      This doesn't work either!

      I hope this is possible at all... I think it is, since you can do it manually in InDesign too.

       

      Thanks guys,

      Michiel