Hi to all people in this list.
Please help me with code. I want to scroll image line as on this site
http://www.vincentpetersphotography.com/
Look please at any gallery.

Here is my example
http://www.natavi.co.uk/test/gallery_mouse.html
I don’t like how my scrolling works. It stops sometimes, it’s too fast
in the middle area, it should not have constant speed on the border. I
use this code for mc contents:

var     scrollRatio=(contents._width-boxW)/boxW;
var     centerX=contents._x;

contents.onEnterFrame=function(){
        if (_root._xmouse>=left && _root._xmouse<=right){
                 var scrollpos = -_root._xmouse;
                var newPos = centerX+Number(((scrollpos+left)*scrollRatio));
                var active=true;
        }
        if (active){
                difX = newPos - this._x;
                this._x = this._x + difX / 5;
        }
        if(Math.abs(difX)<0.01){
                this._x=newPos;
                delete active;
                delete difX;
        }
                        
}

Can anybody share with code for correct scrolling or example? Thanks in advance.

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to