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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

scrollbar component

Status
Not open for further replies.

agentboolen

Technical User
May 25, 2005
9
US
Hi im doing a website where i need to use a scrollbar for text. Im using the scrollbar component and i figured out how to customise it and all is good till i realize that when i put my mouse over the scroll bar it doesn't display a hand like a button would do. I thought if i just go into the component and turn the graphic that i have into a button it would work but it doesn't seem to be giving me the hand. I know this isn't that important and i could live with out it but i would really like the hand to come up when my mouse is over the bar.

The component i have my graphic/button in is
fsb_ScrollThumb

If anyone could give me some advise i would really appreciate it.

Thanks
Frank
 
for mx

bar.onRollOver = function() {
this.useHandCursor = true;
}

scrollbar instance name bar. this will change to a hand but probably disable the scrollbar

if you really need to be this cosmetic then maybe an invisible button will help. dont know for sure...never tried.
 
Oldnewbie its the flash MX UI component, scrollBar. I was able to change the look but cant get the hand. Billwatson yea i tried to put a button in it but for some reason the hand still doesn't appear. I have a feeling Im going to have to leave it the way it is, better then nothing. If anyone else can help I would still appreciate it.

Thanks
Frank
 
If you want the pointing finger icon on the scrollThumb and/or scrollTrack, comment out line 84 and 91 of the scrollbar's code on it's actions layer...
...
this.scrollTrack_mc.onRollOut = this.stopScrolling;
line 84 -> //this.scrollTrack_mc.useHandCursor = false;
this.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
this.scrollThumb_mc._x = 0;
this.scrollThumb_mc._y = this.upArrow_mc._height;
this.scrollThumb_mc.onPress = this.startDragThumb;
this.scrollThumb_mc.controller = this;
this.scrollThumb_mc.onRelease = this.scrollThumb_mc.onReleaseOutside = this.stopDragThumb;
line ->91 //this.scrollThumb_mc.useHandCursor=false;
this.thumbHeight = this.pageSize / (this.maxPos-this.minPos+this.pageSize) * this.trackSize;
...

If you want to add it on the up and down arrows...

Add the following bolded lines after line 74...

...
line 74 -> this.upArrow_mc.gotoAndStop(1);
this.upArrow_mc.useHandCursor = true;
this.downArrow_mc.gotoAndStop(1);
this.downArrow_mc.useHandCursor = true;
this.upArrow_mc.onPress = this.upArrow_mc.onDragOver = this.startUpScroller;
...


Regards. Affiliate Program - Web Hosting - Web Design
After 25,000 posts, banned on FK, but proud not to have bowed down to them!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top