I have changed my invisible architecture project, instead of having the countries moving to the beat of a track. I have decided to create buttons over all of the countries and when you click on them, a marker moves across the map to the country of choice and reveals their global warming information and other statistics.
This is how the code will roughly look.
import mx.transitions.Tween;
import mx.transitions.easing.*;
var cities:Array = ["uk", "france", "italy","croatia"] (etc)
function mover (targetX, targetY){
currentX = marker_mc._x;
currentY = marker_mc._y;
var xTween:Tween = new Tween(marker_mc, "_x", Strong.easeOut, currentX, targetX, .5, true);
var yTween:Tween = new Tween(marker_mc, "_y", Back.easeOut, currentY, targetY, 1.5, true);
}
for (var i = 0; i
my_btn.myCity = cities[i];
my_btn.onRollOver = function() {
mover( this._x, this._y);
marker_mc.gotoAndStop(this.myCity);
}
}
This should be complete and uploaded by the weekend.