hi, all,
I need some help here:
lets say i have world map, with 230 countries maps(movieclips), I would like to create a common function using an array for all of these so that I do not have to add for each and every country’s movie clipa line of the code.
what do I mean by that?
look at this code for example, applied to 1 movieclip named “argentina”:
I am improting Dropshadow filter, and then—apply rollOut function.
import flash.filters.DropShadowFilter;
argentina.onRollOver= function() {
var filter:DropShadowFilter = new DropShadowFilter(5, 5, 0x000000, 0.8,5, 5, 1, 3, false, false, false);
var filterArray:Array = new Array();
filterArray.push(filter);
this.filters = filterArray;
txtfield.text = "ARGENTINA";
txtcapital.text ="Capital: Buenos Aires";
mc_loader.contentPath = "flags/flag_argentina.png";
this._alpha=75;
}
argentina.onRollOut = function() {
argentina.filters=null;
txtfield.text = "";
txtcapital.text ="";
mc_loader.contentPath = "";
this._alpha=100;
}
what I would like to have is: something lioke the code below:
var country list : argentina, brasil, uruguay etc.
var capitals: buenos aires, brasilia,montevideo, etc
var flags: argentina.jpg, brasil.jpg, uruguay.jpg etc.jpg
and I am iam getting lost in here:
I would like to have a movie clip when it has been “mousedover” to change its alpha to 75%,display the name of the country in the dynamic textfield, dysplay its capital in another textfield, and diplay a flag picture in the loader component — and on RollOut event CLEAR all text and loader fields and return alpha to its original state all USING ARRAYS.
If you look at my code: I have accomplished it all, but for each individual movie clip.
what I would like to have is a function which will be applied to all movie clips with similar letter sequences, like map_argentina, map_brasil, map_uruguay and similalrly to the dynamic textfields.
can someone PLEASE help???
otherwise it is very tedious job for 290 countries, you know…