Lava Flow

Another one :stuck_out_tongue:

_root.createEmptyMovieClip("container",1);
container.filters=[new flash.filters.DropShadowFilter(3,0,0,1)]
var d = 1;
MovieClip.prototype.setHue = function(x, mc) {
 //x = 0 - 1
 x = Math.max(x*2*Math.PI, 0.01);
 r = Math.floor(128+128*Math.cos(x));
 g = Math.floor(128+128*Math.cos(x+Math.PI*2/3));
 b = Math.floor(128+128*Math.cos(x+Math.PI*4/3));
 var hex = r << 16 | g << 8 | b;
 this.colorobj.setRGB(hex);
 return hex;
};
function addCircle(r){
    var mc = container.attachMovie("circle","c"+d,d++);
    mc._x=random(500);
    mc._y=random(300);
    mc.vx=mc.vy=0;
    mc._width=mc._height=r*2;
     mc.colorobj = new Color(mc.coloroverlay);
    mc.onPress=function(){
        this.pressed=true;
        }
    mc.onRelease=mc.onReleaseOutside=function(){
        this.pressed=false
        };
    var hex = mc.setHue(Math.random()/3);
    mc.filters=[new flash.filters.GlowFilter(hex,.3,30,30)];
    }
var frame = 0;
var windt =0 ;
function onEnterFrame(){
    frame++;
    windt+=.01;
    wind = .1*Math.sin(windt);
    for(var i in container){
        mc1 = container*;
        if(typeof(mc1)!="movieclip")continue;
        for(var j in container){
            var mc2 = container[j];
            if(typeof(mc2)!="movieclip" || mc2 == mc1)continue;
            var dx = mc2._x-mc1._x;
            var dy = mc2._y-mc1._y;
            var d = Math.sqrt(dx*dx+dy*dy);
            var d2 = (mc1._width/2+mc2._width/2)-d;
            var f = Math.min(20,1000/Math.pow(d,2));
            var fs = Math.min(10,Math.pow(d,1)/200); 
            if(frame<5)fs=0
            if(d2>0){
                mc1._x-=dx/d*d2/2;
                 mc1._y-=dy/d*d2/2;
                 mc2._x+=dx/d*d2/2;
                 mc2._y+=dy/d*d2/2;
                fr = d2*d2/10;
            }
            var fx = (f-fs)*(-dx/d)+wind;
            var fy = (f-fs)*(-dy/d)+.3;
            if(mc1.pressed){
                //trace(mc1._xmouse);
                fx+=mc1._xmouse/10;
                fy+=mc1._ymouse/10;
                }
            mc1.vx*=.9;
            mc1.vy*=.9;
            mc1.vx+=fx;
            mc1.vy+=fy;
            if(frame%8==0)
                mc1.filters=[new flash.filters.GlowFilter(mc1.setHue(mc1._y/300*.5),.3,50,50,1,1)];
        }
    }
    for(var i in container){
        var mc = container*;
        mc._x+=mc.vx;
        mc._y+=mc.vy;
        if(mc._x>500+mc._width/2){mc._x=-mc._width/2;mc._y=-mc._width/2};        
        if(mc._y>300+mc._width/2){mc._y=-mc._width*2;mc._x=300-Math.random()*100}
        if(mc._x<-mc._width/2){mc._x=500+mc._width/2;mc._y=-mc._width/2};
        }
    }
for(var i =0;i<20;i++){
    addCircle(10+Math.random()*30);
}

http://ffiles.com/flash/particle_effects/lava_flow_2191.html