Scroll Pane

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

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

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.

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

I tried that and for some reason it didn’t work. :frowning: I will try again though.

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.

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

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

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

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.

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 = getPercent100;
_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)