I am using buttons with the following code to move another movie clip:
on (press, release, keyPress “<Down>”) {
dragTree._y += 20;
}
This works fine, but I was hoping that I could make is so if you keep the mouse button pressed, it would repeat the change in location so that you do not need to continuously click the button.
This seems like it should be simple, but I could not find a thread that talked about it.
the onClipEvent(load) isn’t really even necessary… but it’s cleaner scripting to declare that at the beginning. The enterFrame event just says every time this movie clip’s playhead enters a new frame do whatever is inside the {} in this case add the value of move to the y location of ‘this’ (this being the movie clip that the code is attached to)
then on the button that scrolls it down you can use this
ooo… mind you… if you’re movie clip has a stop action in it’s timeline anywhere it will stop the enterFrame event. If that’s the case let me know and I’ll come up with a work around for it.