View Full Version : Continuously scrolling button...questions
SinBin61
06-13-2001, 05:14 PM
I know, I know, this question is all over the message boards, but I'm still a little confused on some things. Using Flash 5, what's the most efficient way to have a button continuously scroll a clip. Can you scroll a clip within a clip? For example, I have a clip named "newstext" and in that clip is a mask layer masking a clip named "news" which is just text. Can the "news" clip be scrolled? Do the buttons have to be in the targeted clip or can they be on the main timeline? Sorry so long winded, but really want to learn this. Thanks in advance.
Robert
20 Ton Squirrel
06-13-2001, 07:42 PM
You can put your buttons pretty much anywhere on the stage or in other MCs. You just have to keep proper track of the path in which you will be referencing. I'd strongly suggest you look over the tutorial here for Paths to Objects and Variables written by Jesse. It's simple and it explains alot... heck, it helped me through one of my many addle-headed moments.
So if you have a MC that contains /another/ MC that needs to be scrolled, I'd have it structured like this:
Listbox MC
|--> ScrollUp Button
|--> Text MC
|--> ScrollDn Button
*
The Scroll buttons would contain a MC that loops a the movement of the Text MC on a mouseover... with a max, of course, for the ceiling and floor of the Text MC. You don't want that sucka flying off into the nether.
The actionscript in MC that the ScrollUp Button mouseover might look like this:
if (_level0.listbox.txtbox._y < ceiling)
_level0.listbox.txtbox._y++;
I have this visualized so the user just has to move her mouse over the top or bottom part of the listbox to get it to scroll rather than clicking an up or down button repeatedly. You can get the same effect by placing the same manner of script in different parts of the button. Be creative, have fun, and look at those tutorials... thar be good ones out there. Arrrrrrrrrrrr!!!!
[Edited by 20 Ton Squirrel on 06-13-2001 at 01:46 PM]
SinBin61
06-14-2001, 03:42 PM
Thanks alot! I got it to work.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.