Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

Go Back   ActionScript.org Forums > Community Boards > Just for Kicks Challenges

Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Old 06-12-2003, 10:59 PM   #1
doublethink
Registered User
 
doublethink's Avatar
 
Join Date: Jun 2003
Posts: 42
Default think you're good? :P

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.
doublethink is offline   Reply With Quote
Old 06-13-2003, 03:52 AM   #2
xxlm
Meuh? MMeuh!
 
xxlm's Avatar
 
Join Date: Sep 2001
Location: Auckland - New Zealand
Posts: 3,049
Send a message via ICQ to xxlm Send a message via AIM to xxlm Send a message via MSN to xxlm Send a message via Yahoo to xxlm
Default

What is exactly "fog" (sorry i'm a FrOGgy)...
__________________
I'm a froggy, so excuse me for my poor english
Blog - Dev By MX
For any jobs go on my blog on the contact page...
xxlm is offline   Reply With Quote
Old 06-13-2003, 04:48 AM   #3
doublethink
Registered User
 
doublethink's Avatar
 
Join Date: Jun 2003
Posts: 42
Default

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??
doublethink is offline   Reply With Quote
Old 06-13-2003, 04:58 AM   #4
xxlm
Meuh? MMeuh!
 
xxlm's Avatar
 
Join Date: Sep 2001
Location: Auckland - New Zealand
Posts: 3,049
Send a message via ICQ to xxlm Send a message via AIM to xxlm Send a message via MSN to xxlm Send a message via Yahoo to xxlm
Default

Shall we draw a gf with it or not? LOL
Ok i get it...
__________________
I'm a froggy, so excuse me for my poor english
Blog - Dev By MX
For any jobs go on my blog on the contact page...
xxlm is offline   Reply With Quote
Old 06-13-2003, 01:37 PM   #5
pom
Allez les Bleus!!!
 
pom's Avatar
 
Join Date: Oct 2002
Location: Paname
Posts: 2,495
Default

A bit too specific maybe? How about any kind of fog, smoke, clouds...?
pom is offline   Reply With Quote
Old 06-13-2003, 03:20 PM   #6
McGiver
Goldmember
 
McGiver's Avatar
 
Join Date: Feb 2003
Location: bavaria in germany
Posts: 1,627
Default

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
wait a 30 seconds till the fog has taken over the floor!
the script dos not contain the rainbow in the background!

Frame1:
ActionScript Code:
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:
ActionScript Code:
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
ActionScript Code:
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

Last edited by McGiver; 06-13-2003 at 03:23 PM..
McGiver is offline   Reply With Quote
Old 06-17-2003, 01:05 PM   #7
McGiver
Goldmember
 
McGiver's Avatar
 
Join Date: Feb 2003
Location: bavaria in germany
Posts: 1,627
Default

rewrote the code, so that it fits in one frame (learning new things every day )

ActionScript Code:
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);}
McGiver is offline   Reply With Quote
Old 07-04-2003, 10:16 PM   #8
XMatrix_11
Registered User
 
Join Date: Jul 2003
Location: USA
Posts: 9
Send a message via ICQ to XMatrix_11 Send a message via AIM to XMatrix_11 Send a message via Yahoo to XMatrix_11
Question confused

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
XMatrix_11 is offline   Reply With Quote
Old 07-04-2003, 11:40 PM   #9
annexion
I make out with chicks
 
Join Date: Oct 2002
Location: NYC
Posts: 1,586
Default

This thread is probably the least likely place to get an answer to that question.
__________________
www.perpetuated.com
annexion is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
My brain hurts (onClipEvent question) andrea_levin ActionScript 2.0 3 03-25-2004 05:23 AM


All times are GMT. The time now is 08:40 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2009 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.
You Rated this Thread: