Thursday, July 2, 2009

Flash CS3 Map Evolution



The Flash CS maps I have been building using AS3 is moving along slowly. I shared a link in an earlier blog entry to the first phase. Most of the time here was spent assembling the assets ie. movieclips of each continent/country/state and supporting XML. The XML is tied to the movieclip via a number - <id>1</id>, sprite 1. Thus I have an all continents swf and individual continents eg. northamerica.swf. These are made up of individual country/state movieclips. Clicking on a continent, loads the individual continent swf. Since Flex is the glue for the swf's, I have used eventing to communicate between each of the swf's; flash to flex, flex to flash. The eventing code I used was an adaptation of code shared by Jason Fincanon. The code is as follows:


The next phase of the map I have also now posted.



Here I have integrated the zoom functionality from Peter Organa (see earlier post). Thus the zoom.swf provided by Peter now listens to which continent was selected and loads the appropriate swf. Now a selected continent can be panned, zoomed into and out. This will allow, in the next phase, geolocated pins to be added to the map.

No comments: