# How do I stop resize on external SWF?

**URL:** https://forum.kirupa.com/t/how-do-i-stop-resize-on-external-swf/23970
**Category:** Uncategorized
**Created:** [June 24, 2003, 8:47pm UTC](https://forum.kirupa.com/t/how-do-i-stop-resize-on-external-swf/23970 "2003-06-24T20:47:01Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![biscuit](https://avatars.discourse-cdn.com/v4/letter/b/f17d59/32.png) [@biscuit](https://forum.kirupa.com/u/biscuit)
#### Post date: [June 24, 2003, 8:47pm UTC](https://forum.kirupa.com/t/how-do-i-stop-resize-on-external-swf/23970/1 "2003-06-24T20:47:01Z")

</div>

I have a site where I want an swf to load into a panel MC that scales to accomodate it. It works to the extent that the panel MC scales and the swf loads, but when it does load the swf has also incresed in size. For example; the swf is 400x300. The panel MC grows to 400x300 but the loaded swf is much larger, say 700x500. I think the reason is that the placeholder MC that the swf loads into is contained within the panel MC and so it grows to. Does anyone know a way round this? I’ve tried using some code to resize the placeholder MC once the swf has loaded but it doesn’t seem to work. What am I doing wrong?

Here’s the code on the buttons;

on(release){

```
// reset swf load var
_root.textLoad = false; 	

// clear movies from other buttons
_root.panel.placeholder.unloadMovie("services.swf");
_root.panel.placeholder.unloadMovie("contact.swf");

// stretch panel
panel.onEnterFrame = function(){
	if(_root.textLoad != true ){
	_root.widthStretch(400, this._name, 3);
	_root.heightStretch(300, this._name,3);
	}
};

// set delay and load
var delay = setInterval(aboutReveal, 3000);
function aboutReveal(){
	_root.textLoad=true; // set swf load var
	_root.panel.placeholder.onEnterFrame = function(){
		_root.panel.placeholder.loadMovie("about.swf");

		};

	clearInterval (delay);
}

```

}

I’ve used setInterval to allow time for the resize to work nad widthStretch and heightStretch are functions set in the first frame of the main timeline.

Thanks in advance for any help and I apologise if i haven’t explained myself very well.

Cheers.

---

<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: [June 24, 2003, 9:01pm UTC](https://forum.kirupa.com/t/how-do-i-stop-resize-on-external-swf/23970/2 "2003-06-24T21:01:25Z")

</div>

I asked this a while ago but they said you couldnt load a bigger mc into a smaller one. if you make this work i will probably get a hard on 🙂

---

<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: [June 24, 2003, 9:02pm UTC](https://forum.kirupa.com/t/how-do-i-stop-resize-on-external-swf/23970/3 "2003-06-24T21:02:29Z")

</div>

Maybe this thread might help.

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=20361&highlight=resize+swf](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=20361&highlight=resize+swf)

---

<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: [June 24, 2003, 9:11pm UTC](https://forum.kirupa.com/t/how-do-i-stop-resize-on-external-swf/23970/4 "2003-06-24T21:11:38Z")

</div>

Cheers EG, I’ll give it a go with scale rather than width/height. It’s really going to be a pain working out the scale factor though cos it’s not really clear what the start size is. The place holder MC is an empty clip so it’s size should be 1x1. I also tried dynamicaly attaching the placeholder clip and then loading the swf into it once the panel has scaled. No luck.

McNasty, I’m afraid you may have to wait a while for your woody.

---

<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: [June 24, 2003, 9:12pm UTC](https://forum.kirupa.com/t/how-do-i-stop-resize-on-external-swf/23970/5 "2003-06-24T21:12:33Z")

</div>

downer
