callback="plusone_vote"

Moving objects around a form

Posted in: - Nov 15, 2010 2 Comments

This example allows a user to click on an object and move it to a new location.

Download: Assure Dynamics Moving objects in XFA form

2 Responses to “Moving objects around a form”

  1. Reply Vuk says:

    This is great sample but I can only make it working for me,if the Master Page Orientation is set to Landscape. Am I missing something?
    Thank you,

    • Reply Niall O'Donovan says:

      If you look at the script you will see that we are referencing the cursor position (units: points), in relation to the page. For example for the scaling example the x-coordinates are offset by 646pt. This is the horizontal position of the rectangle that forms the scale bounding box. Similarly for the RGB example where the x-coordinates offset is 33pt. The SWOT example allows the objects to move in both x and y directions so there are two offsets.

      You will need to set up your own offsets depending on your page size (in points) and its orientation. You will notice in my example I have set the units to Points, to make it easier to work out the appropriate offsets.

      Niall

Leave a Reply