Multiple masking

hey all,
im working on a flash project and i wanna use a whole bunch of rectangular boxes to show my background image. the image is suppose 2 be behind a darker rectangular box which is gonna be set on a different layer. basically, this is what i did.
i had n image and i wanted to use the masking effect where a single line would go over a dark rectangle so that the fancy image i have can be seen in the normal way when you do the masking effect.
but what im tryin to do is have a whole bunch of shapes doing stuff in random motion at the same time so that those shapes show the background image over the rectangular box like in the same way when you do masking. any suggestions?

put them all in a movieclip and use that to mask

i did actually try that out. i had two different rectangles and i made them move about in different directions. yet, only the first rectangle could be seen.

I`m not entirely clear as to what you are trying to do, have a look at this and see if its any help.

tha was amazing. yup, im tryin to do pretty much tha, but what you did was have a whole bunch of the same type of boxes moving around in random motion. wha im tryin to do is hav 3 spheres (very small ones) which move abou independently. with tha, im also tryin to have a few horizontal and vertical rectangular bars which move abou. but those bars don keep moving abou unlike the spheres.
how did u do that:h:? tha was sweeeet:thumb:

Convert you background image to a movieclip and give it an instance name of masked.
press ctrl/f8 to create a new movieclip.
on different layers tween your spheres and put your bars
go back to the main timeline containing masked
open the library and drag an instance of the symbol you have just created onto the stage.
give it an instance name mask
open the actions panel, click on the first frame and in the actions panel type

oh cool. i always thought there would be a code or something like it to make it move around randomly like in the snow effect illustrated in one of the kirupa tutorials…

The one i made does use some simple code, but I don`t think there is any need for you to, unless you want the spheres to move in a more random manner.

well i dunt really mind if they could move abou on a vertical axsis in a random motion.

so you just want a couple of spheres moving up and down and the speed varying from time to time?What about the bars, are the moving horizontally?
maybe rotate 90 degrees if they hit the edge of the mask?

well im not so sure about the bars right now cuz im still finishing up on the art work tha im gonna be using in the background. so far, im jus hoping maybe i could have some help with the spheres.

This is the same file as i made earlier with horizontal velocity removed and the squares now spheres.

tha was niceeeee… yea im tryin to do jus that. is there any way thaa there cud be like more circles 2 giv n aquarium effect. like u know, how the bubbles go up in an aquarium. tha was niceee:thumb:

if you edit the circle thing to make smaller and change the script to this, you won`t be far away. Experiment with changing the variables round.
createEmptyMovieClip(“paper”, 5);
function makeBubbles() {
myClip = paper.attachMovie(“c”, “c”+i, i);
myClip._x = Math.round(Math.random()*Stage.width);
myClip._y = Stage.height;
myClip.velY = Math.round(Math.random()*5);
myClip.onEnterFrame = wobble;
function wobble() {
this._y -= this.velY;
this.velY += .2;
if (this._y<0) {
myInterval = setInterval(makeBubbles, 50);

You could even shape tween the bubble/bubbles on its own timeline for extra effect.

ok so i create the circle symbol, put in a movie clip n then make n additional movie clip write the code in it n insert tha code clip in2 the original movie clip. did i get it right?

how wud i make an image blurry or blurred out in flash?

If you take the last file i uploaded,delete all the code and copy/paste the code above.Then go to the library,find the circle and edit.

ok, i tried the code out, doesn seem to be workin. i made the image as a movie clip symbol, made another move clip symbol wit the circle in it. placed the movie clip symbol wit the pic in one layer n made n box in the other layer and put the code down in the first layer. doesn seem to be workin

ok, i also tried out wha u suggested wit changin the code in the file u uploaded. dude ure a genius, hahaha… thas was amazing :thumb: