HOME | DD

JohnJensen β€” Fireworks Toy

Published: 2008-01-01 02:14:34 +0000 UTC; Views: 6461; Favourites: 52; Downloads: 118
Redirect to original
Description Use the mouse.

Click to create fireworks!


i = 0;
onMouseDown = function () {
for (x=0; x<30; x++) {
i++;
_root.createEmptyMovieClip("Fireworks"+i, i, {_x:_xmouse, _y:_ymouse});
_root["Fireworks"+i].lineStyle(3, random(0xFFFFFF), 100);
_root["Fireworks"+i].moveTo(_xmouse, _ymouse);
setX = _xmouse+random(50)-25;
setY = _ymouse+random(50)-25;
_root["Fireworks"+i].lineTo(setX, setY);
_root["Fireworks"+i].Xspeed = (_xmouse-setX)/3;
_root["Fireworks"+i].Yspeed = (_ymouse-setY)/3;
}
};
onEnterFrame = function () {
for (y=0; y _root["Fireworks"+y]._x += _root["Fireworks"+y].Xspeed;
_root["Fireworks"+y]._y += _root["Fireworks"+y].Yspeed;
_root["Fireworks"+y]._alpha -= 2;
if (_root["Fireworks"+y]._alpha<10) {
_root["Fireworks"+y].removeMovieClip();
}
}
};
Related content
Comments: 67

derpyhoovemuffins [2014-03-30 23:29:01 +0000 UTC]

random rainbow firework exsplosion! Β  Β 

πŸ‘: 0 ⏩: 0

derpyhoovemuffins [2014-03-29 14:21:28 +0000 UTC]

wow! love it!! Β random mnm

πŸ‘: 0 ⏩: 0

irient [2008-03-02 02:57:33 +0000 UTC]

Wow very nice work! I had fun using it! xD

πŸ‘: 0 ⏩: 0

metal-icecream [2008-01-12 06:55:32 +0000 UTC]

woh my computer went so slow!!! maybe i shouldnt clik 50 times per second...

πŸ‘: 0 ⏩: 1

JohnJensen In reply to metal-icecream [2008-01-12 10:09:54 +0000 UTC]

Yeah..XD

πŸ‘: 0 ⏩: 0

Bilianna [2008-01-09 17:13:37 +0000 UTC]

weeeeeeeee!

πŸ‘: 0 ⏩: 0

Moggle0 [2008-01-02 16:27:27 +0000 UTC]

cool lol i clicked a bunch and now my computer goes really slow XD

πŸ‘: 0 ⏩: 1

JohnJensen In reply to Moggle0 [2008-01-05 21:03:03 +0000 UTC]

Idk how to fix it

πŸ‘: 0 ⏩: 1

Moggle0 In reply to JohnJensen [2008-01-07 00:04:47 +0000 UTC]

yeah its not your fault its my computers. Curse you Windows!

πŸ‘: 0 ⏩: 1

mathwiz9 In reply to Moggle0 [2008-01-14 22:07:16 +0000 UTC]

i would much rather get a mac but currently i have stupid vista!

πŸ‘: 0 ⏩: 0

Red-hog [2008-01-02 01:09:08 +0000 UTC]

happy new year man

πŸ‘: 0 ⏩: 1

JohnJensen In reply to Red-hog [2008-01-02 13:39:07 +0000 UTC]

yes very much indeed. :D

πŸ‘: 0 ⏩: 0

frozenpandaman [2008-01-01 17:43:18 +0000 UTC]

that code makes it all slow and not block-like

πŸ‘: 0 ⏩: 1

JohnJensen In reply to frozenpandaman [2008-01-02 13:38:45 +0000 UTC]

Oh really? D:

πŸ‘: 0 ⏩: 1

frozenpandaman In reply to JohnJensen [2008-01-02 18:48:17 +0000 UTC]

πŸ‘: 0 ⏩: 0

khcat [2008-01-01 17:20:42 +0000 UTC]

thanks for putting the script

πŸ‘: 0 ⏩: 1

JohnJensen In reply to khcat [2008-01-01 17:30:44 +0000 UTC]

your welcome XD

but credit me if you're using it

πŸ‘: 0 ⏩: 1

khcat In reply to JohnJensen [2008-01-01 17:56:55 +0000 UTC]

ok, but i wont submit it unless i make a game with it....(if i can)

πŸ‘: 0 ⏩: 0

Hypothermial-Moron [2008-01-01 14:52:07 +0000 UTC]

Good job indeed.

πŸ‘: 0 ⏩: 1

JohnJensen In reply to Hypothermial-Moron [2008-01-01 16:05:39 +0000 UTC]

thanks

πŸ‘: 0 ⏩: 1

Hypothermial-Moron In reply to JohnJensen [2008-01-01 23:49:28 +0000 UTC]

No problem. ^^

πŸ‘: 0 ⏩: 0

Ravmaster [2008-01-01 13:59:24 +0000 UTC]

FACK YEAH!

πŸ‘: 0 ⏩: 1

JohnJensen In reply to Ravmaster [2008-01-01 14:44:56 +0000 UTC]

FUNK YUS!

πŸ‘: 0 ⏩: 0

