Question

I've been tasked with developing a touch screen software using adobe flash professional in which a world map is displayed on the screen and when the user touches a continent, the continent itself is highlighted. Then it shows a little box stating what the name of the continent is and and when the box is clicked, the page shifts to the map of Africa with all the countries in it.

I actually have never worked with flash or ActionScript and I have no idea what the proper way of approaching this and no one on my team has this type of experience so we are all lost. Would it make more sense to cut out each continent and then using ActionScript write an event listener for it to be clicked on and to then show the dialog box for each continent or is there a much simpler approach to doing this?

I am very new to Flash and ActionScript and any help here would just be greatly appreciated!

Was it helpful?

Solution

Yep, that would be the easiest and fastest way to do it, seperate the continents, convert them to buttons or movieclips, and target them with event listeners.
e.g.:

africa.addEventListener(MouseEvent.CLICK, africaDialogShow);

function africaDialogShow(e:MouseEvent):void{
    //show africa's dialog...
}

Or another way is to seperate the continents, convert them into buttons/movieclips and then target all of them with event listeners which are calling the same function.

africa.addEventListener(MouseEvent.CLICK, continentClicked);

function continentClicked(e:MouseEvent):void{
    switch(e.currentTarget.name){
        case "africa":
            //show africa dialog
            break;
        case "europe":
            //show europe dialog
            break;
    }

}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top