Actionscripted Cursor Effects Tutorial [Flash][Effects][Actionscript]

Started by: The Pirate | Replies: 34 | Views: 6,297

nicknam4

Posts: 0
Joined: Jun 2026
Dec 11, 2007 11:48 PM #71479
This is awesome! I can't wait to try!
ShadowsofYesterday
2

Posts: 573
Joined: Oct 2005
Rep: 10

View Profile
Dec 12, 2007 12:03 AM #71487
Quote from Scorpioxxx
its a simple error that anyone with actionscript knowloage could figure out

Yeah, well I don't actually know the first thing about ActionScript. I just steal other people's work and pretend I know AS.

EDIT: Okay, it works now, but say I want the cursor to pass behind another object. How would I make it go behind the object, instead of showing up in front of it. Simply putting the cursor on a lower layer doesn't seem to do the trick, and putting it inside a movie clip on a lower layer, and changing "root" to "this" doesn't seem to work either.
Scorpioxxx
2

Posts: 1,454
Joined: Apr 2006
Rep: 10

View Profile
Dec 12, 2007 8:50 PM #71581
onClipEvent (load) {
depth = 61;
_root.effect.duplicateMovieClip("thing you want"+depth, depth);
_root["effect"+depth]._x = add x here._x;
_root["effect"+depth]._y = add y here._y;
depth2 = 62;
_root.effect.duplicateMovieClip("2nd thing you want"+depth2, depth2);
_root["effect"+depth2]._x = add x here._x;
_root["effect"+depth2]._y = add y here._y;


You get the general idea, you just spawn everything by AS and giving 'depth' any unique number lessthan than 100. I set up 2 for you, excluding the instance names and x/y co-ords.

Change the cursor code to;

onClipEvent (load) {
nmber = 101;
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this._y = _root._ymouse;

nmber++;
_root.effect.duplicateMovieClip("effect"+nmber, nmber);
_root["effect"+nmber]._x = this._x;
_root["effect"+nmber]._y = this._y;
_root["effect"+nmber]._rotation = random(360)+1;
if (nmber>=159) {
nmber = 101;
}

}
Alpha23

Posts: 0
Joined: Jun 2026
Dec 17, 2007 11:52 AM #72376
Very Nice Tutorial Pirate! :)

Very 'Nifty'
Raffi
2

Posts: 4,326
Joined: Aug 2006
Rep: 10

View Profile
Dec 17, 2007 7:26 PM #72411
NO MORE NIFTY.



















































































Nifty.