# What does this part of the script acually do..?

**URL:** https://forum.kirupa.com/t/what-does-this-part-of-the-script-acually-do/223061
**Category:** flash
**Created:** [April 19, 2007, 6:33am UTC](https://forum.kirupa.com/t/what-does-this-part-of-the-script-acually-do/223061 "2007-04-19T06:33:52Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Jiruharudo](https://avatars.discourse-cdn.com/v4/letter/j/97f17d/32.png) [@Jiruharudo](https://forum.kirupa.com/u/Jiruharudo)
#### Post date: [April 19, 2007, 6:33am UTC](https://forum.kirupa.com/t/what-does-this-part-of-the-script-acually-do/223061/1 "2007-04-19T06:33:52Z")

</div>

[LEFT]

```auto

on (release) {
 if (_root.b<>1 and _root.m<>1 and _root.sm<>1) {
  gotoAndStop("s3");
  _root["b"+_root.b].gotoAndPlay("s2");
  _root.sph.sph.gotoAndPlay("s1");
  _root.b = 1;
 }
 if (_root.sm == 1 and _root.m<>1) {
  _root.b = 1;
  _root.script.gotoAndPlay("stop");
  gotoAndStop("s3");
  
 }
}

```

[/LEFT]

What would this code do if it where placed on a button with the instance name b1, b2, etc. ?

Whilst another button with instance name a has this:

```auto

on (release) {
 if (_root.m<>1){
 _root.b=1
 _root.script.gotoAndPlay("stop");}
 _root["b"+_root.b].gotoAndStop("s3");
}

```

I’m aware the question is foggy, but…

Any clue?
