I have very little knowledge of ActionScript.
I have a movie clip. I want it to move along the x-axis when i press down on a button(button or movie clip) I do not know what code to use as it needs to be Action Script 2.
Is there a Tutorial or something that can accomplish this?
I have found a tutorial that moves the object around when you press a button. I am trying to get the same effect when you click down on a button:
http://www.kirupa.com/developer/actionscript/xymove.htm
Thank you for any help
UPDATE
The button is called btn
and the object that moves is mctransparent
I have managed the folowing:
onClipEvent (mouseDown) {
_root.mctransparent.onEnterFrame = function() {
if (_root._xmouse<_root.mctransparent._x) {
_root.mctransparent._x -= 10;
} else {
_root.mctransparent._x += 10;
}
};
}
onClipEvent (mouseUp) {
delete _root.mctransparent.onEnterFrame;
}
This is on the actions panel of the btn
But when you click on the object that must move it moves. I cannot get it so the object only moves when you click and hold on the btn.