SketchPort is almost live!

SketchPort is now mostly out of private beta. The home page, browse page, challenges page, user profiles and drawing pages no longer require login. The news section on the home page is also new.

The plan for the immediate future is to improve the drawing app with an eraser tool, allow live playback of drawings, and other new features.

Leave a Comment

I think I just figured out how to cure cancer

class CancerBot extends NanoBot:
	def onCellIdentified(self, cell):
		if cell.is_cancer():
			self.destroy(cell)

bot = CancerBot()
bot.run()

All I need is some help with implementation details.

Leave a Comment

Checklist for using Stage3D in AIR 3

  • Make sure you’ve overlaid the AIR 3 SDK onto your Flex SDK. For compiler errors
  • Set -swf-version=13 in the compiler args For “Error #1014 Class could not be found.” runtime errors
  • This step depends on how you’re creating the window that contains Stage3D content. Fixes “Context3D unavailable” runtime errors in the release version of AIR
    • If you’re using the initial window, set application->initialWindow->renderMode to direct in your application.xml
    • If you’re creating the window at runtime, set nativeWindowInitOptions.renderMode = NativeWindowRenderMode.DIRECT when creating the NativeWindow

Leave a Comment

AIR 3 Native Extension Example – PenTablet

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.

Requirements:

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:

  1. Replace FREPenTablet/FREPenTablet/FlashRuntimeExtensions.h with AIR_SDK/include/FlashRuntimeExtensions.h
  2. Replace FREPenTablet/FREPenTablet/FlashRuntimeExtensions.lib with AIR_SDK/lib/win/FlashRuntimeExtensions.lib

Now that everything is setup, you can try compiling everything yourself.

  1. Open FREPenTablet/FREPenTablet.sln in Visual C++ 2010
  2. Build the .dll (F7)
  3. Import PenTabletLib into Flash Builder
  4. Build the .swc (Ctrl + B)
  5. Open the .swc with a .zip editor, and extract library.swf to the same folder as the .swc
  6. Build the .ane (run PenTabletLib/bin/package.bat)
  7. Import PenTabletDemo into Flash Builder
  8. Build the .swf (Ctrl + B)
  9. Build the .exe (run PenTabletLib/bin-debug/package.bat)

If everything was successful, you can draw on the stage with pressure sensitivity!

10 Comments

AIR 3 Native Extension Example – ImageProcessor

This post will show you how to create an AIR Native Extension for Windows. Specifically, we will create an extension which uses .NET to transcode BitmapData objects into .bmp, .jpg, and .png formats much faster than existing ActionScript or Alchemy methods.

Requirements:

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:

  1. Replace FREImageProcessor/FREImageProcessor/FlashRuntimeExtensions.h with AIR_SDK/include/FlashRuntimeExtensions.h
  2. Replace FREImageProcessor/FREImageProcessor/FlashRuntimeExtensions.lib with AIR_SDK/lib/win/FlashRuntimeExtensions.lib

Now that everything is setup, you can try compiling everything yourself.

  1. Open FREImageProcessor/FREImageProcessor.sln in Visual C++ 2010
  2. Build the .dll (F7)
  3. Import ImageProcessor into Flash Builder
  4. Build the .swc (Ctrl + B)
  5. Open the .swc with a .zip editor, and extract library.swf to the same folder as the .swc
  6. Build the .ane (run ImageProcessor/bin/package.bat)
  7. Import ImageProcessorTest into Flash Builder
  8. Build the .swf (Ctrl + B)
  9. Build the .exe (run ImageProcessorTest/bin-debug/package.bat)

If everything was successful, you can run the .exe and click the stage to encode a JPEG. It will be saved to “C:\temp.jpg”.

45 Comments

How to bring an svn repo into a specific git branch on GitHub

Let’s say you have a website with a few different flash applications. Usually with git you would create a separate repo for each application. But, paid plans on GitHub are limited to a certain number of private repos. Luckily, you can create a single repo with remote branches for each application. With this example, I happen to be pulling from svn:

cd EMPTY_DIR
echo SVN_USER = GITHUB_USERNAME ^<GITHUB_EMAIL^> authors.txt
git svn clone --no-metadata --authors-file=authors.txt SVN_REPO_URL LOCAL_DIR
git branch -m master backend
git remote add origin git@github.com:GITHUB_USERNAME:REPO_NAME.git
git push origin backend

After doing this for each application, they are listed in the branches dropdown on GitHub.

Leave a Comment

My experience developing browser extensions

Firefox:

  • Poor and inconsistent documentation
  • New fast release schedule means you have to frequently test the latest version and update even though no APIs you use have changed
  • AMO review used to be great, but is becoming very long (> 1 week)
  • Nice analytics

Chrome:

  • Very simple API, but missing some features
  • Good documentation
  • Costs $5 to deploy
  • Chrome Web Store is very insecure
  • Chrome Web Store is very low traffic

Opera

  • Very simple API, but missing some features
  • Good documentation
  • Opera extensions site is well done

IE (haven’t tried):

  • Difficult to get started (requires C++/C#)
  • Too insecure to even consider

Safari (haven’t tried)

  • API similar to Chrome/Opera
  • Strange “extension builder” built into the browser, didn’t get anything running after 30 minutes of using it

Leave a Comment

SketchPort online drawing

Another launch site of mine is now up. This one allows you to create quick sketches and share them online. It will have a very clean UI with intuitive drawing controls.

http://www.sketchport.com/

Leave a Comment

CardZuki webcam e-cards

This week I launched the CardZuki beta site. This is a free service that will allow you to send e-cards using your webcam. I’m hoping to have mobile apps out for iPhone, Android, and BlackBerry Playbook by the end of the year.

http://www.cardzuki.com/

CardZuki beta launch

Leave a Comment

The Center for Waffle Research

Today I’m launching a new website, devoted to waffle sciences. The site will cover various aspects of waffles, and the knowledge we can gain by shifting perspective. There will be a Q&A section to highlight the most important waffle problems, and offer users a way to help.

http://www.centerforwaffleresearch.com/

The Center for Waffle Research

A site devoted to waffle science.

Leave a Comment

Follow

Get every new post delivered to your Inbox.