duplicateMovieClip problemo, help pls

Hi there…
iam TRYING to duplicate a movie clip using this code:


for (i = 1; i < 30; i++) 
{
   duplicateMovieClip(_root.mc_l_1["area_test"], _root.mc_l_1["area_test_" + i], _root.mc_l_1.getNextHighestDepth());
} 
po_x=-101.5;
po_y=-1109.1;
t=1;
 for (c = 1; c < 30; c++) 
   {
    _root.mc_l_1["area_test_" + c]._x = po_x;
    _root.mc_l_1["area_test_" + c]._y = po_y;
    po_y=po_y+ 102;
  if(t==19)
  {
   t=0;
   po_x = po_x+120;
   po_y=-1109.1;
  }
  t++;
 }

But for some WEIRD reason that i dont understand, i just cant.
Any idea?
thanks.
Leo.

everywere you have
po_x
and po_y
did you forget it should be ‘.’ ?
po._x

etc

[quote=Macsy;2326473]everywere you have
po_x
and po_y
did you forget it should be ‘.’ ?
po._x

etc[/quote]

Lol, a common mistake that everyone makes.

EDIT:
Ive never done such a misstake.
or at least ive never had to turn to a forum to get help for it =)

To Macsy and Jephz: without so much love…

if you guys pay a little more attention, po_y and po_x are variables that receive values at the begining of the code, therefore NO need to place a DOT like one of you suggested and the other one embraced.


po_x=-101.5;  //VARIABLE!!!!
po_y=-1109.1;  //VARIABLE!!!!

t=1;
 for (c = 1; c < 30; c++) 
   {
    _root.mc_l_1["area_test_" + c]._x = po_x;  // HERE is the position x for mc_l_1
    _root.mc_l_1["area_test_" + c]._y = po_y;  // HERE is the position y for mc_l_1
    po_y=po_y+ 102;
  if(t==19)...

[COLOR=black][FONT=Verdana]So, instead of bragging about each others amazing and most infinite skills in programming, what about actually helping me on duplicating one movie clip inside of another one, instead of using the forum to showoff and actually using it as it is supposed to b used: to help.[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=black][FONT=Verdana]Thanks.[/FONT][/COLOR]
[COLOR=black][FONT=Verdana] [/FONT][/COLOR]
[COLOR=black][FONT=Verdana][/FONT][/COLOR]
[COLOR=black][FONT=Verdana]Leo.[/FONT][/COLOR]

when you rename the new movieclip you just input a name
for (i = 1; i < 30; i++)
{
duplicateMovieClip(root.mc_l_1[“area_test”],"area_test" + i, _root.mc_l_1.getNextHighestDepth());
}
po_x=-101.5;
po_y=-1109.1;
t=1;
for (c = 1; c < 30; c++)
{
root.mc_l_1["area_test" + c]._x = po_x;
root.mc_l_1["area_test" + c]._y = po_y;
po_y+= 102;
if(t==19)
{
t=0;
po_x += 120;
po_y = -1109.1;
}
t++;
}

what i would really do is simply make a call to the linked library item and initalize it such as

_root.createEmptyMovieClip(“emp”,-1);

poX = 101.5
poY = -1109.1;

for(i=0;i<30;i++){
root.emp.attachMovie(“area_test”,"area_test"+i,_root.emp.getNextHighestDepth());
tempMC = root.emp["area_test"+i];
tempMC._x = poX;
tempMC._y = poY;
poY+=102;
if(i==19){
poX+=120;
poY = -1109.1;
}
}

just make sure you have the item checked to be exported in first frame, and call your library item in the action script linkage box “area_test” and this code should take care of the rest (I hope untested just wrote it)

Hey! Thanks a lot!
It worked!

Cheers!
And again, thanks for the reply!
Leo.

no worries