Archive for August, 2006
Another useful flash site - OSFlash
Thursday, August 24th, 2006I found this flash site full of Open Source resources for flash developers, check it out there are so many flash projects happening it is amazing:
http://www.osflash.org/
I ran into this while looking for a way of accessing a SQL database on a Windows Server from Flash. You can do it with Flash Remoting but that is pretty expensive. I found Fluorine which is an open source implementation of .NET Flash Remoting Gateway but I haven’t got my head around all the jargon yet so I am not sure if it is any good for what I want it for. All I want to do is access the database but unfortunately this server doesn’t have PHP so I have to do things through .NET, and jump through all these Microsoft jargon hoops.
Also found this article which might be what I am looking for but still not to sure, it would help if I had a sample database running on my own machine to fiddle with and learn about it.
Useful flash site - 27Bobs
Monday, August 21st, 2006Found this very interesting and useful site: http://www.27bobs.com/. It’s full of flash components and interesting experiments.
Life Drawing
Friday, August 18th, 2006Flash Slideshow with Captions via XML
Tuesday, August 15th, 2006I have been working on a flash slideshow on and off and a couple of days ago I found http://whatdoiknow.org/archives/001629.shtml which does almost everything I wanted but not quite, so I got action-scripting. To see a demo of what I have done click the play button below.
The original slideshow by Dominey has a nice feature of loading the image location and various fade-out and timer values from and XML file so that the user can control most things from the XML instead of going into Flash to change things. What I needed was a way of displaying a caption for each photo and then to fade-out these captions with the photos.
I have extended the XML schema for the slideshow to include the text for each caption and also the position where the text is to be displayed and its alignment in the textfield. There are also variables for controlling the font-size,font-colour and the width and height of the textfields that display the captions. Here is the XML file which controls the above slideshow:
It would be nice to be able to also specify the font from the XML file but since the font has to be embedded into the swf I don’t think that can be done. It would also be nice to have a way of masking/resizing the frame to better handle different size images, right now the slideshow is assuming the images are all the same size as the stage size in the fla, it still works for different size images but it will crop images or leave unsightly blank spaces around images.
Download the source: slideshow_rumi.fla.zip
Stamp GPS to Photos
Monday, August 14th, 2006
GPX Draw is now at a useable stage, although I find that when inserting points the tolerance can be too low when zoomed out, need to make it so that the tolerance is dependent on the zoom. I have used GPX Draw to create a GPX log of my Cycle Tour from Sydney to Melbourne.
The next step was to have a program read this GPX file and a bunch of images and work out the approximate GPS for each image. I tried PhotoLinker and gpsPhoto, PhotoLinker has a nice Mac interface but it wasnt doing the weighted averaging that I needed and gpsPhoto wasn’t doing any averaging at all, so I ended up having to modify gpsPhoto which is a perl script linking to a bunch of handy libraries like ExifTool, to do what I wanted it to do.
Here is the perl script:gps_finderpl.zip
I was very pleased to see some images show up on the map finally after all the hard work. Take a look here, this is going through the Google Map Module for Gallery2 but I have modified it a bit so that it displays my track as well as the photos.
There are some problems that I ran into, biggest one being that I had to significantly drop the detail of the track down so that the google map api was displaying the data in a reasonable amount of time. I found this to be pretty disappointing but maybe a newer API will handle large number of points in GPolyline more efficiently. A fix would be to figure out what is within the view port and only feed the API the points inside and around the viewport and not the whole dataset, but that would take a fair bit of programming.
Another problem is that it can get quite crowded with the icons for all the images, the Google Map Module has some grouping features but they dont seem to work for me. Once I figure out the best way to make it all run more efficiently I will had some of the longer more interesting Cycle Tours and photos.
GPX Draw
Sunday, August 6th, 2006
After 2 weeks of wrestling with the Google Map API and Javascript I have an alpha version of GPX Draw. As mentioned in my previous posts I have been looking for a way of geocoding my travel photos but unfortunately I did not have a GPS unit with me while I was travelling but I did keep a day by day diary and the photos are all timestamped hence the idea that if I was able to draw a route of my travels with time information at each point then I will be able to estimate the location where the photo was taken by looking at the timestamp of the photo and relating it to the route information in a GPX file.
You can have a look at what I have so far by clicking on the “GPX Draw Google Map” tab in the header of this page or going to the following location:GPX Draw. The application is orientated towards cycle touring but could be modified for other purposes. This is a preliminary version, I havent done that much testing on it yet so if you find bugs then let me know.
One of the problems that wasted a lot of my time was the fact that firefox on the Mac platform does not send a keydown event when the CTRL or SHIFT buttons are pressed. Originally I wanted to have the application switch to ‘add marker’ mode if the user was holding down the SHIFT key, once the SHIFT key is released the application would go back to ‘add point’ mode. This is very nice for the user and I was very happy with the way it was working on the Linux box but when I tried it on the Mac I found that no keydown events were being generated. After much hacking around and searching for a solution on the web, I ended up having to add a set of radio buttons for switching between modes. As a user friendly measure I have added hot keys (a,z,d) for switching modes (note that the mac does generate keydown events for normal keys but not the modifier keys).
Other problems I had were with pop calendars, until I found the following The DHTML / JavaScript Calendar which is ultimate javascript calendar, plus is it free.
At this stage I am going to start drawing test routes and feeding the generated GPX into PhotoLinker along with the photos to be geocoded.


