In my "perfect picture" puzzle game, I have 16 hotspots in a grid pattern. I purposely made the image names sequential like this:
img1_1.jpg
img1_2.jpg
...
img1_16.jpg
if i showed you the code it would look something like this:
"img" & cstr(puzzle_num) & "_" & cstr(hotspot_num) & ".jpg"
I have 6 puzzles, so I increment puzzle_num when a new puzzle needs to be displayed. puzzle_num = puzzle_num +1
To display all 16 parts of a puzzle, I use the hotspot_num to determine what image should be displayed in a specific hotspot.
- Code: Select all
for hotspot_num = 1 to 16
Action.LoadAPicture Hotspot(1), "img" & cstr(puzzle_num) & "_" & cstr(hotspot_num) & ".jpg"
next
so Action.LoadAPicture Hotspot(1), "img1_1.jpg" would load the image in hotspot 1 and so on.....
I hope that helps!