Need to control scaling of a loaded swf when called from a container swf
Flash Professional 11 (build 11.0.2.489)
Problem: When a swf is loaded into a container swf, the called swf scales to fill the window. When the stand alone swf is played from an HTML or SWF, it does not scale and displays correctly. I have tried adjusting the stage dimensions, publish settings,etc to no avail.
My container swf has a Movie Clip called contentContainer and three buttons. The buttons simply addChild(selected swf) and removes the current swf child.
Is there a way to control scaling for a swf loaded within another swf?
The relevent code after calling the load functions is as follows:
function onCompletePreloading():void
{
contentContainer.addChild(_swfClipsArr[0]);
IntroButton.addEventListener(MouseEvent.CLICK, setContent);
drilldownButton.addEventListener(MouseEvent.CLICK, setContent);
EnterDatesButton.addEventListener(MouseEvent.CLICK, setContent);
}
function setContent(event:MouseEvent):void {
var _swfToAdd:MovieClip;
switch(event.target.name) {
case "IntroButton":
_swfToAdd = _swfClipsArr[0];
break;
case "drilldownButton":
_swfToAdd = _swfClipsArr[1];
break;
case "EnterDatesButton":
_swfToAdd = _swfClipsArr[2];
break;
}
contentContainer.removeChildAt(contentContainer.numChildren-1);
contentContainer.addChild(_swfToAdd);
trace(_swfToAdd.customID);
}