Small code snippet reference for getting lifelike gravity from your accelerometer in your projects. This is for Cocos2D and Box2D but is easily changeable to your project needs whichever language you program in.
A little issue I seem to bump into every now and then so made sense to write a quick post about. Sometimes I find when I open up Flash Builder it will load the workbench then show me the full program for a split second before crashing. Simple fix is to move the .metadata file out of the workspace to let me open up the application again. On a mac you'll find it in Documents/Adobe Flash Builder 4.7.
On a project we're currently working on I was required to animate character input using sprite sheets to handle the animation of the characters. This was done by using textfields hidden to the user and animating their input. One of the features required was wordwrap so here is a simple way to create the appearance of wordwrapping between 2 separate fields...
Continuing my R+D into arduino and processing I have setup a basic example of serial communication using a button connected to my Arduino that sends a value to the Processing. I also have an LED connected but this can be dropped out if not required.
Been playing with processing and the arduino in the last couple of weeks. When setting up Processing I ran into the notorious RXTX mismatch error - similar to
RXTX Version mismatch Jar version = RXTX-2.2pre1 native lib Version = RXTX-2.2pre2
To solve this, I did some scouting around the web and found a few clues but here's a detailed approach on how to fix it on mac osx 10.7.
So, with the release of Air 3.2 this week I decided to run a quick demo in the iPad using the source code of the Whack Game Demo by Byxb Interactive. This is pretty easily to do - overlay the Air 3.2 SDK then just create a new mobile project and copy over the source from the project.
Working on a project where the html text of a field would appear to jump/ contract on rollover. It appears the issue occurs when a dynamic textfield has autoSize set to true. There is a simple fix by setting autoSize to false after the text has been set.This may play with the height of the textfield if it is dynamically sizing so to fix this I add in the following code...