Kan du bruge denne her, god fornøjelse. Mvh. Nord.
//Create clip objects
flame = createEmptyMovieClip("flame",2);
cube = createEmptyMovieClip("cube",3);
drip = createEmptyMovieClip("drip",1);
//create function
this.onEnterFrame = function() {
//Create and define function variables
x=_xmouse;
y=_ymouse;
test=test+1;
b = Math.random()*40;
//Define cube movement variables
if(test<41){
slide = slide+1;
}
if(test >40){
slide = slide-1;
}
if(test>79){
test = 0;
}
//Drip properties
if(x<75){
m =100;
}
else{
m = 0;
}
drip.clear();
drip.lineStyle(1,0x0000FF,m);
for(d=Math.random()*75;d<75;d=d+Math.random()*50){
drip.moveTo(40,75+d);
drip.beginFill(0x0000AA,m-50);
drip.curveTo(35,75+d,40,60+d);
drip.curveTo(45,75+d,40,75+d);
drip.endFill();
}
//Cube properties
cube.clear();
cube.moveTo(40,20+slide);
cube.lineStyle(1,0x0000FF,100);
for(h=20;h<41;h=h+20){
cube.beginFill(0xAAAAFF,20);
cube.lineTo(60,h+20);
cube.lineTo(40,h+40-slide);
cube.lineTo(20,h+20);
cube.lineTo(40,h+slide);
cube.endFill;
cube.moveTo(40,40+slide);
}
cube.beginFill(0xAAAAFF,20);
cube.lineTo(40,20+slide);
cube.lineTo(60,40);
cube.lineTo(60,60);
cube.lineTo(40,40+slide)
cube.endFill();
cube.beginFill(0xAAAAFF,20);
cube.lineTo(40,20+slide);
cube.lineTo(20,40);
cube.lineTo(20,60);
cube.lineTo(40,40+slide)
cube.endFill();
cube.moveTo(40,80-slide);
cube.beginFill(0xAAAAFF,20);
cube.lineTo(40,60-slide);
cube.lineTo(60,40);
cube.lineTo(60,60);
cube.moveTo(40,80-slide);
cube.beginFill(0xAAAAFF,20);
cube.lineTo(40,60-slide);
cube.lineTo(20,40);
cube.lineTo(20,60);
cube.moveTo(40,80-slide);
cube.endFill();
//Flame properies
flame.clear();
for(i=6;i<35;i=i*1.2){
c= Math.random()*b+10;
flame.beginFill(0xFF5500+b*2,c);
flame.moveTo(x,y);
flame.curveTo(x+i,y,x,y-(i*2)-b);
flame.curveTo(x-i,y,x,y);
flame.endFill();
}
}
|