I'm trying to create a system similar to a weather map, where points of interest are loaded from a database and displayed as icons on a map in real time. When I click on an icon, a window pops up with more detailed information about that point, but I'm having problems getting variables from one MC to the other. Specifically, the detailed information window shows the same information for any icon, which is the information of the very last one loaded. Here's the code:

in the main movie,

for (z=1; z<=count; z++) {
clipcount++;
duplicateMovieClip ("_root.TargetMarker", "t"+clipcount, clipcount+100);
x = eval("tx"+z);
y = eval("ty"+z);
dx = (x-TLLong)*500/(BRLong-TLLong);
dy = (y-TLLat)*400/(BRLat-TLLat);
r = eval("ber"+z);
a = eval("alt"+z);
v = eval("vel"+z);
c = eval("cls"+z);
setProperty ("t"+clipcount, _x, dx);
setProperty ("t"+clipcount, _y, dy);
setProperty ("t"+clipcount, _rotation, r);
tellTarget ("t"+clipcount) {
x = _root.x;
y = _root.y;
r = _root.r;
a = _root.a;
v = _root.v;
c = _root.c;
}
}

So this part should take the new data, which is like ber1=100 ber2=430 alt1=234 alt2=254 .... for all the variables there, and creates a new movie clip with the icon, positions it on the map, and then sends the variables x, y, r, a, v, and c to it.

This clip should in turn pass the variables to the detail screen movie clip when it's pressed. When that movie clip is released, the following code is executed:

on (release) {
duplicateMovieClip ("_root.TargetInfo", "TargetInfo2", 9999);
setProperty ("_root.TargetInfo2", _x, "250");
setProperty ("_root.TargetInfo2", _y, "200");
tellTarget ("_root.TargetInfo2") {
x = _parent.x;
y = _parent.y;
r = _parent.r;
a = _parent.a;
v = _parent.v;
c = _parent.c;
}
}

This appears to work, but I presume it's always sending _root's current variables, rather than _targetmarkerxx's copy, which is what I want to send.

How can I correct this, or is there an easier way to go about setting this up? Thanks.

Andrew Fabian