O'Reilly logo

LiveCode Mobile Development Beginner's Guide - Second Edition by Joel Gerdeen, Colin Holgate

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – transferring imageData

By setting the chosen image to be of the same width and height as the group that holds the puzzle pieces (that's where the 900 and 662 numbers came from), it becomes possible for us to transfer the matching rectangle of data from the full image to the puzzle piece in question. The following steps will guide you in transferring imageData:

  1. Open the card script again. Add the makepuzzle handler:
    on makepuzzle
      resetpuzzle
      put the number of images in group "pieces" into imagecount
      repeat with a = 1 to imagecount
        makepiece the short name of image a of group "pieces"
      end repeat
    end makepuzzle
  2. The makepuzzle handler will go through each of the puzzle pieces and call another handler to do the transfer of data for that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required