4 Replies Latest reply on May 1, 2013 8:35 AM by KuddRoww

    Problems with document flowing after placing a movie inline

    KuddRoww Level 1

      I'm trying to place a movie inline and have the contents surrounding it reflow, instead when the movie is placed it overlaps all of the contents above it.

       

      I'm placing a movie using the following code:

       

      paragraph.insertionPoints[-1].place(File("c:\\users\\kurt\\desktop\\movie\\test.flv"));
      

       

      And this is the resulting behaviour:

      undesiredBehaviour.png

       

      The odd part is that when I tested this against blank templates I had these results, which are the result I was hoping for. The surrounding paragraphs simply reflow to accomodate the movie.

       

      desiredBehaviour.pngdesiredBehaviour2.png

       

      Any ideas on why the other document isn't reflowing to the placed movie?

        • 1. Re: Problems with document flowing after placing a movie inline
          [Jongware] Most Valuable Participant

          This is not related to you placing a movie; the same would happen if you place an image, or even an empty rectangle.

           

          Your existing text has a fixed leading, and your default text setting must be set to use Auto leading.

           

          Do you really need to place your movies in-line inside a paragraph? I would think it looks better when you place it in a paragrpah of its own (with the advantage that you can set the leading to Auto for that paragraph only).

          1 person found this helpful
          • 2. Re: Problems with document flowing after placing a movie inline
            Trevorׅ Adobe Community Professional

            Yep as Jongware said it's not Movie issue.

            It's a wordwrap issue.  You can see that simply by drawing a rectangle then do cut and pasted to make it an inline object.

            If you want to place as an inline and as Jongware said, what for? you can place it an change the vertical offset according to the dimensions of the movie.

            Using the format of - myAnchoredObject.anchoredObjectSettings.anchorYoffset = 50;

            • 3. Re: Problems with document flowing after placing a movie inline
              Trevorׅ Adobe Community Professional

              Just to make it a bit easier to refer to anchored object you could probably use

              paragraph.insertionPoints[-1].words[0].allPageItems[0].anchoredObjectSettings.anchorYoffset = 10;
              

              Not the best but unlikely to fail and easy.

               

              If you were inserting an oval or the like you would just use.

               

              myOval = paragraph.insertionPoints[-1].ovals.add();
              myOval.anchoredObjectSettings.anchorYoffset = 10;
              

               

              but you can't do that with placed images

              • 4. Re: Problems with document flowing after placing a movie inline
                KuddRoww Level 1

                What I ended up doing was placing the object in its own paragraph, as suggest by Jongware (originally I placed it in a paragraph cause I hadn't strategized a way to reference "between" the two paragraphs, and the 'index' property took care of those concerns).

                 

                To fix my problem I simply anchored the objects using the anchor method, which is essentially the solution recommended. I like the proposed method more because rather than assign a broad stroke of values to the anchoredObject I could get the desired behaviour with a single setting.

                 

                Thanks