| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Wind Chaser
Join Date: Feb 2001
Location: Calgary, Canada
Posts: 306
|
Hi there,
Is there a way to stop the scrolling when it reaches the ends of the text field? Thanks for any response. Peace. |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,625
|
I'm looking into it...
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
|
|
|
#3 |
|
Wind Chaser
Join Date: Feb 2001
Location: Calgary, Canada
Posts: 306
|
Thanks Jesse.
Peace. |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,625
|
I'll bet you thought I'd forgotten about this one. Well if you did you were wrong, I've just been fiddling with various ways of doing it and I've come up with one I like a lot.
So here goes, just a few simple adaptations (note that paths are important in this so change it at your own peril!) ON the fat controller MC add this code: onClipEvent (enterFrame) { _root.bounds = _root.masker.contentText.getBounds(_root.masker); _root.yMax = _root.bounds["yMax"]; } Then change the code from frames 2 and 3 of the fatController which look like this: _level0.masker.contentText._y = _level0.masker.contentText._y + ( _level0:direction * 5); To this: if (_root.yMax > 5) { _level0.masker.contentText._y = _level0.masker.contentText._y + ( _level0:direction * 5); } And boom! Your scroll will stop when the lowest point of the content clip (in our case, the last line of text but this will work for graphic scrolls too), is about 5 pixels above the bottom of the mask. Note that this is dynamic so if you resize the text field and stuff it'll still work. Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
#5 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,625
|
Hmm that solution is flawed though as if you scroll all the way to the bottom of the text, and it stops, you can't then scroll back up because the if on the fat controller prevents it...
so what you need now is one fatController for up and one for down. or a better method of stopping it I'm still looking into it ![]() Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
#6 |
|
Wind Chaser
Join Date: Feb 2001
Location: Calgary, Canada
Posts: 306
|
Hi there,
Thanks Jesse, for looking into it. I never doubted you (cough...cough). Peace. |
|
|
|
|
|
#7 |
|
Jenova Lives!
Join Date: May 2001
Location: 3rd planet from the Sun
Posts: 148
|
so is the scrolling all fixed now?..
i'm using images instead of text.... and how would i change to scroll horizontally..? thx |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Apr 2003
Posts: 3
|
For it to scroll horizontally use the x axis instead of the y axis(change all y variables to x)
Last edited by Nerosyrius; 04-09-2003 at 10:15 PM.. |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Feb 2005
Posts: 6
|
For anybody looking for a working version of this, Im not sure if its the same as jesse tutorial but it accomplishes the same thing here is the link to a source file in flash kit
http://www.flashkit.com/movies/Scrip...1468/index.php |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scrolling Terrain Based on the Following Tutorial | *AkirA* | Simple Stuff (Newbies) | 3 | 06-28-2006 01:31 PM |
| Help with actionscript.org tutorial | jmarx | Simple Stuff (Newbies) | 1 | 05-25-2004 11:10 AM |