# MC like button/Invoking another mc to place

**URL:** <https://forum.kirupa.com/t/mc-like-button-invoking-another-mc-to-place/171445>\
**Category:** flash\
**Created:** [December 5, 2005, 3:34pm UTC](https://forum.kirupa.com/t/mc-like-button-invoking-another-mc-to-place/171445 "2005-12-05T15:34:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![skabszo](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@skabszo](https://forum.kirupa.com/u/skabszo)\
**Post date:** [December 5, 2005, 3:34pm UTC](https://forum.kirupa.com/t/mc-like-button-invoking-another-mc-to-place/171445/1 "2005-12-05T15:34:22Z")

</div>

Hi - I have a big problem and please help me to solve it. I have moviclip called “b1” which I am using as a button. This b1 is in the shape of switch and when I am clicking on it it turn right and when I’m clicking again the switch is turning left to the primary position. this action is explained by AS code:

```auto
left = true; 
 b1.onPress = function() { 
      if(left) { 
      this.gotoAndPlay(2); 
    ; 
      left = false; 
   }else{ 
      this.gotoAndPlay(5); 
      left = true; 
   } 
}

```

My problem starts when I want to invoke another movieclip in some place of my scene ( place described by X: and Y: ). I used to invoke clips by this code:

```auto
b1.onRollOver = function () 
{ 
   var klip:MovieClip = this.attachMovie("kwadrat", "kwadrat1", this.getDepth(), {_x: 560, _y:75}); 
   klip.gotoAndPlay(1); 
      var klipa:MovieClip = this.attachMovie("fkck", "fkck1", this.getNextDepth(), {_x: 489, _y:73}); 
   klipa.gotoAndPlay(1); 
    
} 
b1.onRollOut = function() { 
   this["kwadrat1"].gotoAndPlay(12); 
   this["fkck1"].removeMovieClip(); 
};

```

And only thing which I do is that I have to modernize this AS code for my own requirement. My problem is that I don’t have any idea to connect those two codes. My scene ( my menu bar which I was talking about) looks like that:

www.skabszo.alks.info/Untitled-2.html

and please click one of the buttons to see what i am talking about. Sorry for my English but I’m still learning. Best reagards Paul 🙂 :bu:
