Groups | Blog | Home
all groups > flash actionscript > june 2004 >

flash actionscript : Need help with this script



Sly1211
6/15/2004 11:27:33 PM
I have this script that scrolls thumbnails. However, I'm at the point where it
won't scroll over any farther, thus, not all thumbnails come into view. Any
help would be greatly appreciated.

stop();
myStageWidth = 780;
imageStrip.startX = imageStrip._x;
imageStrip.inertia = 0.12;
imageStrip.onEnterFrame = function() {
var myTarget = _root._xmouse-_root.myStageWidth/5;
var myMove = (this.startX-myTarget-this._x)*this.inertia;
this._x += myMove;
};
OniLink
6/16/2004 4:26:22 AM
I've had this problem too. Either put a a line further up the movieClip (above the thumbnails) or below. This seemed to work for me.

Sly1211
6/16/2004 2:25:02 PM
tralfaz
6/16/2004 11:58:40 PM
[quoted text, click to view]
If you want the image strip movement centered to the stage you need to
compare the mouse position to the center of the stage which is myStageWidth
/ 2; (not 5), but maybe you wanted it off center. Then, depending on the
width of the imageStrip you can multiply the target value. this example
multiplies it by 3...

imageStrip.onEnterFrame = function()
{
var myTarget = _root._xmouse - myStageWidth / 2;
var myMove = (this.startX - (myTarget * 3) - this._x) * this.inertia;
this._x += myMove;
};

good luck,
tralfaz

Sly1211
6/17/2004 5:47:59 PM
That did it! It works now,
AddThis Social Bookmark Button