Archive for June, 2007

Chinwag Big Summer ’07

Monday, June 25th, 2007

Last week I registered for the Chinway Big Summer party taking place 5th July 2007 @ 18:30-00:30 along with a few others I know. The event is sponsored by Adobe so I’m surprised they’ve been so quite about it (maybe they are trying to keep us Flashers away, but no such luck!).

If you’ve got no plans, register and come along to sink some free drinks and nosh some free food and network.

Chinwag Big Summer ’07

AS 3.0 HitTest

Sunday, June 24th, 2007

Recently I’ve needed some shape based hit detection in As 3.0 so as a starting point I decided to convert Grant’s CollisionDetection class. I’ve split the code out into 3 methods and optimized it a bit by creating a BitmapData as small as possible .

Here’s a description and example of each of the methods.

ComplexHitTestObject

HitTest.complexHitTestObject( target1:DisplayObject, target2:DisplayObject, accuracy:Number );

ComplexHitTestObject example

Returns a Boolean depending on whether the 2 DisplayObjects passed as parameters are overlapping each other. The 3rd parameter specifies how accurate the test it. The higher the number, the greater the size the BitmapData is drawn internally, and therefore the scale at which the 2 DisplayObjects are drawn onto the BitmapData. The default for the accuracy parameter is 1. If you try and pass a value of 0 or less the method will thorw an error.

IntersectionRectangle

HitTest.intersectionRectangle( target1:DisplayObject, target2:DisplayObject );

IntersectionRectangle example

Returns a Rectangle matching the co-ordinates where the boundaries of the 2 DisplayObjects passed as parameters overlap. This method does a simple test much like hitTestObject().

ComplexIntersectionRectangle

HitTest.complexIntersectionRectangle( target1:DisplayObject, target2:DisplayObject, accuracy:Number );

ComplexIntersectionRectangle example

Returns a Rectangle matching the co-ordinates where the 2 DisplayObjects passed as parameters overlap. The 3rd parameter specifies how accurate the test it. The higher the number, the greater the size the BitmapData is drawn internally, and therefore the scale at which the 2 DisplayObjects are drawn onto the BitmapData. The default for the accuracy parameter is 1. If you try and pass a value of 0 or less the method will thorw an error.

You can view the source in any of the examples above by right clicking and selecting ‘View source’. Each include the HitTest class, also included below.

(more…)

Runtime Font Embedding in AS3

Tuesday, June 19th, 2007

Scott Morgan has a nice post on font embedding in AS 3.0 over at his blog.

London Flash Platform User Group June 2007

Monday, June 18th, 2007

Big thanks to Richard Lord for his presenation last month on Physics for Flash Games. The new videos including my sesssion on Flash CS3 are online, although they are really bad quality (sorry about that) in the presenations section.

The next meeting is the 21st June, at Cosmobar.

After the success of our first meeting on Papervision3D, Carlos is back, this time with Ricardo Cabello to walk you through how to get started with Papervision3D, with a session titled ‘Papervision3D: Getting Started’. Following them and continuing the 3D theme are the founders of Specialmoves, presenting ‘Production Processes for 3D Flash Projects’.

Sponsored for friends of ED.

London Flash Platform 21st June 2007 (21/06/2007)

Adobe AIR Developer Derby

Tuesday, June 12th, 2007

With the official naming of Apollo to AIR (Adobe® Integrated Runtime), Adobe have also launched a competition to build the most unique AIR application.

The grand prize is $100, 000 to spend on a travel of the winners choice (now thats some holiday!).

There are 2 main categories, ‘Best Business Applicatio’ and ‘Best Community Application’ and and ‘Wildcard’ category. There’s a load of other prizes and the competition is open to everyone wherever you are based. Entries must be received by 5th September 2007.

Adobe AIR Developer Derby

Moxie Available on Labs

Monday, June 11th, 2007

The Flex 3 beta, code named Moxie is now available for download on labs here.

If your looking to find out about some of the impressive stuff added to moxie its worth taking a look a Ted’s blog, where he did a post each day last week on new features:

Designer/Developer Workflow
Code Enhancements
Components and SDK Enhancements
Dramatically Smaller Flex SWF Files
Apollo

Now thats evangelism!

Seadragon & Photosynth

Tuesday, June 5th, 2007

How insane is Seadragon!

Its aim is nothing less than to change the way we use screens, from wall-sized displays to mobile devices, so that visual information can be smoothly browsed regardless of the amount of data involved or the bandwidth of the network…

…Speed of navigation is independent of the size or number of objects.
Performance depends only on the ratio of bandwidth to pixels on the screen.
Transitions are smooth as butter.
Scaling is near perfect and rapid for screens of any resolution.

And the demo implimentation of it in Photosynth (Windows only) is mental too.

…takes a large collection of photos of a place or an object, analyzes them for similarities, and then displays the photos in a reconstructed three-dimensional space, showing you how each one relates to the next.

In our collections, you can access gigabytes of photos in seconds, view a scene from nearly any angle, find similar photos with a single click, and zoom in to make the smallest detail as big as your monitor.

TED Talk Seadragon & Photosynth Demo

Both stunning projects!

Create Classes Command & Panel

Monday, June 4th, 2007

If your developing anything in Flash on a decent scale you should get out of the Flash IDE. If you working with Flash 9 and ActionScript 3.0 I would recommend Flex Builder, at £370 (or $499 if you have a friend in the states), its well worth it’s money.

That said, the two products don’t integrate seemlessly which is the reason for this post. Everything you want to export from your Flash library now has to linked to a class, and if you don’t have a class file saved locally with the same name (i.e. you don’t need to add any extra functionlity to the class) then Flash with ‘auto-generate’ the class for you. This doesn’t mean that Flash actually creates the class locally, but it auto-generates the class when you export the movie.

This sounds a great idea and works well until you switch back to Flex Builder and try to use the auto-genetared class. Because their is no local copy of the class Flex Builder is unable to find it and therefore shows errors where the class is used. If you switch back to Flash to export the same script will work fine as Flash knows about the class. One of the biggest advantages of developing in Flex Builder is that fact that you are show errors without having to export your application, but if the problems panel is littered with problems which aren’t actually problems it removes the usefullness of this feature.

To solve this here’s a little JSFL command and panel that runs through your library and creates a local copy of any classes/packages in the library that it can’t find a local copy of, in a classpath you have specified. This means that when you switch back to Flex Builder it can find a local copy and doesn’t show the errors where these classes are used. The class generated looks like the following example… (more…)