-
Scroll buttons without the scroll bar?
Hey guys, bit of a weird one.
I have set up a small application which has a movieClip (named "GuruQuestions") with a mask over it, a scrollbar which you can grab and drag and currently, it does precisely what I want it to do.
However, my boss has decided he no longer wants a 'click and drag' scrollbar, and would instead like just 2 buttons to scroll, so essentially, when the user hovers over the button, it scrolls.
I have found several threads about using this method with dynamic text, but none for using a movieClip.
Anyone know of any?
Thanks in advance.
-
Ok, so I've worked it out, now I have another issue, in that it scrolls up and down fine but it exceeds the height of the movieclip and just keeps scrolling, and if you are scrolling up it goes past the original movie clips position.
This is the code I used:
On the main time line,
PHP Code:
onClipEvent (enterFrame) { if (scrollDown) { _root.ScrollPaneMain.GuruQuestions._y = _root.ScrollPaneMain.GuruQuestions._y-2; }
On the button,
PHP Code:
on (rollOver) { scrollDown = 1; } on (rollOut) { scrollDown = 0; }
Anyone know how to set the maximum and minimum scroll boundaries?
-
-
Hey, I've got a sample project that I'll be glad to post. I'd post the code but it's a little more than just one piece of code, but it's simple and it's what you're looking for. But what version are you working in so I can save it out properly?
EDIT: I've posted the sample swf here: http://www.visualexllc.com/Practice/scrollingTute.html
Last edited by Skarab; 06-16-2009 at 11:27 AM.
-
Hi Skarab,
Thanks for the reply, I actually figured it out by replacing the;
PHP Code:
onClipEvent (enterFrame) { if (scrollDown) { _root.ScrollPaneMain.GuruQuestions._y = _root.ScrollPaneMain.GuruQuestions._y-2; }
with;
PHP Code:
onClipEvent (enterFrame) { if (scrollDown) { this.GuruQuestions._y = this.GuruQuestions._y-2; if (this.GuruQuestions._y<=-2700) { this.GuruQuestions._y = -2700; } }
On the up button I just replaced the 2700's with 0's and it performed exactly as I wanted.
Your help is very appreciated though.
-
scroll text
Originally Posted by Skarab
Hey, I've got a sample project that I'll be glad to post. I'd post the code but it's a little more than just one piece of code, but it's simple and it's what you're looking for. But what version are you working in so I can save it out properly?
EDIT: I've posted the sample swf here: http://www.visualexllc.com/Practice/scrollingTute.html
Hi Skarab!
I am looking for something similar for my flash site. I am stuck up since the buttons are not stopping when the text ends. I would be very grateful if you could post me the code for the above link. I am working on flash cs3; action script 2.
Thanks a tons!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|