moving 2 movieclips
moving 2 movieclips
Out of context: Reply #1
- Started
- Last post
- 32 Responses
- unfittoprint0
function move(status, speed){
this.speed = speed;
if(status){
this.onEnterFrame = function(){
movieclip1._x += speed;
movieclip2._x += speed;
} else {
delete this.onEnterFrame;
}
}//usage
button.onPress = function(){
move(true, 5);
}button.onRelease = function(){
move(false);
}//for motion in the opposite direction use negative speeds.