peanuts
02-28-2005, 07:41 AM
I致e created a basic game where the user can drag an object (10 in total) to a set location. But I now need the game to finish by playing an animation and then asking the user if they want to play again.
This is the code that I知 using for all the different movable objects. It痴 just setting up the coding that will enable the game to move to the animation that I need help with, because I知 really new at actionscript and programming in general.
Would someone be willing to help me?
onClipEvent (mouseDown) {
if (_root.drag6.hitTest(_root._xmouse, _root._ymouse)) {
_root.dragged6Drag = true;
}
}
onClipEvent (enterFrame) {
if (_root.dragged6Drag) {
_root.drag6._x = _root._xmouse;
_root.drag6._y = _root._ymouse;
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root.hit6)) {
_root.dragged6Drag = false;
_root.gotoAndPlay (2);
_root.drag6._x = 335.8;
_root.drag6._y = 63.3;
} else {
_root.drag6._x = startX;
_root.drag6._y = startY;
_root.dragged6Drag = false;
}
}
This is the code that I知 using for all the different movable objects. It痴 just setting up the coding that will enable the game to move to the animation that I need help with, because I知 really new at actionscript and programming in general.
Would someone be willing to help me?
onClipEvent (mouseDown) {
if (_root.drag6.hitTest(_root._xmouse, _root._ymouse)) {
_root.dragged6Drag = true;
}
}
onClipEvent (enterFrame) {
if (_root.dragged6Drag) {
_root.drag6._x = _root._xmouse;
_root.drag6._y = _root._ymouse;
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root.hit6)) {
_root.dragged6Drag = false;
_root.gotoAndPlay (2);
_root.drag6._x = 335.8;
_root.drag6._y = 63.3;
} else {
_root.drag6._x = startX;
_root.drag6._y = startY;
_root.dragged6Drag = false;
}
}