-
Liquid Layout Help
I'm trying to build a flash liquid layout in which some items expand to the browser width/height, and others stay exact. I am controlling these elements via movie clips using as2
Stage.align = "TL";
Stage.scaleMode = "noScale";
sizeListener = new Object();
sizeListener.onResize = function() {
video1_mc._width = Stage.width;
video1_mc._height = Stage.height;
};
Stage.addListener(sizeListener);
flash object = 100% width and height in the html
Everything works great except for when you load the page or reload. The flash takes on the default width of the stage and does not resize until the browser window is resized. Any ideas on how to correct this?
-
Well, assuming Flash knows the proper width of the stage when it begins, you could simply move the resize code into a function and call it when it starts up.
Code:
sizeListener.onResize = function() {
resizeStuff();
};
function resizeStuff(){
video1_mc._width = Stage.width;
video1_mc._height = Stage.height;
}
resizeStuff();
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|