Psuedo masks via alpha overlays

found an old swf and remembered something back from flash 5 that still works in mx (after just now testing to make sure). Not many people know about it and it can make for a nice effect so I thought Id throw it out there:

[edit] added more click alpha levels (you see more masking with all the clips) and fixed a minor insignificant bug. Also included a swf in a zip so you dont have to open flash to see it if you just want to… well see it ;)[/edit]

That is pretty sweet Sen, I likes.

But just as you stalk me and I stalk you… you have a mistake in your .fla in the .zip file.

Your one line says…

you = this.createEmptyMovieClip(“mover”+++a, a);

When it should say…

you = this.createEmptyMovieClip(“mover”+a, a);

its you = this.createEmptyMovieClip(“mover”+ ++a, a);
theres a space there. it increments the a value so it doesnt replace the depth of the last clip attached in the previous a-for loop. :wink:

I got an error in the Flash player though.

And I tried with the code I used and it works just the same, no difference.

(?) I just downloaded the zip, opened the file from the zip and tested it and it worked fine

Yeah, I think I might have clicked the button in MX that automatically spaces the script. I don’t remember clicking it, but i downloaded the file again, opened it up and it was fine, but then I clicked the button to see and it compresses that line, and creates that error.

But if it works the same without the ++a part, why have it? (wondering)

its not needed… its more out of habbit :slight_smile:

whenever I attach a movie thats not in a loop I use that syntax

scope.attachMovie(“linker”,“name”+ ++variable, variable);

the variable usually being something like ‘depth’ - this just always keeps it in the next depth. And I use ++variable so I KNOW its different from whatever other movie was attached with that depth. variable++ for example would use the original depth and then increment the variable…

Another reason is that in associative referencing of the clip after creation through this method doesnt require a -1, ex:

scope.attachMovie(“linker”,“name”+ ++variable, variable);
scope[“name”+variable]._x = 10;

vs

scope.attachMovie(“linker”,“name”+ variable, variable++);
scope[“name”+variable-1]._x = 10;

yeah, but its not needed heh

… come to think of it I remember going back and taking it out of you.attachMovie(“puff”,“puff”+you.depth,you.depth)

:slight_smile:

LOL, ok. So you don’t need it, but did it out of habit, but you didn’t do it on the puff clip.

Wow man… are you alright there…LOL.

Thanks for the info :slight_smile: And the file.

heres another example (for anyone not wanting to download the zip)

I call it grit heh:
http://userpages.umbc.edu/~tmccau1/flash/test/grit.swf
…its actually kind of fun to play with

they’re both kool, i like the fluidness of the mask overlays better though. The grit looks a little dithered at the center. makes me wanna say peace and love

you cant do ‘grit’ with conventional masks though

The grit one is nice… looks like… grit…LOL.

:wink: