# Control a swf from another swf

**URL:** https://forum.kirupa.com/t/control-a-swf-from-another-swf/10903
**Category:** flash
**Created:** [January 9, 2003, 3:58am UTC](https://forum.kirupa.com/t/control-a-swf-from-another-swf/10903 "2003-01-09T03:58:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![reweb](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/reweb/32/135_2.png) [@reweb](https://forum.kirupa.com/u/reweb)
#### Post date: [January 9, 2003, 3:58am UTC](https://forum.kirupa.com/t/control-a-swf-from-another-swf/10903/1 "2003-01-09T03:58:29Z")

</div>

Hy,  
I don’t speak wery well english. I hope you understand me. =)

My problem:

I load swf2 in swf1.  
In swf2 is placed a menu. When I press a button from swf2 I want to tell swf1 to GoAndPlay frame x.

Please help me. :hangover:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 9, 2003, 7:27am UTC](https://forum.kirupa.com/t/control-a-swf-from-another-swf/10903/2 "2003-01-09T07:27:06Z")

</div>

In the frame that you want the .swf1 to load into .swf2 put :

```php

loadmovie("swf1.swf", "_root.yourplaceholderMCnamehere");

```

In your first frame of your swf1:

```php

stop ();

```

In your button’s actions :

```php

on (release) {
_root.yourplaceholderMCnamehere.gotoAndPlay ("frameName");
}

```

and that should work. After looking at that, I have also uploaded a .zip file with everything in it.

Glad to help.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 9, 2003, 8:32am UTC](https://forum.kirupa.com/t/control-a-swf-from-another-swf/10903/3 "2003-01-09T08:32:16Z")

</div>

:-\  
In the archive you put insert.swf & main.swf.  
Insert.swf is loaded in main.swf.  
I wanna control main.swf from insert.swf.

4 example

When I click a button in insert.swf; main.swf play frame x.

I hope you understand now what I want exactly.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [January 9, 2003, 9:22am UTC](https://forum.kirupa.com/t/control-a-swf-from-another-swf/10903/4 "2003-01-09T09:22:47Z")

</div>

Ok, then in that case, just make your button :

```php

_root.gotoAndPlay ("framename");

```

or

```php

_parent.gotoAndPlay ("framename");

```

hopethat helps
