Showing posts with label Flash CS3. Show all posts
Showing posts with label Flash CS3. Show all posts

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.

Saturday, June 27, 2009

Flash Transitions

Came across a couple of really useful sites for transitions in Flash. The first allows you to try each of the transitions in CS3. The second, I have come across many times before. It is a more general site but gives some great Flash tutorials. Hopefully more AS3 examples will be added.

Friday, June 26, 2009

Flash Map Convert lat/long to x,y

I need to add pins to the flash map I'm working on. They are geo-located based on lat/long stored in a loaded XML. I was wondering how to do the conversion from lat/long to screen x,y. Found this thread. I'll give feedback on the solution I finally implemented in due course.

Flash CS3 Map Zoom

I've been building a Flash CS3 map mentioned earlier in the blog. The next thing to be done was zoom. From past experience this is always a tricky business. I wondered if anybody might have shared their solution. Eureka! Peter Organa to the rescue. He has written just the best zoom and pan tool. Scroll wheel even works. Best of all its in AS3 and Peter has shared the source. Made my day!

Thursday, June 25, 2009

Flash CS3 Actionscript 3 and Maps

It has been a long while since I worked with the Flash IDE. Going back to Flash MX in fact. I'm approached quite often about Flash jobs. Often they ask for Actionscript 2.0 which I often find a little odd. Must be a good reason. Anyway, I enjoy working with AS3 in Flex so thought it time to return to Flash. I mentioned in an earlier post that I was using both the Flash CS3 IDE and Flex Builder. It took a little getting used to but I'm beginning to get comfortable. I've been building a vector based Flash map application:

Flash CS3 AS3 Map

I'll admit to being rather wrapped up in it. The continents/countries/states are individual movieclips. Metadata is loaded from XML. Flex is being used to tie the main 'all continents' swf to individual continents. There are 8 swf's in all. Its a cool little app I think. Rather than building one honking big swf, break everything into smaller pieces and use Flex as the glue. I have a list of things to do. Adding zoom to the right pane, and overlaying pins (from a lat/long conversion) using loaded XML will make it a really functional application.
I've avoided mentioning animation. I'll admit i'm very interested. In AS2 I avoided it like the plague. In CS3 AS3 it seems easier. I've played somewhat and found it all pretty straighforward. I plan to add a little cool animation to this app...