Hi everybody !
I’m new to Kirupa… That’s a webpage that help me a lot because I’m really new to Flash and I need a looot of knowledges… Sorry for my english, that’s not so good but I will try to explain my problem as best as I can.
I’va got a problem with a nice tutorial : Tile (Duplicate) Background
I could make it as I wanted… And I found a system to execute the fonction when I resize, deleting all the moviesclip created and making others.
But, This fonction is using .getNextHighestDepth for each ovie clip created… and the background is not background, It’s always in front of the stage !
May I use something with levels ?
May change depth ?
I could not find the solution…
Any comments or solutions would be so nice ! Thanks a lot and merry christmas. :?)
Here are my fonctions :
[SIZE=1]pattern = “square”
tileBG = function () {
tile_width = 22;
tile_height = 22;
//
x_max = Math.round(Stage.width/tile_width);
y_max = Math.round((Stage.height-148)/tile_height);
level1.trace(x_max);
level1.trace(y_max);
for (x=0; x<=x_max; x++) {
for (y=0; y<=y_max; y++) {
bg = _root.attachMovie(pattern, “bg”+x+y, _level0.getNextHighestDepth());
bg._x = tile_widthx;
bg._y = 90+tile_heighty;
bg._alpha = 40
}
}
}
resizingBG = function() {
sliss = new Object();
sliss.onResize = function() {
for (x=0; x<=x_max; x++) {
for (y=0; y<=y_max; y++) {
eval (“bg”+x+y).removeMovieClip();
}
}
tileBG();
}
Stage.addListener(sliss);
sliss.onResize
}
removeBG = function() {
for (x=0; x<=x_max; x++) {
for (y=0; y<=y_max; y++) {
eval (“bg”+x+y).removeMovieClip();
}
}
}[/SIZE]