# Dynamically loading .swf question

**URL:** <https://forum.kirupa.com/t/dynamically-loading-swf-question/26292>\
**Category:** Uncategorized\
**Created:** [July 21, 2003, 7:07pm UTC](https://forum.kirupa.com/t/dynamically-loading-swf-question/26292 "2003-07-21T19:07:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pares101](https://avatars.discourse-cdn.com/v4/letter/p/b9e5f3/32.png) [@pares101](https://forum.kirupa.com/u/pares101)\
**Post date:** [July 21, 2003, 7:07pm UTC](https://forum.kirupa.com/t/dynamically-loading-swf-question/26292/1 "2003-07-21T19:07:57Z")

</div>

ok im doing everything right everything loads and everything but for some reason. the root swf overlaps the new swf that was loaded ( the buttons are invisible yet the buttons are still being clicks on how do i make the NEW .swf overlap everything??

---

<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:** [July 21, 2003, 7:11pm UTC](https://forum.kirupa.com/t/dynamically-loading-swf-question/26292/2 "2003-07-21T19:11:56Z")

</div>

why don’t you disable the buttons when the new swf is loaded? Something like this:

```auto
on (release){
_root.myButton.enabled = false;
}

```

---

<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:** [July 21, 2003, 7:37pm UTC](https://forum.kirupa.com/t/dynamically-loading-swf-question/26292/3 "2003-07-21T19:37:29Z")

</div>

where would i put that??

---

<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:** [July 21, 2003, 7:44pm UTC](https://forum.kirupa.com/t/dynamically-loading-swf-question/26292/4 "2003-07-21T19:44:03Z")

</div>

Well if you’re loading the external movie when a button is clicked then you would apply that to the button.

---

<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:** [July 21, 2003, 7:58pm UTC](https://forum.kirupa.com/t/dynamically-loading-swf-question/26292/5 "2003-07-21T19:58:33Z")

</div>

hmmm ok, howabout the other buttons that werent clicked??

---

<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:** [July 21, 2003, 8:11pm UTC](https://forum.kirupa.com/t/dynamically-loading-swf-question/26292/6 "2003-07-21T20:11:45Z")

</div>

If you want to disable multiple buttons all at once then I suggest setting up a function, place this on the first frame of your main timeline:

```auto
function disEnable(isIt) {
	_root.mybutton1.enabled = isIt;
	_root.mybutton2.enabled = isIt;
	_root.mybutton3.enabled = isIt;
	_root.mybutton4..enabled = isIt;
}

```

Next apply this to your button:

```auto
on (release) {
	_root.disEnable(false);
}

```

That will disable all of those buttons listed in the fuction above. To renable it you would do the opposite.
