ok...this is a old one... But, I think I had the same problem as describe here:
you want to have a full browser page image background? and all the other elements (button, movie clic, whatever) not be resized like this:
http://www.aurelienbercon.com/fullbrowser/
in this example, I have:
- a MovieClip that contains the background , instance name : “backg”
- A MovieClip that contains a image (the turntable) positioned in the middle, instance name: “turn”
Here is the ActioScript:
//this function fills the background with the image)-----------------------------
function fillBG() {
//backg must have the same size of the stage (browser page
backg._width = Stage.width;
backg._height = Stage.height;
//…and it has to be positioned in the middle
backg._x = Stage.width / 2;
backg._y = Stage.height / 2;
}
//I call the function
fillBG();
//I create an object that be a listener (it will “listen” if the stage is resized)-----------------
var stageL:Object = new Object();
//if the stage is resized: I call the function “fillBG” again (to resize the background) and I repositioned the “turn” image in the middle
stageL.onResize = function() {
fillBG();
turn._x = Stage.width / 2;
turn._y = Stage.height / 2;
}
//I attach the listener to the stage
Stage.addListener(stageL);
when publishing the HTML, “Dimensions” should be in “Percent” and “flash alignment” : “left” and “Top”
Then open the HTML file in a text editor and change the body tag by:
<body bgcolor="#000000" scroll="no" bottommargin="0" rightmargin="0" topmargin="0" leftmargin="0">
(This will fill totally the html page)
I hope it will be useful for someone, even if the post is 2 years old.![]()
By the way: I was helped by this tutorial:
http://www.gotoandlearn.com/play?id=31 (called “Full Browser Flash”)
I spent most of the day on it, so I wanted to share it with someone![]()




Reply With Quote