PDA

View Full Version : Load a new MC into the Scrollpane


JoElAtHaN
12-15-2004, 09:42 PM
Hey,

This is a simple question requiring a simple answer. My movie initially loads a MC into a scrollpane (named "worksSroll"). I want to on the click of a button, load another MC into that same scrollpane. This is what I have:

on (release) {
_root.worksScroll.contentPath ="test";
}


Where "test" is the name of the new MC that I want to load (it is exporting for ActionScipt already). Do I have to unload the current MC first or something?

deadbeat
12-15-2004, 11:52 PM
Try calling refreshPane() after you change the content:


on (release) {
_root.worksScroll.contentPath ="test";
_root.worksScroll.refreshPane()
}


HTH,

K.

JoElAtHaN
12-16-2004, 02:52 PM
Nope that did not work either. I even tried leaving the content field blank in the component inspector of the pane and after clicking the button nothing loaded. This is possible to do right? Is it a path issue? I've seen in help something like this:

_root.worksScroll.ScrollPane.contentPath ="test";

What the heck is that for?

deadbeat
12-16-2004, 06:56 PM
That code above should work...are you sure your movie clip has the linkage ID "test" associated with it?

K.

JoElAtHaN
12-16-2004, 08:11 PM
Yessir.

Sorry, I should have done this from the beginning... I've attached an example.

Thanks for your help.

:D

JoElAtHaN
12-17-2004, 03:03 PM
Can anyone help me with this?

JoElAtHaN
12-17-2004, 07:28 PM
Figured it out. The original file from the document was using the scrollpane from Flash MX. With version 2 components, the code works. Thanks for your help deadbeat.