all groups > macromedia flash sitedesign > july 2004 >
You're in the

macromedia flash sitedesign

group:

Actionscript for continuous scrolling ??


Actionscript for continuous scrolling ?? Brightbelt
7/20/2004 12:21:54 AM
macromedia flash sitedesign: Hi -
I'm on Flash Mx 04, and I'm using a dynamic text field. I've set it with a
text variable correlated with an external text file and all works fine. I'm
still kinda a newbie and so I did this by following a tutorial. I made a
background canvas for the text etc and I'm satisfied with the whole thing
except the actionscript for scrolling. I made the buttons and the script
goes as follows:
_root.dyntextinstancename.scroll = _root.dyntextinstancename.scroll + 1

The actionscript works just fine. The only thing is, I'd like to have a
continuous scroll effect if the user presses the button and holds it down. I
realize this may be very advanced in the actionscript, but I thought I'd ask
in case it's easier than I'm thinking or at least possible. For the user to
have only one (1) line advance at a time when pressing the button seems
tedious, but if I set the scroll number to two (2) or three (3) (....I'm
aware of that option), that can confuse the user as to where they are in the
text,...where they were ..and where they're going etc. Does anybody knokw of
actionscript that can facilitate continuous scrolling or point me towards a
tutorial that shows this ? I appreciate any help,..if possible.
Thanks,...Frank

www.frankbright.com

Re: Actionscript for continuous scrolling ?? Brightbelt
7/21/2004 12:34:04 AM
Yes this is for the flash actionscript forum. It has been reposted there.
Thanks,...Frank
[quoted text, click to view]

Re: Actionscript for continuous scrolling ?? macron
8/23/2004 9:29:03 PM
hi,

i was trying to figure out the same thing a while ago and found the solution
here:

http://actionscript-toolbox.com/sampletextscroller.php

see the section marked "click and hold" - it's a two part process. first
create a button, then convert the button into a movie clip. the author of this
page created some script you can copy and paste into your own .fla file.

cheers,
macron.

Re: Actionscript for continuous scrolling ?? NSurveyor
8/23/2004 9:40:45 PM
here is a simple script to do what you want, its self explanitory.

//give your button the instance name myButton
myButton.onPress = function() {
down = true;
};
myButton.onRelease = function() {
down = false;
};
this.onEnterFrame = function() {
if (down) {
_root.dyntextinstancename.scroll += 1;
//a+=b means b is added to the value of a;
}
};
AddThis Social Bookmark Button