Hi all,
I’m having a problem with functions that I was hoping to get a little help with. This is probably pretty basic, but I’m new to AS, and I’m having no luck with it. What I have is two movie clips and a button. I want the movie clips to ease to a certain x position when the button is released. To do this, I’m trying to use the code below on both movie clips:
onClipEvent(load){
_x=0;
speed=10;
}
onClipEvent(enterFrame){
_x+=(endx-_x)/speed;
_root.button.onRelease = function() {
endx=100;
}
}
This code works great when it’s just on one movie clip. When I put it on two, though, only one moves. Why is that and how can I fix it? I know that if I make the “onRelease” an “onPress” in one of the MC’s, they both move- one on pressing the button and the other on releasing it. That makes sense. But why can’t I make both of them move on releasing it? I don’t get it. Any explanation you could give would be appreciated. Thanx.
Theta