This native extension allows you to read pressure sensitivity data from a pen tablet. It’s only been tested on Windows 7 with a Wacom Intuos 4. I’ll go through the build steps in the same format as last time.
Checkout the project on GitHub for all the code.
- Source files
- Project files for Visual C++ and Flash Builder
- Batch files so you don’t have to use the command line
- All intermediate files
The project contains some placeholder files that I cannot include in the repository because they are copyrighted by Adobe. After checking out the project, you need to:
- Replace FREPenTablet/FREPenTablet/FlashRuntimeExtensions.h with AIR_SDK/include/FlashRuntimeExtensions.h
- Replace FREPenTablet/FREPenTablet/FlashRuntimeExtensions.lib with AIR_SDK/lib/win/FlashRuntimeExtensions.lib
Now that everything is setup, you can try compiling everything yourself.
- Open FREPenTablet/FREPenTablet.sln in Visual C++ 2010
- Build the .dll (F7)
- Import PenTabletLib into Flash Builder
- Build the .swc (Ctrl + B)
- Open the .swc with a .zip editor, and extract library.swf to the same folder as the .swc
- Build the .ane (run PenTabletLib/bin/package.bat)
- Import PenTabletDemo into Flash Builder
- Build the .swf (Ctrl + B)
- Build the .exe (run PenTabletLib/bin-debug/package.bat)
If everything was successful, you can draw on the stage with pressure sensitivity!