_quality = "MEDIUM";
xSpd = 0;
ySpd = 0;
posX = b._x;
posY = b._y;
grav = 2.1;
bounce = -.75;
radius = b._height/2;
ground = 400;
dragging = false;
oldX = 0;
oldY = 0;
friction = .85;
mouseOutBox = function () {
if (_xmouse>550 || _xmouse<0 || _ymouse<0 || _ymouse>400) {
dragging = false;
stopDrag();
}
};
_root.onEnterFrame = function() {
mouseOutBox();
b.onPress = function() {
startDrag(b, true);
dragging = true;
};
b.onRelease = function() {
stopDrag();
dragging = false;
};
if (dragging == false) {
ySpd += grav;
b._x += xSpd;
b._y += ySpd;
if (b._y+radius>ground) {
b._y = ground-radius;
ySpd *= bounce;
xSpd *= friction;
}
if (b._y+radius<0) {
b._y = -radius;
ySpd *= bounce;
}
if (b._x+radius>550) {
b._x = 550-radius;
xSpd *= bounce;
}
if (b._x-radius<0) {
b._x = radius;
xSpd *= bounce;
}
} else {
oldX = posX;
oldY = posY;
posX = b._x;
posY = b._y;
xSpd = (b._x-oldX)/2;
ySpd = (b._y-oldY)/2;
}
};
If someone can help me with this (especially someone sexy like Elly or DC), it would be much appreciated.
http://members.byond.com/Spade489/forum?id=161&view=0
Applying for a job right now, though >_>