# Help needed please

**URL:** <https://forum.kirupa.com/t/help-needed-please/13898>\
**Category:** flash\
**Created:** [February 19, 2003, 4:25pm UTC](https://forum.kirupa.com/t/help-needed-please/13898 "2003-02-19T16:25:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![GARRETTDESIGN](https://avatars.discourse-cdn.com/v4/letter/g/aeb1de/32.png) [@GARRETTDESIGN](https://forum.kirupa.com/u/GARRETTDESIGN)\
**Post date:** [February 19, 2003, 4:25pm UTC](https://forum.kirupa.com/t/help-needed-please/13898/1 "2003-02-19T16:25:59Z")

</div>

## I am trying to make a site that scrolls the pages from side to side. The olny problem is, I belive this code is telling my movie to duplicate a section. I need to attach different content for each page ([members.bbnow.net/garrettpatz/junkymonkey.html](http://members.bbnow.net/garrettpatz/junkymonkey.html)) here is some of the code Ive done. If you need anything else to help me in the right direction, please let me know! any help would be very very appreciated. Thank you. (sorry i don’t have the .fla right now, and, I wrote that code very fast so, sorry for any errors

section = newArray(4);  
max = \_root.section.length;  
itemDepth = 1;

for (i=0; i lessthan max; i++) {  
//attach new item  
_root.content\_mc.attachMovie(“section”,"section_"+i,itemDepth);  
curItem = content\_mc[“section\_”+i];  
//puts \_mc in Array  
\_root.section\* = curItem;  
if(i == 0) {  
curItem.\_x = 0;  
} else {  
curItem.\_x = content\_mc.\_width+1;  
}  
itemDepth  
}

:love: :-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 19, 2003, 6:25pm UTC](https://forum.kirupa.com/t/help-needed-please/13898/2 "2003-02-19T18:25:24Z")

</div>

i think that your prob may be that you are attaching the MC section each time, which will just duplicate section–try creating a separate MC for each section, making sure their linkage name is the same as what you put in the section array:

//fill array w content MC names:  
section = [“main”, “content”, “about”, “contact”];  
max = \_root.section.length;

//attaches MCs associated w section names  
for (i=0; i\<max; i++){  
//attach new item  
myName = section\*;  
\_root.contentMC.attachMovie(myName, myName, i+1);  
//set xpos of each MC by multiplying pos by width   
w=myName.\_width;  
myName.\_x = w\*i;

}  
this way, it looks at the array to get the name of the MC you want to attach, and then goes and gets all of them in turn, setting the \_x of each dynamically, based on array position–to add content sections, simply add another MC, make sure it’s linkage name is set right, and then add that name to your section array.  
hope this helps…  
-mojo

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 19, 2003, 6:38pm UTC](https://forum.kirupa.com/t/help-needed-please/13898/3 "2003-02-19T18:38:42Z")

</div>

:love: Thank you so very much for that reply. That sounds like exactly what I need. I am going to try it when I go home for lunch in about 1 hr. Hopefully it will work. I am thinking that it will. I do appreciate it. I will post here what happens. Thank you again though!

(-:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 20, 2003, 9:25pm UTC](https://forum.kirupa.com/t/help-needed-please/13898/4 "2003-02-20T21:25:48Z")

</div>

Hey I fixed this in case anyone wants to know how I did it.

// attach new item  
_root.content\_mc.attachMovie(“section”, "section_"+i, itemDepth);  
curItem = content\_mc[“section\_”+i];  
// put the MC in an array  
\_root.section\* = curItem;  
if (i == 0) {  
curItem.\_x = 0;  
} else {  
curItem.\_x = content\_mc.\_width+1;  
}  
//added this to tell MC to go to the next frame, where i will have the content for my next page  
curItem.gotoAndStop(i+1);  
itemDepth++;  
}

i basically just told it to go to the next frame, where I will have my next page of content. I think this will lower loading times as well, instead of having seperate movie clips?
