PDA

View Full Version : Problem containing 4 .SWF's


chrisdegrote
07-15-2009, 03:23 PM
Hey all,

I've got a problem with containing properly the .swf on my (main menu) site. Because the external .SWF's got a parralax effect it overlaps the swf above also the .swf is not nicely stretched out. This is the effect on my site that I want www.seniorict.com but as you look at the zip/fla(menu test) you see the complete file and how the effects are not working well.

code is

stop();
var swfs:Array = new Array("home", "kandidaten", "opdrachtgevers", "contact");
var loaders:Array = new Array();
function setLoaderSize(i:uint):void {
loaders[i].y = stage.stageHeight / swfs.length * i;
loaders[i].scaleY = 1 / swfs.length;
}
for (var i:uint = 0; i < swfs.length; i++) {
loaders[i] = new Loader();
loaders[i].load(new URLRequest(swfs[i] + ".swf"));
setLoaderSize(i);
addChild(loaders[i]);
}
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, resizeHandle);
function resizeHandle(e:Event):void {
for (var i:uint = 0; i < swfs.length; i++) {
setLoaderSize(i);
}
}

Any help is greatly appreciated!;)

31644

guide0
07-16-2009, 10:16 AM
Chris,

You are already calling your function setLoaderSize before defining the stage. You also call the function from the for loop and then once more from the resizeHandle function. That is not a good practice.

PS I could not open any FLA file. Did you use Flash CS3 to save ?

chrisdegrote
07-16-2009, 12:55 PM
Chris,

You are already calling your function setLoaderSize before defining the stage. You also call the function from the for loop and then once more from the resizeHandle function. That is not a good practice.

PS I could not open any FLA file. Did you use Flash CS3 to save ?

Now I've added the CS3 files with it hope it gives you some insight. The files are in my previous post under "CS3"

chrisdegrote
08-04-2009, 01:30 PM
What kind extra info do you alll need to help me with this? Any help is truly appreciated thanks in advance