# Affecting sequential instances

**URL:** <https://forum.kirupa.com/t/affecting-sequential-instances/286398>\
**Category:** Uncategorized\
**Created:** [April 15, 2009, 2:17am UTC](https://forum.kirupa.com/t/affecting-sequential-instances/286398 "2009-04-15T02:17:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![guitarzen](https://avatars.discourse-cdn.com/v4/letter/g/5f9b8f/32.png) [@guitarzen](https://forum.kirupa.com/u/guitarzen)\
**Post date:** [April 15, 2009, 2:17am UTC](https://forum.kirupa.com/t/affecting-sequential-instances/286398/1 "2009-04-15T02:17:46Z")

</div>

Lets say I have 5 instances of a movie named BB1,BB2, BB3, BB4 and BB5 and I want to say move them 5 pixels to the right. Is there a way to do this in one statement and not have to post it 5 times? Basically how can I shorten this to one instance to affect all of them?

on (release) {  
\_root.BB1.\_x += 5;  
\_root.BB2.\_x += 5;  
\_root.BB3.\_x += 5;  
\_root.BB4.\_x += 5;  
\_root.BB5.\_x += 5;  
}

Second question is, let say I want to create a Movie with different actions in each frame. then I want to continually call that one frame action from a button release. How would I go about this?  
Action on frame is:  
\_root.MM.\_x += 5;

Button on stage to trigger this action over and over would be?. I’ve tried gotoandPlay but it only works once  
on (release) {  
\_root.movie. ?  
}
