🧩 LockPuzzle
An extension for MIT App Inventor 2.This Extension is developed by th using Fast.
A circular number puzzle component for ai2.
Rotate rings to match number sums with target values.
The puzzle consists of concentric rings with numbers. The innermost ring containstarget values (sums),
and players must rotate the outer rings so that the numbers
in each section (as a ring Value) add up to the target value in that section.
Telegram | GitHub
Blogger | YouTube
Find More Extension
Terms & Conditions
Specifications
Package: io.th.lockpuzzle.lockpuzzle
Size: 14.25 KB
Version: 1.0
Minimum API Level: 7
Updated On: 2025-03-25T18:30:00Z
Built & documented using: FAST-CLI v2.8.0
Download aix
io.th.lockpuzzle.lockpuzzle.aix (14.3 KB)
Aia
lock_puzzle.aia (18.2 KB)
More info and apk on GitHub
Blocks
Demo

Events:
LockPuzzle has total 3 events.
RingRotated
Ring was rotated.
| Parameter | Type |
|---|---|
| ringNumber | number |
| sections | number |
ProgressChanged
Progress changed.
| Parameter | Type |
|---|---|
| progress | number |
PuzzleSolved
Triggered when the puzzle is solved.
Methods:
LockPuzzle has total 15 methods.
InitializeGame
Initialize the game inside a VerticalArrangement.
| Parameter | Type |
|---|---|
| arrangement | component |
BackgroundColorRGB
Set background color using RGB values
| Parameter | Type |
|---|---|
| red | number |
| green | number |
| blue | number |
BackgroundColorARGB
Set background color using ARGB values
| Parameter | Type |
|---|---|
| alpha | number |
| red | number |
| green | number |
| blue | number |
TransparentBackground
Set transparent background
GradientBackground
Set gradient background
| Parameter | Type |
|---|---|
| startColor | number |
| endColor | number |
| isVertical | boolean |
ResetGame
Reset the game to the initial state.
Difficulty
Set the game difficulty like 1, 2, 3, etc.
| Parameter | Type |
|---|---|
| newDifficulty | number |
Movable
Set whether rings can be moved.
| Parameter | Type |
|---|---|
| canMove | boolean |
GetMovable
Get whether rings can be moved.
GetDifficulty
Get current difficulty level.
IsSolved
Check if puzzle is solved.
GetProgress
Get current progress (0-100).
RingColor
Set the color of a specific ring (index starts from 0)
| Parameter | Type |
|---|---|
| ringIndex | number |
| color | number |
DefaultRingColor
Set the default color for all rings
| Parameter | Type |
|---|---|
| color | number |
FirstRingColor
Set the color of the first (center) ring
| Parameter | Type |
|---|---|
| color | number |
Setters:
LockPuzzle has total 5 setter properties.
BackgroundColor
Set background color of the pattern view
- Input type:
number
BackgroundAlpha
Set background alpha (0-255)
- Input type:
number
FontSize
Set the font size of numbers
- Input type:
number
OutlineWidth
Set the width of ring outlines
- Input type:
number
DividerWidth
Set the width of section dividers
- Input type:
number
Getters:
LockPuzzle has total 3 getter properties.
FontSize
Set the font size of numbers
- Return type:
number
OutlineWidth
Set the width of ring outlines
- Return type:
number
DividerWidth
Set the width of section dividers
- Return type:
number
Thanks
TechHamara