elrey13194 [2008-01-01 13:22:09 +0000 UTC]

If you click lots of times, it looks kind of like the "Vortec Space" background for Windows XP, maybe Vista too, I dunno


Incredibly laggy for me D:

πŸ‘: 0 ⏩: 1

JohnJensen In reply to elrey13194 [2008-01-01 14:44:45 +0000 UTC]

Yeah XD

πŸ‘: 0 ⏩: 0

DCLeadboot [2008-01-01 11:14:07 +0000 UTC]

Bang!! Cool SFX!

πŸ‘: 0 ⏩: 1

JohnJensen In reply to DCLeadboot [2008-01-01 11:21:50 +0000 UTC]

Thanks! 8D

πŸ‘: 0 ⏩: 0

Netami-Fire [2008-01-01 10:56:13 +0000 UTC]

I lagged by clicking too many times in the same spot....
Nice one, Jonneh Boy! :I

πŸ‘: 0 ⏩: 1

JohnJensen In reply to Netami-Fire [2008-01-01 11:09:24 +0000 UTC]

Thanks 8D

πŸ‘: 0 ⏩: 1

Netami-Fire In reply to JohnJensen [2008-01-01 23:05:42 +0000 UTC]

your welcome! 8D
*does the JohnJensen*

πŸ‘: 0 ⏩: 0

psykopath [2008-01-01 08:53:37 +0000 UTC]

Also for random colors you can do 0xFFFFFF*Math.random(), or even random(0xFFFFFF). Make sure it is without the " things.

πŸ‘: 0 ⏩: 1

JohnJensen In reply to psykopath [2008-01-01 10:32:39 +0000 UTC]

Thanks a lot XD

πŸ‘: 0 ⏩: 0

psykopath [2008-01-01 08:51:26 +0000 UTC]

Nice.

It'd look less confusing if you changed this line:
_root.createEmptyMovieClip("Fireworks"+i, i, {_x:_xmouse, _y:_ymouse});
to this
firework = _root.createEmptyMovieClip("Fireworks"+i, i, {_x:_xmouse, _y:_ymouse});
and then change your other lines to
firework.lineStyle(2, "0x"+random(999999), 100);

It'd also save processing time because it would only have to retrieve the mc once and not every single time

πŸ‘: 0 ⏩: 1

JohnJensen In reply to psykopath [2008-01-01 10:32:53 +0000 UTC]

Hmm okay.

I'll remember that next time.

πŸ‘: 0 ⏩: 0

sonigoku [2008-01-01 08:08:35 +0000 UTC]

Schweeeeeeeeeeeeeeet!

πŸ‘: 0 ⏩: 1

JohnJensen In reply to sonigoku [2008-01-01 10:33:32 +0000 UTC]

Thanks

πŸ‘: 0 ⏩: 1

sonigoku In reply to JohnJensen [2008-01-01 14:32:44 +0000 UTC]

yw

πŸ‘: 0 ⏩: 0

DudogRenee [2008-01-01 05:54:01 +0000 UTC]

Nice!!

Cool animation!!

πŸ‘: 0 ⏩: 1

JohnJensen In reply to DudogRenee [2008-01-01 10:33:43 +0000 UTC]

Thanks. 8D

πŸ‘: 0 ⏩: 1

DudogRenee In reply to JohnJensen [2008-01-01 11:06:20 +0000 UTC]

Yer welcome!!

It's so cool and very good animation!!

Well done dude!

πŸ‘: 0 ⏩: 1

JohnJensen In reply to DudogRenee [2008-01-01 11:09:56 +0000 UTC]

It's just programming. No animation.

πŸ‘: 0 ⏩: 1

DudogRenee In reply to JohnJensen [2008-01-01 11:18:54 +0000 UTC]

Oh, but stil, good job!

πŸ‘: 0 ⏩: 1

JohnJensen In reply to DudogRenee [2008-01-01 11:22:32 +0000 UTC]

yea, thanks 8D

πŸ‘: 0 ⏩: 1

DudogRenee In reply to JohnJensen [2008-01-01 11:29:11 +0000 UTC]

Arrrrrrr!!!!!

Yer welcome!!!

πŸ‘: 0 ⏩: 0

Shadogal94 [2008-01-01 02:40:15 +0000 UTC]

very cool! i like it. colourful and fun and ZOMGFIREWORKGOBOOM 8D

πŸ‘: 0 ⏩: 1

JohnJensen In reply to Shadogal94 [2008-01-01 10:33:47 +0000 UTC]

Yeah XD

πŸ‘: 0 ⏩: 0

additude101 [2008-01-01 02:37:56 +0000 UTC]

Ooh pretty!

πŸ‘: 0 ⏩: 1

JohnJensen In reply to additude101 [2008-01-01 10:33:57 +0000 UTC]

Yes, very much indeed.

πŸ‘: 0 ⏩: 0

marol-luna [2008-01-01 02:26:46 +0000 UTC]

^_^ very nice!

πŸ‘: 0 ⏩: 1

JohnJensen In reply to marol-luna [2008-01-01 10:35:03 +0000 UTC]

thank you c:!

πŸ‘: 0 ⏩: 0


| Next =>