Screen wrapping problem

Hi there!

I’m realy stuck with the following problem :

I’ve created a emptyMovieclip as the “holder” of a variabel amount of movies.
The xposition of the holdermovie responds to the _xmouse.

Now i want to let the movie “wrap” arround the screen

So when a nested movie moves outside of the screen on the left side, i change the xposition of the that nested movie in the holder to the position of the last nested movie + the moviewidth of the nested movie.

This way the width of the holder stays the same but the problem is that the Xposition of the holdermovie does not change.

I’m i thinking wrong or should the Xposition of the holder be deterimend by the first nested movie.


[COLOR=darkred]// creating and filling the holder[/COLOR]
[COLOR=darkred][/COLOR]
[COLOR=darkred]_root.createEmptyMovieClip(“itemHolder1_mc” , 0);[/COLOR]
[COLOR=darkred][/COLOR]
[COLOR=darkred]for(var i=0;i<itemAmount;i++){[/COLOR]
[COLOR=darkred]var name:String = “item” + i + “_mc”;[/COLOR]
[COLOR=darkred]_root.itemHolder1_mc.attachMovie(“item”, name, (i+2));[/COLOR]
[COLOR=darkred]_root.itemHolder1_mc[name]._x = XposStart;[/COLOR]
[COLOR=darkred]_root.itemHolder1_mc[name]._y = itemYpospics;[/COLOR]
[COLOR=darkred]}[/COLOR]
[COLOR=darkred][/COLOR]
[COLOR=darkred]// chaning the xpos of the nested movie[/COLOR]
[COLOR=darkred][/COLOR]
[COLOR=darkred]if (_root.itemHolder1_mc._x < -(itemDistance + itemWidth)) {[/COLOR]
[COLOR=darkred][/COLOR]
[COLOR=darkred]trace (_root.itemHolder1_mc._width) // returns 1041[/COLOR]
[COLOR=darkred]trace (_root.itemHolder1_mc._x) // returns -151.4[/COLOR]
[COLOR=darkred][/COLOR]
[COLOR=darkred][/COLOR]
[COLOR=darkred]_root.itemHolder1_mc[“item”+whoisLeft+"_mc"]._x = (_root.itemHolder1_mc[“item”+whoisRight+"_mc"]._x + (itemWidth + itemDistance));[/COLOR]
[COLOR=darkred][/COLOR]
[COLOR=darkred]trace (_root.itemHolder1_mc._width) // returns 1041[/COLOR]
[COLOR=darkred]trace (_root.itemHolder1_mc._x) // returns -151.4 (and going down)[/COLOR]
[COLOR=darkred][/COLOR]
[COLOR=darkred]}[/COLOR]


any help is greatly appreciated!