Get Adobe Flash player

Archive for the ‘Userfaces’ Category

AS3 DragObject – Dynamic Animation via Destination

Thursday, March 6th, 2008

I’ve been using this DragObject class for a while now. It was just a quick little MovieClip extension I threw together to give any MovieClip I had a destination x and y to automatically animate to. Simply explained, when the destination x and y are changed, the onEnterFrame function makes sure the clip animates to it. Since putting it together, I’ve been very fond of this sort of tweening concept. It allows for dynamic changing of properties without needing to worry about mid-animation changes; with only 1 property determining the destination value, your MovieClip will never get confused or lost as to which way it should be going.

One thing to note is that on the timeline I have set up a globalMouseUp function. This is necessary for implementation of the DragObject if your cursor is able to leave the object when dragging it.

Also added in some fun proximity checking. Source and Enjoy.

-Andrew

Extending the RangeList Class

Monday, February 25th, 2008

This will be quick. I’ve extended the functionality of my RangeList class and made 2 menu systems. The first is what I’m calling a Multi-Set Menu. Which is simply a set of n number of 1-dimensional menus. The example I am providing is a bit crude, but it illustrates the point, this could be put to good use creating a dynamic drop-down menu system of some sort. The second menu is a grid system, not much more explanation needed for that one. The Grid Menu is also a little less crude, and generates a grid dynamically given a class type for the menu items via String. I was hoping to offer the ability to create a grid either dynamically or statically from items on the stage, but without method overloading in AS3 I decided not to come up with an alternative solution, however I simply just commented out the static constructor if you are up for some minor tampering. Also I’m using Tweener for the animation, it is just easier (and pretty efficient).

Click on the example and use the Arrow Keys to see how the menu works.

[kml_flashembed fversion="10.0.0" movie="http://www.andrewwalpole.com/blog/wp-content/docs/MSM_Test.swf" targetclass="flashmovie" publishmethod="static" width="300" height="240"]

Get Adobe Flash player

Get Adobe Flash player

These examples are available for download here.

Comments, Thoughts and Questions always welcomed.

-Andrew

The Day My Bank Account Died

Monday, January 28th, 2008

Well, it is not quite dead yet, but it seems inevitable after I was pointed in the direction of Phidgets. Check them out! If you are like me and absolutely drool over the idea of building your own USB device and then programming it through a Flex or Flash-based application please join me in signing over my soul to this company. Not only do they offer you an assortment of sensors, solder-less connections, affordable prices and a giant amount of documentation, they have also gone and written an extremely comprehensive Actionscript 3 API for it.


While attending FlashForward 2007 this past year I was fortunate enough to sit in on Craig Swann’s presentation about userfacing (directly interactive physical interfaces). It was one of the most inspiring talks I have ever attended, so much so that I set out to create my multitouch FTIR based screen just a few weeks later. As much as I do love the things you can do with code, especially Actionscript, you can’t touch it. Phidgets abstract the complications of building userfaces and promote the creative process. Sounds like a business model I’d like to see more companies wrap themselves around.


I’ll be sure to keep updating about my mad scientist Phidget experiements. First up I think will be the proximity-based magnetic interactive screen.


-Andrew