|
|||
|
Hello,
Love the scrollbar! I want to use it in a full screen movie and I was hoping on a suggestion on how I could have my scrollbar resize the width based on the current stage width. I can't figure out where to put the event listener in your code. Currently have the following code in my root to adjust my backround image on a resize. Any way I could incorporate this in your .as files somewhere? Code:
sizeListener = new Object();
sizeListener.onResize = function() {
mcbg.forceSmoothing = true;
if ((Stage.height / Stage.width) < picHeight) {
mcbg._width = Stage.width;
mcbg._height = picHeight * mcbg._width;
} else {
mcbg._height = Stage.height;
mcbg._width = picWidth * mcbg._height;
};
mcbg._x = Stage.width / 2;
mcbg._y = Stage.height / 2;
}
Stage.addListener(sizeListener);
|
|
|||
|
The scroller will not behave ok when resizing the mask dinamically. This happens because the thumbnails have different width's. That's why there is a variable in the .xml file called increaseTolByTimes="your_number".
If you will resize the mask dinamically when resizing the Stage you will have blank spaces at the right or at the left, I do not recommend it. |
|
|||
|
Hello I forgot that I came up with a fix for this a while ago.
It's pretty simple, in main.as you have a variable called "actualMaskWidth". That variable must be resized by width. You can access it directly because it's a static variable public static var actualLstWidth:Number; in your project or in a frame you should wrote down: import flashtory.hs.main; // like so the variable will be accesible to you main.actualLstWidth = your_number; // set the width -> Stage.width for fullscreen scroller. All the best ! |
|
|||
|
Hi Razvan,
First off I would like to sincerely thank you for getting back to me. I sincerely appreciate your time. I tried what you suggested and it made a large blank space appear on the right side. I don't think it is possible without destroying and rebuilding the whole bar on a resize. Currently I have modified <code> settings.maskWidth = Stage.width; </code> in main.as which is causing it to resize to the stage on the initial build, but of course it does not work if a resize happens after that. Take a look here if you like mc_DMW If I could embed the scrollbar in a movie clip then I could just resize the MC very easily, don't mind if I lose some quality on the resize. If I put MAIN mc in another mc it won't run, will only run under root. Thank you again for your time and expertise! |
|
|||
|
Try this instead:
in main.as go to line 101 and add this -> Stage.addListener(this); go to line 107 and add this -> public function onResize(){ actualMaskWidth =mask._width = Stage.width - 20; } Now it will work just fine ! All the best ! |