View Full Version : think you're good? :P
doublethink
06-12-2003, 10:59 PM
ok here is my challenge.
fog... of greyish color.
conditions:
it must roll, like real fog.
it must allow underlying layers to be seen thorugh it, i guess that would be some sort of alpha & mask type thing.
i think its possible, but not for me. figured i post it to you guru's
i checked already and i didnt see someone ask this one.
What is exactly "fog" (sorry i'm a FrOGgy)... :D
doublethink
06-13-2003, 04:48 AM
sorry...
fog as an english term for low level clouds that appear in the morning/late evening or over bodies of water, or at very high altitudes.
cool??
Shall we draw a gf with it or not? LOL
Ok i get it... ;)
A bit too specific maybe? :rolleyes: How about any kind of fog, smoke, clouds...?
McGiver
06-13-2003, 03:20 PM
hmm, probably if you want to know how to do it ask in the forums!
but i've got nothing to do at the moment!
So: here is my post:
swf demonstration (http://nobodyxxl58.port5.com/temporary/cloud_005.html)
wait a 30 seconds till the fog has taken over the floor!
the script dos not contain the rainbow in the background!
Frame1:
function addcloud(maxnumber, targetmc, array, ymin, ymax, xmin, xmax, size, alpha, fogcolor) {
for (n=1; n<=maxnumber; n++) {
targetmc.createEmptyMovieClip("circle"+n, n);
targetmc["circle"+n]._y = ymax-(Math.random()*Math.random()*(ymax-ymin));
targetmc["circle"+n].beginFill(fogcolor, alpha);
targetmc["circle"+n].moveTo(0, -2*size);
targetmc["circle"+n].curveTo(4*size, 0, 0, 2*size);
targetmc["circle"+n].curveTo(-4*size, 0, 0, -2*size);
targetmc["circle"+n].endFill();
array.push(targetmc["circle"+n]);
targetmc["circle"+n]._x=xmin+(xmax-xmin)/2
targetmc["circle"+n].speed = Math.random()*4-2;}}
_root.instances = new Array();
addcloud( /*Number of particels created*/ 400, /*target MC*/ _root, /*Name of the array where the particels are registrated*/ _root.instances, /*the highest particels*/ 250, /*the lowest particels*/ 385, /*left border*/ 0, /*right border*/ 550, /*the size of the particels*/ 12, /*the alpha*/ 10, /*the color*/ 0x999999);
frame 2:
function moveclouds(array, xmin, xmax) {
for (n=0; n<=array.length; n++) {
array[n]._x = array[n]._x+array[n].speed;
if ((array[n]._x<=xmin) || (array[n]._x>=xmax)) {
array[n].speed = array[n].speed*-1;}}}
play();
moveclouds(_root.instances, 0, 550);
frame 3
prevFrame();
think it looks better with a radial gradient filling!
Inside alpha about 20, outside alpha about 0
think this is impossible to add within 25 lines
McGiver
06-17-2003, 01:05 PM
rewrote the code, so that it fits in one frame (learning new things every day:) )
function addcloud(maxnumber, targetmc, array, ymin, ymax, xmin, xmax, size, alpha, fogcolor) {
for (n=1; n<=maxnumber; n++) {
targetmc.createEmptyMovieClip("circle"+n, n);
targetmc["circle"+n]._y = ymax-(Math.random()*Math.random()*(ymax-ymin));
targetmc["circle"+n].beginFill(fogcolor, alpha);
targetmc["circle"+n].moveTo(0, -2*size);
targetmc["circle"+n].curveTo(4*size, 0, 0, 2*size);
targetmc["circle"+n].curveTo(-4*size, 0, 0, -2*size);
targetmc["circle"+n].endFill();
array.push(targetmc["circle"+n]);
targetmc["circle"+n]._x=xmin+(xmax-xmin)/2
targetmc["circle"+n].speed = Math.random()*4-2;}}
_root.instances = new Array();
addcloud( /*Number of particels created*/ 400, /*target MC*/ _root, /*Name of the array where the particels are registrated*/ _root.instances, /*the highest particels*/ 250, /*the lowest particels*/ 385, /*left border*/ 0, /*right border*/ 550, /*the size of the particels*/ 12, /*the alpha*/ 10, /*the color*/ 0x999999);
this.onEnterFrame=function(){
function moveclouds(array, xmin, xmax) {
for (n=0; n<=array.length; n++) {
array[n]._x = array[n]._x+array[n].speed;
if ((array[n]._x<=xmin) || (array[n]._x>=xmax)) {
array[n].speed = array[n].speed*-1;}}}
moveclouds(_root.instances, 0, 550);}
XMatrix_11
07-04-2003, 10:16 PM
hey i wanted to know, when you make a layer, then put an object for example a building, and you color the building green and you make another layer with a stick figure, how to you get that figure to appear over the green object? i can do it if its not colored green but when it is the building is always over the guy
THANKS
annexion
07-04-2003, 11:40 PM
This thread is probably the least likely place to get an answer to that question.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.