PDA

View Full Version : 100% flash background stretch, but set size content?


raza
09-06-2004, 05:02 AM
Hey folks, thanks all in advance for the help (new to the forums!)

I did a search or two, but I don't think I know exactly what to search for.

So basically, I'm creating a flash site that I want to stretch the size of the page. Well, that's right and wrong, all I want to stretch, or tile, is the background of the flash file while the main content stays in a box in the center of the window.

The main reason I need to do this is the background is kind of this pin-striped pattern, and sections of the navigation(that reside in the set size box) have transparencies in them. So I want to be able to see the pin-stripes through it.

Best I could find of this example is here.

http://www.gskinner.com/site1/

His content stays at a set size, but the background is a tiled flash image- or whatever.

Hope you can help me!

exygen
09-06-2004, 08:21 PM
i think this will do it:

1. in the html set the width and height properties to 100%

2. in the flash file make the background image a movie clip with these actions on it:
onClipEvent (enterFrame) {
if (_width != Stage.width) {
_width = Stage.width;
}
if (_height != Stage.height) {
_height = Stage.height;
}
}

raza
09-06-2004, 09:46 PM
Hey there exygen,

but doesn't that just stretch the background to the size? I have a mc as the background, and I need to tile it so that when the flash file is stretched the background will just wallpaper the rest- and not stretch it.

I'm currently using this script to keep the file from scaling, but now I just need to figure out how to tile the background along with it.

fscommand ("fullscreen", true);
Stage.align = "LT";
Stage.scaleMode = "noScale";

But thanks so far!

exygen
09-06-2004, 10:48 PM
ok heres what i came up with.

exygen
09-06-2004, 10:52 PM
and it would probably be more efficient to set up the tile_mc to be a listener to the Stage object so that it would just run the loop whenever the size of the stage is changed.

raza
09-07-2004, 12:09 AM
Awesome!

Thanks so much! :]

exygen
09-07-2004, 12:26 AM
np:)