# Help AS3! Relocate a clip depending on other clips position

**URL:** <https://forum.kirupa.com/t/help-as3-relocate-a-clip-depending-on-other-clips-position/300166>\
**Category:** flash\
**Created:** [November 17, 2009, 1:48am UTC](https://forum.kirupa.com/t/help-as3-relocate-a-clip-depending-on-other-clips-position/300166 "2009-11-17T01:48:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![creacionro](https://avatars.discourse-cdn.com/v4/letter/c/f08c70/32.png) [@creacionro](https://forum.kirupa.com/u/creacionro)\
**Post date:** [November 17, 2009, 1:48am UTC](https://forum.kirupa.com/t/help-as3-relocate-a-clip-depending-on-other-clips-position/300166/1 "2009-11-17T01:48:57Z")

</div>

Hi again!  
In a preview post, without success, I was trying to do an Elastic Menu in AS3.  
The problem creating the menu with differents elements and submenus is resolved.  
Now, I need to relocate the menu elements dinamicly through TweenLite.  
For that, I use this method named posicionar();

```auto

[SIZE=2]private function posicionar():void {[/SIZE]
 
[SIZE=2]for (i=0; i<tamArray-1; i++) {[/SIZE]
[SIZE=2]var elemento=itemArray[i+1];[/SIZE]
[SIZE=2]newdestino = (itemArray*.y+itemArray*.height+2);[/SIZE]
[SIZE=2]//elemento.y=newdestino; [/SIZE]
[SIZE=2]//When I use the line above, works perfect. If I use the line below I need 3 clicks over one element to relocate the rest in the right position.[/SIZE]
[SIZE=2]TweenLite.to(elemento, 1, {x:elemento.x, y:newdestino, ease:Elastic.easeOut});[/SIZE]
[SIZE=2]}[/SIZE]
 
[SIZE=2]} [/SIZE]

```

[SIZE=2]As I say in the commented codeline, the Tween doesn’t get the right destination. I think is because the loop or may be not. Should be another logic to do relocating stuff.[/SIZE]  
[SIZE=2]Any help is wellcome. If I solve this problem, I will share the hole code for a Elastic XML Menu with the forum people.:party::party:[/SIZE]  
[SIZE=2]Thanks in advance.[/SIZE]  
[SIZE=2]RO[/SIZE]
