PDA

View Full Version : easy one



sanman918
September 11th, 2003, 06:08 PM
OK this should be an easy one, I think i have it but for some reason it doesn't seem to be working. Pretty much all i want is an object to be dragable, and only move in the x position. It can't move up and down only side by side.
I have it so it follows the mouse but it moves in the Y how do i restrict it?

grandsp5
September 11th, 2003, 08:41 PM
on(press){
this.startDrag(leftX, this._y, rightX, this._y);
}
on(release){
this.stopDrag();
}

sanman918
September 11th, 2003, 09:48 PM
but i don't want it on press or realease...i want it onload. So would I just do onload?

Freddythunder
September 11th, 2003, 09:58 PM
Make a movieClip and put this on it:


onClipEvent(enterFrame){
this._x = _root._xmouse;
this._y = 250 //or wherever you want the y to be
}

That should do it :)

Eric Jr.
September 12th, 2003, 04:21 AM
Remind me of one of my first experiments:

http://downloads.junioronline.us/details.php?section=2&item=2