Groups | Blog | Home
all groups > flash actionscript > august 2007 >

flash actionscript : Scrollable Movie Clip


kitster79
8/5/2007 5:52:07 PM
Hello everyone,

I am trying to figure out why my scrollable movie clip will not stop when it
gets to the last thumbnail. Also, when I scroll back up, it only goes a little
ways up (not all the way back to the top).

If I sent you the .FLA file by email, could any one take a look at my code and
see if they could fix it for me? I would REALLY appreciate it.

Thanks

Kit
_name
8/6/2007 6:23:29 PM
you have a movie clip that you are scrolling behind a mask, right?
kitster79
8/7/2007 12:38:27 AM
Thank you. Here is my code attached to the movie clip which scrolls.

onClipEvent (load) {
movespeed = 5;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
this._y -= movespeed;
if (this._y<=-521.4) {
setProperty("_root.scroll", _y, -521.4);
}
} else if (Key.isDown(Key.LEFT)) {
this._y += movespeed;
if (this._y>=97) {
setProperty("_root.scroll", _y, 97);
}
}
}

AddThis Social Bookmark Button