«

»

Nov 12

DIY Maps and Linux Firefox/Flash Quirks

First off, let me say that I really like DIY Map. It’s quick, and responsive, with an easy to use interface, as well as allowing you to make changes on the fly easily.

That said, I discovered lastnight / this morning that there are some quirks with its updating through the Flash JavaScript Integration Kit.

First of all, the only way I’ve been able to get paths to resources to work is via relative paths.  More on why I think that is the case in a moment.  I was finding that resources were not being found until I used relative paths.  Once I did so, that part worked just fine.

Second, in order to be able to update the map, it needs to be fed an XML data file, which is fine.  Wherein lies the trouble is when you are attempting to feed a dynamic file (like a cgi script or php) — I’ve not been able to get it to work, despite having the right data in the output and the proper content type — the data works just fine when loaded from a file, however…  So, my workaround is to write to a temporary file and use that file to make the changes.

Third, and this was a kicker….  The Javascript integration kit isn’t talking to Flash 9 on Firefox 3.0.3 under linux.  The messages get lost out on the bit bucket.  Just to make sure it wasn’t me, I also tried the examples which came with the app.  They, however, work on Firefox under windows.  So, I don’t know if it is something having to do with my box or what…  But it ain’t working.

4+ hours spent  on this.  Meh.  It’d be a bit more amusing if I’d gotten more sleep.  I napped for about an hour around midnight, and another nap at 7:30am until I had to get up for work @ 9.

1 comment

  1. John

    Hi Matt,

    Sorry to hear about the time wasted and that the map didn’t work out for you. I’ve tried to design it to be easy to setup and configure.

    Unfortunately, the Flash JavaScript Integration Kit is an open source project that seems to be a bit outdated. If you know of a JavaScript to Flash integration method that works on Flash for Linux, do please let me know. I’ve toyed with the javascript integration backed into Flash 8, but it fires off scary security warnings in the browser.

    As for the other issues, Flash itself can not read XML at full URLs for security reasons. However, you can certainly use pathnames that start from the web server root.

    Finally, the map can indeed read XML generated dynamically. An example of this is the XML generated from MySQL via PHP in the web traffic world map at http://backspace.com/mapapp. The PHP source is available to download there as well.

    If you already haven’t given up, feel free to email.

    Best,

    John

Leave a Reply

%d bloggers like this: