Scratch Off Extension for App Inventor
The Scratch Extension adds interactive "scratch card" functionality to your App Inventor projects. This feature allows users to "scratch off" a surface on their screen to reveal what's underneath, similar to how lottery scratch cards work.
Features:
- Transform Components: Easily turn any
ViewGroup
component (like panels) into a scratchable area. - Customizable Scratch Effect: Adjust the size and color of the scratch brush to fit the style of your app.
- Background Image: Set a background image that will be revealed as users scratch the surface.
- Dynamic Control: Programmatically enable or disable scratching, allowing for flexible interaction within your app.
- Progress Tracking: The extension can report the percentage of the area scratched off, providing opportunities for games, reveals, and more.
How to Use:
-
Set Scratch Component: Designate a component in your app's layout to become scratchable.
-
Customize Appearance: Choose the color and width of the scratch effect to match your design.
-
Background Setup: Optionally set a background image that will be revealed through scratching.
-
Control Functionality: Enable or disable the scratch effect as needed through your app's logic.
-
Monitor Progress: Use events to get notified about the start, movement, and end of the scratching, as well as the overall progress.
FILES AND DEMO
Version 1
- AIA FILE: Scratch.aia (1.2 MB)
- AIX FILE: com.bosonshiggs.scratch.aix (51.2 KB)
Version 2
-
AIA FILE: ScratchV2.aia (149.2 KB)
-
AIX FILE: com.bosonshiggs.scratch.aix (56.5 KB)
-
This extension is perfect for creating engaging, interactive elements in your apps, such as reveal games, promotional offers, or educational tools. It's designed for ease of use, so even those with no Java knowledge can integrate it into their App Inventor projects.