19 October, 2007

Scrollbar in flash

I've researched some actionscripts for Scrollbar in Flash. I made it myself before but I totally forgot...another problem is i can't find horizontal scrollbar. I only could find vertical one as usual. I need horizontal scroll for panoramic view. I will try to modify some scripts into horizontal.

Y= - this.scrollDrag._y;

function scrollUpByButton() {
posY = _parnet.text._y + 20
if (posY > 100) {
_parent.text._y = 100;
} else {
_parent.text._y = poxY;
}
this.scrollDrag._y = - (((_parnet.text._y-100)/500)*(y*2)+Y);
}

function scrollDownByButton() {
posY = _parnet.text._y - 20
if (posY > 100) {
_parent.text._y = -400;
} else {
_parent.text._y = poxY;
}
this.scrollDrag._y = - (((_parnet.text._y-100)/500)*(y*2)+Y);

}

fucntion scrollByDragging() {
_parent.text._y = ((-this.scrollDrag._y-Y) / (Y*2))*500+100;
}

No comments: