MovieClip Scrollpane FAQs
- what can I do if the scrollbars or the layer masking get's messed up when I change the content of the scrollpane?
- Can I change the layout of the scrollbars?
- The loadMovie()-function behaves different on wrapped movieclips, is this supposed to be?
- It seems my Security settings are overwritten when I use the MovieclipScrollpane class, how come?
what can I do if the scrollbars or the layer masking get's messed up when I change the content of the scrollpane?
If you load an external MC into an already wrapped MovieClip or if you change the size of the wrapped movieclip, the layer masking might get lost or the scrollbars do not adapt to the new content size.
In this case you need to call the reinit(targetMovieClip) method of the MovieclipScrollbar class after the wrapped content has been initialized.
Can I change the layout of the scrollbars?
Yes! In order to change the size and colors of the scrollbars you need to take a look at the ScrollbarLayout.as file. Herein you can specify colors, alpha values and sizes of the scrollbars components.
The loadMovie()-function behaves different on wrapped movieclips, is this supposed to be?
Indeed the MovieclipScrollbars-class overrides the loadMovie-function of the wrapped movieclip. This is needed since the otherwhise it would not be able to catch the onLoadInit Event if a new MovieClip is loaded into the wrapped MovieClip.
Actually this makes live easier for you, since you can use the loadMovie function wihtout the need to call the MovieclipScrollbars.reinit(...) method after a new MovieClip has been loaded into the wrapped MC.
Internaly the MovieclipScrollbars-class will do the following upon calling loadMovie() on the wrapped movieclip: an instance of the MovieClipLoader will be used to load the target clip into the wrapped mc. A listener is registered to the MovieClipLoaders onLoadInit event, calling reinit after the MC has been loaded and initialized completely.
It seems my Security settings are overwritten when I use the MovieclipScrollpane class, how come?
In order to allow masking of externaly loaded MovieClips, the MovieclipScrollpane class overrides the security settings of the Flash Player using the following line in the class constructor:
Only with this line in place, the flash player allows masking of external MovieClips. If you do not need to wrap external MovieClips with scrollbars, you can as well remove this line or if you only load MovieClips from a single domain, you can replace the "*" with your domain name.