Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 1.0 (and below)

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-27-2001, 04:40 PM   #1
kingarturo
Wind Chaser
 
kingarturo's Avatar
 
Join Date: Feb 2001
Location: Calgary, Canada
Posts: 306
Default

Hi there,

Is there a way to stop the scrolling when it reaches the ends of the text field?

Thanks for any response.

Peace.
kingarturo is offline   Reply With Quote
Old 02-28-2001, 09:49 AM   #2
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

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.
Jesse is offline   Reply With Quote
Old 02-28-2001, 03:00 PM   #3
kingarturo
Wind Chaser
 
kingarturo's Avatar
 
Join Date: Feb 2001
Location: Calgary, Canada
Posts: 306
Default

Thanks Jesse.

Peace.
kingarturo is offline   Reply With Quote
Old 03-09-2001, 05:43 AM   #4
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

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.
Jesse is offline   Reply With Quote
Old 03-09-2001, 06:15 AM   #5
Jesse
Administrator
 
Jesse's Avatar
 
Join Date: Nov 2000
Location: Australia
Posts: 8,625
Default

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.
Jesse is offline   Reply With Quote
Old 03-09-2001, 06:59 AM   #6
kingarturo
Wind Chaser
 
kingarturo's Avatar
 
Join Date: Feb 2001
Location: Calgary, Canada
Posts: 306
Talking

Hi there,

Thanks Jesse, for looking into it. I never doubted you (cough...cough).

Peace.
kingarturo is offline   Reply With Quote
Old 04-10-2002, 08:10 PM   #7
Sephiroth
Jenova Lives!
 
Join Date: May 2001
Location: 3rd planet from the Sun
Posts: 148
Default so jesse.did u find the solution?

so is the scrolling all fixed now?..

i'm using images instead of text.... and how would i change to scroll horizontally..?

thx
Sephiroth is offline   Reply With Quote
Old 04-09-2003, 09:37 PM   #8
Nerosyrius
Registered User
 
Join Date: Apr 2003
Posts: 3
Default Two years later

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..
Nerosyrius is offline   Reply With Quote
Old 01-07-2006, 10:54 PM   #9
Seshoki
Registered User
 
Join Date: Feb 2005
Posts: 6
Default

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
Seshoki is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 01:04 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.