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

How to use Scrolling bars in director ?

Status
Not open for further replies.

alexrcorvo

Instructor
Feb 15, 2001
10
PT
Hello everyone. I've been having a problem on using Customized scroll bars in director. They never stay where i want them to stay. Also, the original scrolling bars of the text remain present, which becomes a little bit confuse. Is there any tutorial that explains this correctly? Thank you in advance.

 
I have had the same problem. I created a custom scrollbar it didn't work. Anybody can help us?
 
Very basic method. Make your custom slider. Put the following script on it (I am doing this off top of my head and haven't used director for about 6 months, you may need to work it a bit)

property spritenum
on exitframe me
' this checks they are movieing the slider
if the mousedown = true and the mousemember = spritenum then

'this bit limits where the slider can be put
if the mouseV < 100 and the mouseV > 0 then
sprite(spritenum).locv = the mousev
end if

' get the % of the max distance it can move
percMoved = sprite(spritenum).locv / 100

' now to make the thing scroll
' I dont know how to find out the max scroll so this is hard coded. Try to work it out, hard coded is evil
member(textmember).scrolltop = 200 * percMoved
end if
end

Now, this should (its untested and ugly) do what you need. There are other ways to control the movement of the slider, and probably better places to put the code that scrolls the text, eg lingo dictionary puts their scroll code in prepareframe.





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top