Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

modify scrollpane features 1

Status
Not open for further replies.

firegambler

Technical User
Sep 25, 2002
455
AT
hi,

could you please help me with this topic:

i'd like to modify a scrollpane:
firstly i'd like to change the colors of the scrollbar
secondly i'd like to modify the scrolling speed (make it scroll faster)
thirdly i'd like to put the scrollbar on the left side (is this possible?)

thanks for your help!!!!

regards

tektips.gif
 
1. just treat it like ant other component

formStyleFormat = new FStyleFormat;

formStyleFormat.scrollTrack = "0x123456";
formStyleFormat.highlight = "0x000000";
formStyleFormat.highlight3D = "0x000000";
formStyleFormat.arrow = "0xffffff";
formStyleFormat.face = "0x003366";
formStyleFormat.background = "0x123456";
formStyleFormat.shadow = "0x000000";
formStyleFormat.darkshadow = "0x000000";
formStyleFormat.addListener(myPane); //instance name
formStyleFormat.applyChanges();

2.
To change this, you will need to modify the ScrollBar component, so it will affect all scrollbars in your movie. But here is how:

Locate this bit of code inside the ScrollBar component:

FScrollBarClass.prototype.startDownScroller = function()
{
this.controller.upArrow_mc.gotoAndStop(2);
this.controller.scrollIt("one",1);
this.controller.scrolling = setInterval(this.controller,
"scrollInterval",500, "one", 1);
}

This line affects how far it moves when you click on the button at first:

this.controller.scrollIt("one",1); // change 1 to 4 or whatever

The next line affects how quickly and smoothly the bar moves when you hold
it down. The 500 is how many milliseconds between it moving it and the 1 is
the amount it will move each time, so reduce the 500 or increase the 1.

Do the same for the function startUpScroller but remember some of the values need to stay negative.

3.
I have never done this with a scrollpane but if i think of anything ill get back to you.
 
just for the interested ones...
Code:
FScrollBarClass.prototype.startDownScroller = function()
{
 this.controller.downArrow_mc.gotoAndStop(2);
 this.controller.scrollIt("one",5);
 this.controller.scrolling = setInterval(this.controller,
"scrollInterval",500, "one", 5);
}
FScrollBarClass.prototype.startUpScroller = function()
{
 this.controller.upArrow_mc.gotoAndStop(2);
 this.controller.scrollIt("one",-5);
 this.controller.scrolling = setInterval(this.controller,
"scrollInterval",500, "one", -5);
}
...makes it perfect,
otherwise just the downscrolling goes faser.
the script is to be put in the actions-layer of the scrollpane

regards

tektips.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top