confusing equation
- Started
- Last post
- 8 Responses
- v3nt
got this which i use to scroll a text box dependin how far the scrollbarbutton is down the 260px scrollbar;
credits.scroll = Math.round((_y-startY)/size*_par...
http://thegoodbyeplot.com/flash/…which works fine. but no i also need to set the _y of the scrollbutton depending on the scroll of the text box! as i've create an anchor systems that sets a certain word to the top of the text box. anyone handy with equations?
- Engage0
that sounds like a lovely friday evening problem
- v3nt0
that's what you said about my last problem. except it was thursday!
- skt0
If you know how far down your anchor is, say 500px in your 1500px text area, you need to work out your percent. 500 / 1500 x 100. = 33%.
Your scroller then needs to be 33% down your 260px scrollbar. So 260 x .33 = 86px
- v3nt0
cheers skt. kinda a got it working. i had the maxscroll variable wrong so was going round in circles...
- Engage0
sort of thing thata keeps me awake at night!
- v3nt0
http://thegoodbyeplot.com/flash/…
all working sweet. figured ou how to get a words' line too...
- UndoUndo0
looking good v3nt!!
- joyride0
whats that black area on the right hand side, about mid-way. seems kinda odd. other then that I'm diggin it