# Scroll Pane

**URL:** <https://forum.kirupa.com/t/scroll-pane/26521>\
**Category:** Uncategorized\
**Created:** [July 23, 2003, 8:09pm UTC](https://forum.kirupa.com/t/scroll-pane/26521 "2003-07-23T20:09:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![grandsp5](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@grandsp5](https://forum.kirupa.com/u/grandsp5)\
**Post date:** [July 23, 2003, 8:09pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/1 "2003-07-23T20:09:39Z")

</div>

Can anyone tell me how I load an external swf into the scroll pane component?

---

<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:** [July 23, 2003, 8:23pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/2 "2003-07-23T20:23:19Z")

</div>

[AS]on (press) {  
myScrollPane.loadScrollContent(“yourmovie.swf”);  
}[/AS]

---

<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:** [July 23, 2003, 8:26pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/3 "2003-07-23T20:26:55Z")

</div>

Thats if I want to do it with a button. If I want to do it as a frame action, do I just put in:

onClipEvent(frame){ myScrollPane.loadScrollContent(“movie.swf”);  
}

I tried this and it doesnt work. It wants a handler.

---

<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:** [July 23, 2003, 8:28pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/4 "2003-07-23T20:28:06Z")

</div>

Just throw the myScrollPane.loadScrollContent(“movie.swf”); action on the frame you want it to get activated on.

---

<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:** [July 23, 2003, 8:30pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/5 "2003-07-23T20:30:04Z")

</div>

I tried that and for some reason it didn’t work. ☹ I will try 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:** [July 23, 2003, 8:31pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/6 "2003-07-23T20:31:26Z")

</div>

Keep in mind “myScrollPane” is the instance name of the scrollpane component on the stage and “movie.swf” is the file name of the movie you are loading.

---

<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:** [July 23, 2003, 8:32pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/7 "2003-07-23T20:32:06Z")

</div>

Ok it worked this time. 🙂 However, it doesnt play the movie it only loads it. How do I tell it to play the movie as well?

---

<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:** [July 23, 2003, 8:33pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/8 "2003-07-23T20:33:22Z")

</div>

Also, is there any way I can reset the registration point so what I load will be centered?

---

<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:** [July 23, 2003, 8:33pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/9 "2003-07-23T20:33:37Z")

</div>

It should load and play it, do you have a stop() action on the first frame of the movie that gets loaded?

---

<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:** [July 23, 2003, 8:37pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/10 "2003-07-23T20:37:20Z")

</div>

No but the levels get complicated. I have a preloader which I want to keep track of this movie clip inside my main stage. I want this preloader to run inside the scroll pane window but I cant figure out how to assign the movie I just loaded an instance name.

---

<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:** [July 23, 2003, 8:49pm UTC](https://forum.kirupa.com/t/scroll-pane/26521/11 "2003-07-23T20:49:27Z")

</div>

Could i rewrite my preloader in the following way?  
bytes\_loaded = Math.round(\_root.getBytesLoaded());  
bytes\_total = Math.round(\_root.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_root.loadBar.\_width = getPercent_100;  
\_root.loadText = Math.round(getPercent_100)+"%";  
\_root.total = bytes\_total+" Bytes Total";  
\_root.loaded = bytes\_loaded+" Bytes Loaded";  
if (bytes\_loaded == bytes\_total) {  
\_root.gotoAndStop(3);  
}

and change all the \_root. to \_this (or would it just be this.(statement) not \_this.statement)
