Hi Guys,
I trying to create a website in flash in which the user clicks on a thumbnail and it loads an sample animation swf in a specific area of the site.
I got to load but the problem is the swf is not displaying in its correct window size…I’m not sure how to explain it. but its showing beyond the original stage format…
any help or suggestions is greatly appreciated.
Thanks
var loader1:Loader = new Loader();
addChild(loader1);
var request:URLRequest = new URLRequest("cutout.swf");
cut_btn.addEventListener(MouseEvent.MOUSE_DOWN, cut);
function cut(evt:MouseEvent):void {
loader1.scaleY =.6; //resizing to fit in certain area of gallery
loader1.scaleX=.6;
loader1.x= 400.9; //positioning
loader1.y= 106.3;
loader1.load(request);
}
ActionScript Code:
[LEFT]loader1.[COLOR=#000080]contentLoaderInfo[/COLOR].[COLOR=#000080]addEventListener[/COLOR][COLOR=#000000]([/COLOR]Event.[COLOR=#000080]COMPLETE[/COLOR], onComplete[COLOR=#000000])[/COLOR]; [COLOR=#808080]//might want to try INIT instead of COMPLETE[/COLOR]
[COLOR=#000000]function[/COLOR] onCompleteCOLOR=#000000[/COLOR]:[COLOR=#0000FF]void[/COLOR] [COLOR=#000000]{[/COLOR]
loader1.[COLOR=#000080]scaleY[/COLOR] =.[COLOR=#000080]6[/COLOR]; [COLOR=#808080]//resizing to fit in certain area of gallery[/COLOR]
loader1.[COLOR=#000080]scaleX[/COLOR]=.[COLOR=#000080]6[/COLOR];
loader1.[COLOR=#000080]x[/COLOR]= [COLOR=#000080]400[/COLOR].[COLOR=#000080]9[/COLOR]; [COLOR=#808080]//positioning[/COLOR]
loader1.[COLOR=#000080]y[/COLOR]= [COLOR=#000080]106[/COLOR].[COLOR=#000080]3[/COLOR];
addChildCOLOR=#000000[/COLOR];
[COLOR=#000000]}[/COLOR]
[/LEFT]
You should try doing your code in a different order. You need to give flash sometime to load before you start making changes to and adding the Loader 
Thanks very much for your help!