#CopyLeft http://www.ep-ars.net .flash filename="painting.swf" bbox=120x300 version=8 compress fps=25 .gradient grad3: 0% #ff000000 80% #ff0000ff 100% #ff0000ff .end .gradient grad5: 0% #000000ff 50% #ffffffff 100% #000000FF .end .gradient grad2 radial r=5: 0% #ffffffff 100% #031515ff .end .box square1 width=15 height=2 color=#ffffff00 fill=grad3 .box bg width=120 height=300 color=#ffffff00 fill=white .box tube1 width=5 height=60 color=#ffffff00 fill=grad5 .circle circle1 r=4 color=#ffffff00 fill=grad2 .circle circle2 r=4 color=#ffffff00 fill=grad2 .circle circle3 r=4 color=#ffffff00 fill=grad2 .circle circle4 r=4 color=#ffffff00 fill=grad2 .sprite square_sprite .frame 1 .put square1 pin=center .frame 2 .action: gotoAndPlay(1); .end .end .sprite square .frame 1 .put move=square_sprite .action: if (c == undefined) { c = new Color(move); c.setRGB(0x1546B6); } .end .frame 2 .action: move.useHandCursor=1; var life_duration; var speed; var life, bounding_side; var go_through; var level = 260; if (life_duration == undefined) { life_duration = Math.round(level+(30*Math.random())); } //trace("mv = "+this.x_pos); if (this.x_pos > 20 && this.x_pos < 100) { if (move._x < 100) { speed = Math.round(13+7*Math.random()); c.setRGB(0x1546B6); } else{ if (move._x < 165) { speed = Math.round(1+2*Math.random()); c.setRGB(0x000070); } else { speed = Math.round(3+4*Math.random()); c.setRGB(0x1546B6); } } } else { speed = Math.round(13+7*Math.random()); c.setRGB(0x1546B6); } if (life == undefined) { life = 0; } if (bounding_side == undefined) { if (Math.random() > 0.5) { bounding_side = 0; } else { bounding_side = 1; } } life += speed; if (life < life_duration) { move._x += speed; if (life < level) { move._alpha = 100 * (0.25+0.75*Math.random()); } else { speed = 5; if (bounding_side == 1) { move._rotation = 225; } else { move._rotation = 135; } //c.setRGB(0xFF0000); move._width = 5; move._alpha = 100 * (1 - (life-level) / (life_duration-level)); //~ } } } else { //trace("removed with = "+life_duration); removeMovieClip(this); } this.gotoAndPlay(1); .end .end .put bg .png bgpaint "painting.png" .box tex width=80 height=60 color=#FFFFFF00 fill=bgpaint .put tex pin=center x=60 y=150 .put t3=tube1 x=100 y=120 scalex=6.33 rotate=90 .put t4=tube1 x=100 y=175 scalex=6.33 rotate=90 .put t1=tube1 x=20 y=120 .put t2=tube1 x=95 y=120 .put c1=circle1 x=19 y=119 .put c2=circle1 x=93 y=119 .put c3=circle1 x=19 y=173 .put c4=circle1 x=93 y=173 .frame 1 .play snd loop=1 nomultiple=1 .action: if (goutte == undefined) goutte = 0; if (Math.random() > 0.75) { if (goutte != 2) { var nb_sprites = 15+15*Math.random(); var range = nb_sprites / 5; x_pos = Math.round((120-range)*Math.random()); if (Math.random() > 0.25) { if (x_pos < 50 || x_pos > 70) { x_pos = Math.round(50+(20-range)*Math.random()); } } for (var i=0; i