# Controlling swf's

**URL:** https://forum.kirupa.com/t/controlling-swfs/62498
**Category:** Uncategorized
**Created:** [August 28, 2004, 12:20pm UTC](https://forum.kirupa.com/t/controlling-swfs/62498 "2004-08-28T12:20:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![uxte](https://avatars.discourse-cdn.com/v4/letter/u/278dde/32.png) [@uxte](https://forum.kirupa.com/u/uxte)
#### Post date: [August 28, 2004, 12:20pm UTC](https://forum.kirupa.com/t/controlling-swfs/62498/1 "2004-08-28T12:20:39Z")

</div>

Hi everyone 🙂

What I want to do is:

I have 2 swf’s one loaded in level0 and another loaded in level1 (called from the first one). I want to put a button on the second swf that would control the first one by telling him to go to an exact scene and frame just like the **gotoAndPlay** action.

Is this possible?

---

<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: [August 28, 2004, 1:53pm UTC](https://forum.kirupa.com/t/controlling-swfs/62498/2 "2004-08-28T13:53:56Z")

</div>

in the first SWF:

```php

var newSWF = this.loadMovie("myNewSWF.swf");
var newSWFBut = newSWF.attachMovie("buttonMovieID", "newNameForButton", newDepth);
newSWFBut.onRelease = function() {
    this._parent._parent.gotoAndPlay("frameORsceneName");
}

```

---

<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: [August 28, 2004, 5:27pm UTC](https://forum.kirupa.com/t/controlling-swfs/62498/3 "2004-08-28T17:27:01Z")

</div>

hmmm!

maybe I’m not explaining myself well… :upset:

I have a 1st movie (one.swf) that on is first frame have this action: **loadMovieNum(“two.swf”, 1);**  
and on the 2nd movie (two.swf) I have a button that I want to assign an **gotoAndPlay** action to control the 1st movie.

I have tried this:

**on (release) {**  
**\_parent.gotoAndPlay(“Scene1”, 2);**  
**}**

And this:

**on (release) {**  
**\_level0.gotoAndPlay(“Scene1”, 1);**  
**}**

And none worked, why is that? anyone?

---

<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: [September 1, 2004, 12:33pm UTC](https://forum.kirupa.com/t/controlling-swfs/62498/4 "2004-09-01T12:33:41Z")

</div>

anybody?

---

<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: [September 1, 2004, 1:40pm UTC](https://forum.kirupa.com/t/controlling-swfs/62498/5 "2004-09-01T13:40:19Z")

</div>

Did you try using framelabels instead of scenenames/framenumbers?

scotty(-:

---

<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: [September 1, 2004, 4:39pm UTC](https://forum.kirupa.com/t/controlling-swfs/62498/6 "2004-09-01T16:39:27Z")

</div>

Yes if you follow Scottys advice and use  
on (release) {  
\_level0.gotoAndPlay(“frameName”);  
}  
it will work
