View Single Post
  #1 (permalink)  
Old 02-08-2009, 01:23 AM
itjunkii itjunkii is offline
Junior Member
 
Join Date: Feb 2009
Posts: 3
Default Have mask adjust width on resize

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);
Thank you for your help very much!
Reply With Quote