Hello again
I am working on an interactive map, the map will contain different countries, each country is a movie. Each time the user click on a county it displays text in a dynamic field using a typewriter effect. (the text is imported from an external text file)
This is what I have so far:
var myMessage:String = "";
myData = new LoadVars();
a1_mc.onRelease = function(){
myData.onLoad = function(){
myMessage = this.a1message;
};
myData.load("texteffect.txt");
var i:Number = 0;
function autoWrite():Void {
if (i<=myMessage.length) {
monitor_txt.text = myMessage.substr(0, i)+"█";
i = i+1;
} else {
clearInterval(writingInterval);
}
}
// calling the function repeatedly with setInterval() method
var writingInterval:Number = setInterval(autoWrite, 20);
}
now this works Great for the one country “a1_mc”, but I have a lot of them: a1_mc, a2_mc, a3_mc, a4_mc……ect….., for the text it goes the same way: a1message, a2message, a3message….ect….
How can I set it up so it displays the right text for each country once clicked?
Keep in mind that I am using one dynamic field all of them.
Here is a sample of the project, i just started it so.....
cick on the top right country/sector of the map to see what i Mean (a1_mc)
http://wirelessconcepts.us/test/tacticalmap.swf