HOME | DD

MixedMilkChOcOlate — Make my mouse shine script

Published: 2009-08-24 20:01:17 +0000 UTC; Views: 7227; Favourites: 156; Downloads: 155
Redirect to original
Description Just a free actionscript 3 classes I have made for fun

________________ CODE _______________________

package {
import flash.display.Sprite;
import flash.display.MovieClip;
import flash.events.*;
import flash.filters.BlurFilter;

[SWF(frameRate="30", backgroundColor="#000000")]

public class MouseEfect extends Sprite {
private var _ar_obj:Array = new Array();
private var _boolMouseoolean;

public function MouseEfect () {
_ar_obj = new Array();
_boolMouse = true;

stage.addEventListener(Event.MOUSE_LEAVE, stageOut);
stage.addEventListener(MouseEvent.MOUSE_MOVE, stageOver);

this.addEventListener(Event.ENTER_FRAME, enter_f);
}

public function stageOver(me:MouseEvent):void {
_boolMouse = true;
}

public function stageOut(e:Event):void {
_boolMouse = false;
}

public function enter_f(e:Event):void {
if(_boolMouse) {
createClassObject();
}

for(var i:int = 0 ; i < _ar_obj.length ; i++) {
_ar_obj[i]["_obj"].alpha -= 0.04;
_ar_obj[i]["_obj"].y -= _ar_obj[i]["_cptY"];
_ar_obj[i]["_obj"].x -= _ar_obj[i]["_cptX"];

var blurlurFilter = new BlurFilter(_ar_obj[i]["_blur"] , _ar_obj[i]["_blur"], 3);

_ar_obj[i]["_obj"].filters = [ blur ];

_ar_obj[i]["_cptX"] = Math.random() * 2 - 1;
_ar_obj[i]["_cptY"] += _ar_obj[i]["_cptY"] / 40;

if(_ar_obj[i]["_alpha"] <= 0) {
_ar_obj.slice(_ar_obj[i]["_position"], _ar_obj[i]["_position"] + 1);
this.setChildIndex(_ar_obj[i]["_obj"], 0);
this.removeChildAt(0);
}

}
}

//
public function createClassObject():void {

// creat a sprite and add it to the output
var particule:Sprite = new Sprite();
particule.graphics.beginFill(0xFFFFFF);

var r_x:int = Math.random() * 15 - 4;
var r_y:int = Math.random() * 20;
var r_w:int = Math.random() * 2 + 1;
var r_h:int = Math.random() * 2 + 1;

particule.graphics.drawRect(this.mouseX + r_x, this.mouseY + r_y, r_w, r_h);

// add the sprite to the an Object
var objComplexbject = {_objarticule, _cptY:1, _cptX:0, _blur:1, _position:_ar_obj.length};

// add to the scene
this.addChild(objComplex["_obj"]);
_ar_obj.push(objComplex);
}
}
}

________________________________________ _____

See the code and result on my "wonderfl" account here [link]
Related content
Comments: 108

MixedMilkChOcOlate In reply to ??? [2009-08-25 06:10:35 +0000 UTC]

lol no problem take you time

Thank you

👍: 0 ⏩: 0

elfkiara [2009-08-25 01:21:18 +0000 UTC]

Awww beautiful!!

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to elfkiara [2009-08-25 06:10:38 +0000 UTC]

Thank you

👍: 0 ⏩: 1

elfkiara In reply to MixedMilkChOcOlate [2009-08-26 06:11:12 +0000 UTC]

You're welcome

👍: 0 ⏩: 0

wingsofdragons [2009-08-25 00:48:08 +0000 UTC]

Play with me !! Love it .. the coding is cool

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to wingsofdragons [2009-08-25 06:10:57 +0000 UTC]

Thank you

👍: 0 ⏩: 1

wingsofdragons In reply to MixedMilkChOcOlate [2009-08-25 10:18:10 +0000 UTC]

~

👍: 0 ⏩: 0

Pixelisto [2009-08-24 22:24:11 +0000 UTC]

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to Pixelisto [2009-08-25 06:12:33 +0000 UTC]

👍: 0 ⏩: 0

HardToFindAName [2009-08-24 22:12:33 +0000 UTC]

lol ya des emotes dans ton code

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to HardToFindAName [2009-08-25 06:12:42 +0000 UTC]

ouaip je sais

👍: 0 ⏩: 0

Ryo-sensei In reply to ??? [2009-08-24 21:04:23 +0000 UTC]

If the background was blue, it could double as bubbles.

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to Ryo-sensei [2009-08-24 21:08:09 +0000 UTC]

haha maybe

👍: 0 ⏩: 0

ddm92392 In reply to ??? [2009-08-24 20:45:31 +0000 UTC]

Fun!

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to ddm92392 [2009-08-24 20:55:57 +0000 UTC]

Thank you

👍: 0 ⏩: 0

erato-x [2009-08-24 20:40:10 +0000 UTC]

Neat! This entertained me for like 10 minutes hehe

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to erato-x [2009-08-24 20:42:31 +0000 UTC]

haha I like to play with it too

thanks

👍: 0 ⏩: 0

Plaguemotes In reply to ??? [2009-08-24 20:32:43 +0000 UTC]

Epicness!

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to Plaguemotes [2009-08-24 20:34:15 +0000 UTC]

Thank

