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:Strin g = "";
myData = new LoadVars();
a1_mc.onRelease = function(){
myData.onLoad = function(){
myMessage = this.a1message;
};
myData.load("te xteffect.txt");
var i:Number = 0;
function autoWrite():Voi d {
if (i<=myMessage.l ength) {
monitor_txt.tex t = myMessage.subst r(0, i)+"█";
i = i+1;
} else {
clearInterval(w ritingInterval) ;
}
}
// calling the function repeatedly with setInterval() method
var writingInterval :Number = setInterval(aut oWrite, 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://wirelessconcept s.us/test/tacticalmap.swf
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:Strin g = "";
myData = new LoadVars();
a1_mc.onRelease = function(){
myData.onLoad = function(){
myMessage = this.a1message;
};
myData.load("te xteffect.txt");
var i:Number = 0;
function autoWrite():Voi d {
if (i<=myMessage.l ength) {
monitor_txt.tex t = myMessage.subst r(0, i)+"█";
i = i+1;
} else {
clearInterval(w ritingInterval) ;
}
}
// calling the function repeatedly with setInterval() method
var writingInterval :Number = setInterval(aut oWrite, 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://wirelessconcept s.us/test/tacticalmap.swf