At 7/24/05 01:44 PM, Inglor wrote:
here is the demo, I left it as a link because I found the title "untitled69res" funny.
_quality = "medium";
shots = 0;
function drawCircle(mc:MovieClip, x:Number, y:Number, r:Number):Void {
mc.moveTo(x+r, y);
mc.curveTo(r+x, Math.tan(Math.PI/8)*r+y, Math.sin(Math.PI/4)*r+x, Math.sin(Math.PI/4)*r+y);
mc.curveTo(Math.tan(Math.PI/8)*r+x, r+y, x, r+y);
mc.curveTo(-Math.tan(Math.PI/8)*r+x, r+y, -Math.sin(Math.PI/4)*r+x, Math.sin(Math.PI/4)*r+y);
mc.curveTo(-r+x, Math.tan(Math.PI/8)*r+y, -r+x, y);
mc.curveTo(-r+x, -Math.tan(Math.PI/8)*r+y, -Math.sin(Math.PI/4)*r+x, -Math.sin(Math.PI/4)*r+y);
mc.curveTo(-Math.tan(Math.PI/8)*r+x, -r+y, x, -r+y);
mc.curveTo(Math.tan(Math.PI/8)*r+x, -r+y, Math.sin(Math.PI/4)*r+x, -Math.sin(Math.PI/4)*r+y);
mc.curveTo(r+x, -Math.tan(Math.PI/8)*r+y, r+x, y);
}
delete bgHeights;
_root.createEmptyMovieClip("backGround", -10000);
_root.createEmptyMovieClip("moon", -4000);
moon.beginFill(0xFFFFFF, 90);
drawCircle(moon, 450, 40, 26);
moon.endFill();
with (backGround) {
lineStyle(1, 0x000000, 0);
beginFill(0x000033, 100);
lineTo(550, 0);
lineTo(550, 400);
lineTo(0, 400);
lineTo(0, 0);
bgHeights = new Array();
bgHeights.push(260);
for (d=0; d<11; d++) {
t = bgHeights[bgHeights.length-1];
t += random(50)-25;
if (t>360) {
t = 360;
}
bgHeights.push(t);
}
endFill();
beginFill(0x2F3528, 100);
moveTo(0, bgHeights[1]);
lineStyle(4, 0xAAAAAA, 0);
for (i=0; i<bgHeights.length; i++) {
lineTo(i*55-55, bgHeights[i]);
}
lineTo(550, 400);
lineTo(0, 400);
endFill();
}
_root.createTextField("text2", 7088, 20, 10, 490, 50);
_root.text2.type = "static";
_root.text2.setTextFormat(_root.t);
_root.text2.html = true;
_root.text2.htmlText = "<font COLOR='#FFFFFF'>Created by Inglor, Denvish, DBarbarian and Liam</font>";
_root.createTextField("text1", 6088, 20, 30, 490, 50);
_root.createEmptyMovieClip("ground", -10001);
text1.html = true;
text1.htmlText = "<font COLOR='#FFFFFF'> Shots: 0";
_root.text2.selectable = false;
text1.selectable = false;
with (backGround) {
moveTo(0, 360);
beginFill(0x351100, 100);
lineStyle(5, 0x003300, 100);
lineTo(550, 360);
lineStyle(2, 0x000000, 0);
lineTo(550, 400);
lineTo(0, 400);
lineTo(0, 360);
}
function phase1(ref) {
ref.delay--;
rot = ref._rotation;
if ((rot<0) && (rot>-180)) {
rot *= -1;
} else if (rot>0) {
rot = 180-rot;
rot += 180;
}
ref._y -= Math.sin((rot/180)*Math.PI)*ref.delay;
ref._x += Math.cos((rot/180)*Math.PI)*ref.delay;
}
function generate(ref) {
for (i=0; i<40; i++) {
ref.createEmptyMovieClip("boom"+i, i*2);
ref["boom"+i].lineStyle(3, 0xFC0361, 100);
ref["boom"+i]._alpha = (100)/i-5;
ref["boom"+i].onEnterFrame = function() {
this._alpha += 2;
};
ref["boom"+i].moveTo(-i, 0);
ref["boom"+i].lineTo(-i-1, -1);
}
ref._y = 370;
ref._x = _root._xmouse;
ref.delay = random(5)+20;
ref._rotation = random(90)+235;
ref.onEnterFrame = function() {
if (ref.delay>7) {
phase1(ref);
} else if (ref.delay == 7) {
//explode(ref);
fddd(ref);
removeMovieClip(ref);
delete ref.onEnterFrame;
}
};
}
_root.counter = 0;
b = new Object();
b.onMouseDown = function() {
shots++;
text1.htmlText = "<font COLOR='#FFFFFF'> Shots: "+shots;
_root.createEmptyMovieClip("a"+_root.count
er, _root.counter);
generate(_root["a"+_root.counter]);
_root.counter = _root.counter%6+1;
};
Mouse.addListener(b);
//Denvish ext Recommend 20 to 25 FP
gravity = 1.4;
numsparks = 120;
sparksize = 2;
SW = Stage.width;
SH = Stage.height;
f = 90;
_root.rc = Math.PI/180;
_root.pa = new Array();
//Particle Array
_root.depth = 10000001;
C1 = new Array("0xFFCCFF", "0xFF00FF", "0x9900FF");
function fddd(ref) {
f += numsparks+10;
_root.createEmptyMovieClip("sparkContainer
"+_root.depth, _root.depth);
var cont = _root["sparkContainer"+_root.depth];
_root.depth++;
cont.createEmptyMovieClip("spark", -7000);
with (cont.spark) {
rd = _root.sparksize;
lineStyle(0, 0xFFCCFF, 0);
beginFill(0xFFCCFF);
moveTo(0, -rd);
curveTo(rd*2.5, 0, 0, rd);
curveTo(-rd*2.5, 0, 0, -rd);
endFill();
_visible = 0;
}
for (z=f; z<(f+numsparks); z++) {
cont.spark.duplicateMovieClip("spark"+z, z);
with (cont["spark"+z]) {
_x = ref._x;
_y = ref._y;
}
var r = random(100)+10;
var rot = random(360)*_root.rc;
//_root.rc = Math.PI/180
cont["spark"+z].dx = ref._x+r*Math.cos(rot);
cont["spark"+z].dy = ref._y+r*Math.sin(rot);
cont["spark"+z].cont = cont;
_root.pa.push(cont["spark"+z]);
//ads it to the particle array
}
}
_root.createEmptyMovieClip("enterFrameList
ner", 1000000);
_root.enterFrameListner.onEnterFrame = function() {
if (_root.pa.length>0) {
var i = _root.pa.length-1;
while (i>=0) {
var n = _root.pa[i];
new Color(n).setRGB(C1[random(C1.length)]);
n._x += (n.dx-n._x)/12;
n._y += (n.dy-n._y)/12;
n._xscale -= 2;
n._yscale = n._xscale;
if (n._y>SH || n._xscale<0) {
n.removeMovieClip();
_root.pa.splice(i, 1);
//remove it from the array
}
var container = n.cont;
i--;
}
container._y += _root.gravity;
for (qwe in container) {
container.count++;
}
if (container.count == undefined) {
container.removeMovieClip();
}
}
};
Just changed the text thingie.. anyway, I think that would good with a starry background.. then submitted as an alt. Hmm.
http://img337.images..age=fireworks7sj.swf