Lookin for assistance - Custom Scroll bar

Ok, yes i am new, and trying to study AS3 now, and have a site im just building to practice, so if anyone would be willing to help out that would be great, i may have a few questions, that are very simple but I want to ask for helping me to learn.

here is the site:
http://shadran.007sites.com/Test1.html

problem:

  1. I have a custom Scroll bar/scroller i made in Photoshop. I can make it scroll along the line using on an “actions” layer.

var bounds = new Rectangle(853,137,0,250)

function StartDrag(e:MouseEvent):void    {
    e.target.startDrag(false, bounds);
}
function StopDrag(e:MouseEvent):void    {
    e.target.stopDrag();
}

and since i have 5 pages using flagged frames i put this action in each flagged frame section:


HomeScroll_mc.addEventListener(MouseEvent.MOUSE_DOWN, StartDrag);
HomeScroll_mc.addEventListener(MouseEvent.MOUSE_UP, StopDrag);
HomeScroll_mc.addEventListener(MouseEvent.MOUSE_OUT, StopDrag);

now my question is, how can i attach this to the text box to scroll the content in that box, which i named on the first page “HomeContent_mc”

  1. you may have noticed i did a “MOUSE_OUT” to stopDrag as well as “MOUSE_UP”, and the reason for this is it was annoying to have the mouse control the scroll from anywhere on the page if you moved the mouse out of the rectangle before releasing the mouse… Is there a better way?

Hmm, I recently watched a very good video tutorial that shows you how to create a custom scrollbar in AS3 and better yet, turn it into a custom class so you can re-use it in other projects. And the graphics that make part of the scrollbar are 100% customizable.

I’ll direct you to the link! I hope it helps.

www.gotoandlearn.com

The tutorial is the most recent one, part One and part Two!

Just make sure you watch the Tweener tutorial first if you don’t know what it is because that’s the Tweening Engine that the scrollbar uses for the scrolling animation :slight_smile: