Simple AIR 2.0 Multitouch Sample

I was really excited when Adobe made the announcement of Multitouch support in the Flash Player. Mainly because we have a bunch of Multitouch screens hanging out in the office, from our Windows 7 Touch Games Development. We made Microsoft Blackboard, Rebound and Garden Pond. So now that it is in public beta I am able to show a really simple example of a paint program running on a Dell Latitude XT Touch Laptop. Nothing fancy, but it shows off the feature.

Simple AIR 2.0 Multitouch Example from Julian Dolce on Vimeo.

Continue reading » · Rating: · Written on: 11-19-09 · 1 Comment »

AS3 SVN Library

A few months ago I started writing a svn protocol library in as3. It started with an idea for a internal tool that would allow us to select files from our svn code repository and export it and all of it’s code dependencies. And because I haven’t done a lot of work with ByteArray, or Sockets before I was pretty excited about giving this a shot. My first attempts where really rough and basic and worked for the most part, but were in no shape to be in the form of a nice library. I let it sit for a while as I was busy getting ready for FOTB and Flashpitt. Then one night I started doing some more research about the protocol and found that SVNKit, a Java SVN library, was open source. So I started going through all the source and spent a great deal of time going through how the code was structured. I couldn’t just do a straight port because of the differences that data gets returned between Java and AS3. Long story short the way they have it set up is you can make the call to the server and on the next line read the input. In AS3 you need to wait for your event to come back, and there is no guarantees that all of it is going to come back in one event either. But I was able to port some important parts like reading and writing the data. I’ve tried to keep the API’s similar, but there are instances where they just couldn’t be or didn’t make sense to. One of my goals for this project to is to make it as platform independent as possible. And by that I mean I want you to be able to use the library in the web, air, and any other Flash Player 10 player. I’ve tried to abstract out the parts that deal with writing files to disk so that this could be accomplished. But there may come a point where a feature may need AIR for whatever reason. But I’ll cross that bridge when I get to it. If that feature isn’t a super high priority chances are I will leave it out just for that reason.

That all being said I just made a fairly big commit today to the google code repository. It isn’t fully featured yet and only supports the svn:// protocol. Once I get some more of that protocol completed I plan on doing the http:// protocol. In the wiki there is an example AIR app that allows you to display directories in a tree, export files and folders, as well as trace out the log for any item in the repository.

This is still a work in progress and lots to do before it gets to a really stable state. For instance the Error handling is almost non-existent but I have placed a lot of //TODO where the errors need to be thrown. I also only have 1 svn server to test on so I am not sure how running it in other environments will work out.

I have created the library to a point where I can create our internal app, so I am not entirely sure what features I will tackle next. I may try doing commit and add, but those are fairly big. So if you have any requests I am all ears.

Continue reading » · Rating: · Written on: 11-13-09 · 5 Comments »

A couple quick FDT tips

I have been using FDT for a couple of years now and I love it, but it wasn’t until recently that I started to really use it’s full potential. The biggest reason is that we still use the Flash IDE a whole lot and .fla’s are the main source of our project. Previous a lot of our projects would be 1 maybe 2 fla files and all the code would get compiled into them. We would still use FDT for all of our coding but would lose out on using the debugger which is really an amazing time saver.

So now after building the Fuel ANT Tasks, and creating a new workflow between designers and developers, we have now embracing all that is FDT. We have come up with a great solution on how to remove all of the code from our FLA’s and have it get compiled into one swf. The swf can be compiled from Flash or FDT. We create a blank fla with only a document class as our entry point, this way anybody with the IDE can compile our project. Now there are many different ways to accomplish this, so I am not going to go into them, but may post about it in the future – we are still refining the process.

The thing to take away from it is that when we are doing only code changes we can compile the code and even fla’s from FDT and have it run through the debugger. Now in order to get this running a ran into a few problems and wanted to share the solution, because it has stumped a lot of people.

Launching in External SWF Viewer
One of the options to launch your application is the External SWF viewer. This is a basic java application that displays a html page with your swf in it. The html page is generated in your output directory when you compile and then deleted when it’s complete. Because the swf is running in a local html file chances are you are going to run into security errors if you are doing any network calls, or loading of remote assets. The easiest way to get around this is to add your workspace directory to the Flash Global Security Settings panel. The path to my workspace looks something like /Users/julian/workspace, so it’s tempting to add that as a path. But because the way that the External SWF viewer is loading the swf you need to add the path like so file:////Users/julian/workspace. This will now make that directory and all it’s sub directories locally trusted locations and will not throw security errors. Be sure to check out the Run/Debug preferences in Eclipse as well for some useful settings that you may want to adjust.

Flash Player 10
I was trying to compile a project to Flash Player 10 the other day and kept getting a bunch of errors. I had added the Flash Player 10 playergloabal.swc and my swf was running in Flash Player 10 so I thought that would be enough. But it was actually compiling to Flash Player 9 still. So after much digging I found out that you need to add the following arguments to the flex sdk during compiling.

–target-player=10.0.0

So now after a couple of weeks of trial and error on getting the whole workflow set up, I think we have a really good system in place and am looking forward to starting a new project to use it from start to finish. It took me a while to get used to the debugger and really understand it’s power, but once you do it’s an amazing time saver. No more traces just breakpoints.

Continue reading » · Rating: · Written on: 11-04-09 · 6 Comments »