Picture puzzle

Posted in: LiveCycle- Nov 21, 2010 No Comments

This form demonstrates a few tricks albeit in a irreverent way. Firstly using an ‘Adobe’ grey as a background allows your form to be part of the application, rather than sitting on top it. The second uses script to allow the use to select a part of the puzzle and move it into the correct position.

This won’t be winning any prizes in the games market, however it is not intended to be a serious puzzle. It just demonstrates some of the dynamic features of LiveCycle Designer ES2.

When you open the form, the puzzle elements are spread across the page. The challenge is to get the pieces into the correct position, in order to see the hidden screen.

Because Adobe changed the application grey from 103,103,103 in Acrobat 8 to 51,51,51 in Acrobat 9 (RGB), we need a script in the initialise event in order to affect the colour of the rectangle on the master page:

if (app.viewerVersion >= 9)
    background.value.rectangle.fill.color.value =51,51,51;
    background.value.rectangle.fill.color.value =103,103,103;
this.access = “readOnly”;

The pieces are regular buttons with an image behind the button. The script that allows the user to move the pieces on clicking is a bit involved, but in essence monitors the x,y coordinates of the mouse on the click event.

Here is the final image you are striving for:

You can access the puzzle (sample form) here: Assure Dynamics Jigsaw puzzle.

In case you don’t make it to the end of the puzzle, here is the video of Hook Head lighthouse.

Have fun!

No Responses to “Picture puzzle”

Leave a Reply

You must be logged in to post a comment.