473,324 Members | 2,214 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Text effect on multiple objects from external text file

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
Jan 21 '07 #1
0 2136

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: fb | last post by:
One quick question about multiple files. Let's say I had the following: #include <stdio.h> void Heading(void); int main(void) {
4
by: Andrew | last post by:
Hello, I am recieving a multiple definition error from the linker when I try to build a project I am working on. The message states that the functions I defined within an external .c source file...
9
by: lbj137 | last post by:
I have two files: A.c and B.c. In both files I define a global variable, int xxxx; When I compile with a green hills compiler (and also i think with a GNU compiler) I get no errors or warnings....
9
by: Erwin Moller | last post by:
Hi, Can anybody comment on this? In comp.lang.php I advised somebody to skip using: <script language="javascript"> and use: <script type="text/javascript"> And mr. Dunlop gave this response:
14
by: Jess | last post by:
Hello, I learned that there are five kinds of static objects, namely 1. global objects 2. object defined in namespace scope 3. object declared static instead classes 4. objects declared...
4
by: chimambo | last post by:
I have 2 problems: 1. I want to import a single text file into an access table using a Macro. I am however getting an error that I need to put a specification name argument. What does this mean?...
1
by: opendep | last post by:
hi, my project has a header file structure.h which has the following code #ifndef STRUCTURE_H #define STRUCTURE_H #include <stdio.h> typedef struct {
6
by: =?Utf-8?B?emFsZHk=?= | last post by:
Hi! I have a question.. How can csharp read a text file and execute it in another application? What I mean is that, Im doing a drawing using Tekla Structures. But instead of doing the same...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.