Thursday, March 29, 2012

How to Install Flash Player 11.2 on Ubuntu 64-bit a noob

Today I installed flash player 11.2 on my Ubuntu box.  In the past when I've tried to install Flash Player it's been a huge mess because the instructions in the README don't work, or I don't know where the right plugins directory is so I end up copying files willy nilly into every location I find mentioned in my "flash player install linux ubuntu how to" google search until finally it works but I have no idea which was the right location.
So this time, I decided to clean up.  First I deleted every file I could find that had the words flash and player  in the name.  Also, to make sure I didn't have Gnash (a flash player alternative) installed, I typed the following into Terminal:

sudo apt-get remove gnash*

After confirming that Flash no longer worked in Firefox and Chrome I did the following:

1. Download Flash Player from  I chose the tar.gz option.
2. Extract the tar.gz package to ~/temp
3. in Terminal:
    sudo cp -r ~/temp/usr/* /usr
4. One by one, tried each directory that looked like it could be a firefox plugins directory until finally found the one that worked.  What finally worked was:
    sudo cp ~/temp/ /usr/lib64/mozilla/plugins/

Now I've got 64-bit flash player running and my filesystem is much cleaner!

Wednesday, March 14, 2012

How to get Input From Entire Screen on Microsoft Surface

On Microsoft Surface, in order to detect TouchPoint input, you must create a new instance of the TouchTarget class (a.k.a. ContactTarget prior to v2.0)

The first parameter to the TouchTarget constructor is an IntPtr handle to an application window.  If you pass in a handle to a window running in a different process, you'll get an error.  This originally led me to believe that in order to detect touch input, you had to have a windowed application, and there was no option to detect touches occurring outside that window.

Fortunately, I was incorrect.

To use the whole screen as your TouchTarget, simply pass in IntPtr.Zero as your window handle, like so:

          new TouchTarget(IntPtr::Zero, Core::EventThreadChoice::OnBackgroundThread ); 

If you do this, keep in mind that TouchPoints you receive will have x and y coordinates relative to the screen, not your application window.