How do I stop resize on external SWF?

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;


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

// clear movies from other buttons

// 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(){


	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.


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 :slight_smile:

Maybe this thread might help.

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.