deviantART
Browse Art
Prints Shop
Groups
T-Shirts & Gear
Deviants
Sta.sh
dA muro
Chat
Journals
Today
Forum
Find More Art
Daily Deviations
Critiques
Critiqueable
Wallpaper
Random
Random Deviant
Random Deviation
Random Group
Search
Username or Email
Password
Stay logged in
Login
Join deviantART for FREE
Take the Tour
Forgot Password or Username?
Deviant Login
Buy Art
Buy T-Shirts & Gear
Buy adCast
Buy Premium Membership
Shop
Join deviantART for FREE
Take the Tour
Share
Share
Tweet
Pin
Share on Reddit
Share on Google+
Share on StumbleUpon
Share on LiveJournal
Link
Embed
Thumb
[x]
Browse More Like This
Download File
SWF, 1.1 KB
more ▶
More from *
MixedMilkChOcOlate
View Gallery
·
View Prints
Featured in Groups:
Not currently featured in any groups.
Details
Submitted:
August 24, 2009
Image Size:
1.1 KB
Resolution:
550×400
Link
Thumb
Statistics
Comments:
98
Favourites:
133 [
who?
]
Views:
3,129
(2 today)
Downloads:
121
(0 today)
To
[friends]
Message
[x]
Make my mouse shine script
by
*
MixedMilkChOcOlate
Flash
/
Utilities
©2009-2013 *
MixedMilkChOcOlate
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 _boolMouse
oolean;
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 blur
lurFilter = 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 objComplex
bject = {_obj
articule, _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]
Add a Comment:
Preview
Add Comment
Emoticons
The Artist has requested Critique on this Artwork
Please
sign up
or
login
to post a critique.
love
1
1
joy
1
1
wow
1
1
mad
0
0
sad
0
0
fear
0
0
neutral
0
0
Load All Images
!
luvdibmembraine
Dec 19, 2012
Hobbyist Artist
SPARKLES!!!!!!!!!!xD
Reply
~
Hickerbop
Nov 28, 2011
Student Digital Artist
mouse: yay im all sparkly
Reply
~
inoner
Jul 11, 2011
Hobbyist General Artist
Um... you probably already noticed, but a few emotes show up in your script.
Reply
*
MixedMilkChOcOlate
Jul 16, 2011
Hobbyist Digital Artist
yes i allready see
Reply
~
chibi-chocolate123
Oct 20, 2010
Er.. whats the code for............?
Reply
*
MixedMilkChOcOlate
Oct 22, 2010
Hobbyist Digital Artist
to be used, if you know actionscript
Reply
~
chibi-chocolate123
Nov 2, 2010
no er... i don't
Reply
~
chibi-chocolate123
Oct 20, 2010
I love how the sparkles sort of melt
Reply
*
MixedMilkChOcOlate
Oct 22, 2010
Hobbyist Digital Artist
Reply
~
chibi-chocolate123
Nov 2, 2010
Reply
Previous
1
2
3
...
Next
Go To Page:
Go
Add a Comment:
Preview
Add Comment
Emoticons
Sta.sh
Submit
Sta.sh
Sta.sh Writer
deviantART muro
Submit
deviantART
Hide Media
Preview
Submit Comment
Add Media
Style
Skin:
Change skin
Upload Files
The Artist has requested Critique on this Artwork
Please sign up or login to post a critique.