AS2 Vertical Scroll
- Started
- Last post
- 7 Responses
- ceiling_cat
I'm having a hard time creating a scroll bar like:
Just without the inertia.
The problem being since I have the scroll bar on my browser, it's dependent on the Stage.height which varies.
Anyone know of a good link or a way to create this?
- ceiling_cat0
I mean, there's "no" scrollbar on my browser.
- fyoucher10
The 'height' value needs to be a variable. You update that variable every time the stage is resized. The stage should be 100% of the browser height (Google stage.scaleMode).
stageListener = new Object();
stageListener.onResize = function() {
//set height variable
}
stage.addListener(stageListener...
- acrossthesea0
AS3 has been out since 2006 btw :)
- just sayingacrossthesea
- take your timeacrossthesea
- laser eye tiemceiling_cat
- ceiling_cat0
Ok, i'm setting this up in the most minimilistic way I can think of with my most minimilistic understanding of AS2.
I have the main movie say 400 x 2000 pixels tall called maindude_mc
Then I have the scroll bar say 10 x 200 pixels tall called scroll_mcI have this code using the onClipEvent on a blank movie clip.
Yes, hello 2006!
onClipEvent(enterFrame) {
_root.maindude_mc._y = (_root.scroll_mc._y) * (-4);
}Yes, this code is so bad but simple. It's worked for me in the past without using a resize browser.
How do I work with this? I'm thinking
maindude_mc _y is some variable "m"
scroll_mc _y is another variable "o"Then state "m" = "o" ?
- fyoucher10
It's best that you just go to flashden.net and spend a few bucks.
- 74LEO0
scrolling a flash movie clip. yeah its on flash den