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