👍: 0 ⏩: 0

SansNoir In reply to ??? [2009-08-24 20:30:23 +0000 UTC]

How do you use this code in a site?

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to SansNoir [2009-08-24 20:34:38 +0000 UTC]

Yes if you code some flash stuff with actionscript 3 you can use it

👍: 0 ⏩: 1

SansNoir In reply to MixedMilkChOcOlate [2009-08-24 21:02:29 +0000 UTC]

Iunno how to use it, though. o.o;

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to SansNoir [2009-08-24 21:08:20 +0000 UTC]

Okay ^^

👍: 0 ⏩: 1

SansNoir In reply to MixedMilkChOcOlate [2009-08-24 21:08:44 +0000 UTC]

How do you use it? xD

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to SansNoir [2009-08-24 21:12:03 +0000 UTC]

On flash CS or the website "wonderfl" for free

My wonderfl home page : [link]

👍: 0 ⏩: 1

SansNoir In reply to MixedMilkChOcOlate [2009-08-24 21:16:09 +0000 UTC]

Wonderfl...Ha ha, I get it; it's a pun.

But once I download the actionscript file, do I just post it in my HTML paragraph or do I need to like, merge it with my .css file or something?

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to SansNoir [2009-08-24 21:17:27 +0000 UTC]

No only the actionscript code

👍: 0 ⏩: 1

SansNoir In reply to MixedMilkChOcOlate [2009-08-24 21:18:17 +0000 UTC]

Oh. o.o; Awesome.

Now I just need a free host....since Sitesled went Kapoot....And FreeWebs is just retarded.

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to SansNoir [2009-08-24 21:19:20 +0000 UTC]

I don't a lot free host

👍: 0 ⏩: 1

SansNoir In reply to MixedMilkChOcOlate [2009-08-24 21:20:48 +0000 UTC]

Oh. o.o; Hm. Oh well.

Thank you for the code! ^^

👍: 0 ⏩: 0

ThunderWolfang [2009-08-24 20:24:32 +0000 UTC]

Cool!

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to ThunderWolfang [2009-08-24 20:28:26 +0000 UTC]

Thank you

👍: 0 ⏩: 1

ThunderWolfang In reply to MixedMilkChOcOlate [2009-08-24 20:30:05 +0000 UTC]

You're welcome

👍: 0 ⏩: 0

Tifa22 In reply to ??? [2009-08-24 20:24:27 +0000 UTC]

Shine, my mouse, shine!

Though I think it also looks a bit like bubbles
Did you watch "Finding Nemo"?
Just had to think of that one fish with his bubbles
"My bubbles, my bubbles!"

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to Tifa22 [2009-08-24 20:28:48 +0000 UTC]

Shine
haha mu bubbles

👍: 0 ⏩: 1

Tifa22 In reply to MixedMilkChOcOlate [2009-08-24 20:39:53 +0000 UTC]

👍: 0 ⏩: 0

Kimiko-The-Umbreon In reply to ??? [2009-08-24 20:23:54 +0000 UTC]

idk how to use this D8

and also the code is messed up on the Artist comment..

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to Kimiko-The-Umbreon [2009-08-24 20:29:39 +0000 UTC]

You can use it if you are a programmer using, actionscript 3 only

I know

👍: 0 ⏩: 1

Kimiko-The-Umbreon In reply to MixedMilkChOcOlate [2009-08-24 20:36:24 +0000 UTC]

FFF oh well x'D

its awesome btw C8

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to Kimiko-The-Umbreon [2009-08-24 20:39:34 +0000 UTC]

👍: 0 ⏩: 0

AngelLale87 In reply to ??? [2009-08-24 20:19:30 +0000 UTC]

LOVE IT!!!! can i use it?? i usually put the "tinkerbell" effect for my template... *_* but this is better then "tinkerbell"..i really love it

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to AngelLale87 [2009-08-24 20:23:41 +0000 UTC]

Yes you can use it
Thank you

👍: 0 ⏩: 1

AngelLale87 In reply to MixedMilkChOcOlate [2009-08-24 20:29:56 +0000 UTC]

Thanks to you

👍: 0 ⏩: 0

KimRaiFan In reply to ??? [2009-08-24 20:18:07 +0000 UTC]

Awesome!
Just be careful, some emotes sneaked over the code on the Artist's Comments

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to KimRaiFan [2009-08-24 20:24:16 +0000 UTC]

lol I know but I can't stop them

Thank you

👍: 0 ⏩: 1

KimRaiFan In reply to MixedMilkChOcOlate [2009-08-24 20:53:41 +0000 UTC]

Yes you can
But it'll take a bit
To stop an emote from mushing around just put the somewhere around the code
Just like from you get :O and the whole bunch will be :O


Anytime

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to KimRaiFan [2009-08-24 21:09:06 +0000 UTC]

oh really cool thanks

👍: 0 ⏩: 1

KimRaiFan In reply to MixedMilkChOcOlate [2009-08-25 07:54:47 +0000 UTC]

anytime

👍: 0 ⏩: 0

donkirk In reply to ??? [2009-08-24 20:14:13 +0000 UTC]

nice bit of fun, good work

👍: 0 ⏩: 1

MixedMilkChOcOlate In reply to donkirk [2009-08-24 20:24:27 +0000 UTC]

Thank you

👍: 0 ⏩: 0


| Next =>