# ScrollPane and attachMovie

**URL:** <https://forum.kirupa.com/t/scrollpane-and-attachmovie/27630>\
**Category:** flash\
**Created:** [August 4, 2003, 10:45pm UTC](https://forum.kirupa.com/t/scrollpane-and-attachmovie/27630 "2003-08-04T22:45:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![waffe](https://avatars.discourse-cdn.com/v4/letter/w/c37758/32.png) [@waffe](https://forum.kirupa.com/u/waffe)\
**Post date:** [August 4, 2003, 10:45pm UTC](https://forum.kirupa.com/t/scrollpane-and-attachmovie/27630/1 "2003-08-04T22:45:13Z")

</div>

I am trying to scroll movie clips in a scrollPane. By default you can scroll one movie clip from your library by putting its linkage name in the properties box of the scrollPane. Great, but I need to load a whole bunch of movie clips in the scrollPane. So what I have been trying to do is load a movieClip into the scrollPane that has a attachMovie command in it that calls another movie clip. The second movie loads but it is not scrollable. Can someone please take a look at my FLA.

> **[ReverbNation : Artists First](https://www.reverbnation.com)**
>
> ReverbNation helps Artists grow lasting careers by introducing them to industry partners, exposing them to fans, and building innovative tools to promote their success.

---

<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:** [August 5, 2003, 3:17am UTC](https://forum.kirupa.com/t/scrollpane-and-attachmovie/27630/2 "2003-08-05T03:17:29Z")

</div>

I dont think you can specify 2 movie clips to display in the scroll pane at the same time.

---

<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:** [August 5, 2003, 6:27pm UTC](https://forum.kirupa.com/t/scrollpane-and-attachmovie/27630/3 "2003-08-05T18:27:41Z")

</div>

I have had a little success with this but I do mean a little. As I can tell the component creates a temp directory where all the content is loaded. So I have been loading my movie clips into the temp directory but the movie clips still don’t scroll.

Question, does anyone have an idea on how to scroll dynamic movie clips?

---

<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:** [August 5, 2003, 6:29pm UTC](https://forum.kirupa.com/t/scrollpane-and-attachmovie/27630/4 "2003-08-05T18:29:23Z")

</div>

You did scroll a dynamic loaded movie clip.  
You want to know how to scroll 2 movie clips at the same time?

---

<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:** [August 5, 2003, 6:39pm UTC](https://forum.kirupa.com/t/scrollpane-and-attachmovie/27630/5 "2003-08-05T18:39:33Z")

</div>

Yes, I have scrolled a dynamically loaded movie clip, but there where problems with it. It would flash in and out of view as I scrolled it.

I would like to know how to scroll 2 or more dynamically loaded movie clip at the same time.

---

<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:** [August 5, 2003, 7:08pm UTC](https://forum.kirupa.com/t/scrollpane-and-attachmovie/27630/6 "2003-08-05T19:08:33Z")

</div>

Again I dont think thats possible to scroll more than 1 movie clip at the same time on one single scroll pane.  
Try running a google search on scrollpane component or searching flash help.

---

<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:** [August 5, 2003, 7:14pm UTC](https://forum.kirupa.com/t/scrollpane-and-attachmovie/27630/7 "2003-08-05T19:14:15Z")

</div>

This code works just as I want except it only works in the x position (horizontal scroll). If I set the x position to y position (vertical scroll) all of the movie clips slide up to the same y position covering all but 1 movie clip. Is there a tricky little way around this I am missing?

```auto

for (i=0; i-1<5; i++) {
newYPosition = newYPosition+130;
_root.createEmptyMovieClip("banner"+i, i+3);
loadMovie("scrollpane_object.swf","_root.banner"+i);
eval("_root.banner"+i)._x = 50;
eval("_root.banner"+i)._y = newYPosition;	 

}
//scrollBar._x = 50;
scrollBar.setHorizontal (false);
scrollBar.setScrollProperties (1, 50, 400);
scrollBar.setChangeHandler ("mover");
function mover () {
eval("_root.banner0")._x = scrollBar.getScrollPosition();
eval("_root.banner1")._x = scrollBar.getScrollPosition();
eval("_root.banner2")._x = scrollBar.getScrollPosition();
eval("_root.banner3")._x = scrollBar.getScrollPosition();
eval("_root.banner4")._x = scrollBar.getScrollPosition();
eval("_root.banner5")._x = scrollBar.getScrollPosition();
}

```

---

<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:** [August 5, 2003, 8:44pm UTC](https://forum.kirupa.com/t/scrollpane-and-attachmovie/27630/8 "2003-08-05T20:44:38Z")

</div>

The final trick was to…  
:ch:

```auto

scrollBar.setHorizontal (false);
scrollBar.setScrollProperties (1, 130, 400);
scrollBar.setChangeHandler ("mover");
function mover () {
eval("_root.banner0")._y = scrollBar.getScrollPosition();
eval("_root.banner1")._y = scrollBar.getScrollPosition()+130;
eval("_root.banner2")._y = scrollBar.getScrollPosition()+260;
eval("_root.banner3")._y = scrollBar.getScrollPosition()+390;
eval("_root.banner4")._y = scrollBar.getScrollPosition()+520;
eval("_root.banner5")._y = scrollBar.getScrollPosition()+650;
}

```
