[flashpro] Scroller End

Manmeet Bilkhoo manmeet at liquidstorms.com
Tue Jun 7 09:44:54 EDT 2005


I have this verticle scroller that has a gesture movement on it. When you
move to the center of the scrolling item, it slows down....and as you move
to either end it speeds up.

The scrolling item is a movieclip with following script on enterframe:

onClipEvent (enterFrame) {
    yAccel = -Number((_parent._ymouse-(this._height/2))/4);
    this._y = Number(this._y+(yAccel/10));
    if (this._y>61) {
        this._y = 61;
    } else if ((this._y+this._height)<505) {
        trace(this._y);
        // NEED SOMETHING HERE TO STOP SCROLLING!!!!
    }
}

I am stuck on what the final bit of code should be to halt the scrolling
when it gets to the bottom of the movieclip. I would like it to work so no
matter how long or short the height of the clip is, it would update itself
automatically and stop at the bottom of the clip.

view here
http://www.liquidstorms.com/v_scroll2.swf

download here
http://www.liquidstorms.com/v_scroll2.fla

Any help appreciated

mb



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.6.5 - Release Date: 07/06/2005



More information about the FlashPro mailing list