Easy Cursor Tutorial [Flash][Actionscript]

Started by: The_Manipulator | Replies: 9 | Views: 2,596

The_Manipulator

Posts: 0
Joined: Aug 2025
Jul 2, 2008 3:06 PM #174549
In flash games there are cursors (doh). But these cursors are drawn in different shapes or form . For example in the game Johnny Rocketfingers 2 the cursor is cigar. And so:

1. Start new document
2. Make 2 layers. The first one name ,,show cursor'' (on the image is pokaji-show) and the second ,,hide cursor'' (skrii-hide) and put them like is shown on the image.
Image
3. Now click the ,,show cursor'' layer and with the pen tool or with whatever you want draw your cursor.
ImageImage
4. Right-click on the cursor you made and convert to symbol movie clip
Image
Ok click the cursor and tap F9 for the actions panel where you should put this actionscript code:
onClipEvent (enterFrame) {
startDrag(this, true)
}
Image
6. Now click the ,,hide cursor'' layer and tap F9 again and put this script
Mouse.hide();
Image
this code will hide the real cursor

Congratulations you have created your cursor! Now tap Ctrl+Enter to see your cursor.


Tut by The_Manipulator. Sorry if there are spelling errors
Scarecrow
2

Posts: 9,168
Joined: Oct 2005
Rep: 10

View Profile
Jul 2, 2008 3:25 PM #174558
Good tutorial, it should help newbies.

Also, a note of my own; increasing the frame rate of the animation makes the cursor move more smoothly.
robin

Posts: 0
Joined: Aug 2025
Jul 2, 2008 6:51 PM #174720
This is pretty much overdone but thanks for submitting! Do you maybe know a way to get it your windows cursor?
RUiN
2

Posts: 930
Joined: Jul 2007
Rep: 10

View Profile
Jul 8, 2008 12:26 AM #180385
Yeah,
I've been trying to find a way to make a cursor in flash and put it in the format to use as a cursor in windows.I havn't so far good tutorial but another way is make a movieclip Draw cursor Add actionscript and then your done
Scarecrow
2

Posts: 9,168
Joined: Oct 2005
Rep: 10

View Profile
Jul 8, 2008 3:11 AM #180475
I can't see why you would want a windows cursor as the cursor in flash which would essentially replace the already existing, real, windows cursor that the user is using to begin with.
The_Manipulator

Posts: 0
Joined: Aug 2025
Jul 8, 2008 5:59 PM #180998
Quote from mr.mcstick
Yeah,
I've been trying to find a way to make a cursor in flash and put it in the format to use as a cursor in windows.I havn't so far good tutorial but another way is make a movieclip Draw cursor Add actionscript and then your done



Nah I think its more easy with layers. Some people mess up without them and why you need windows cursor?
Paco
2

Posts: 910
Joined: Feb 2006
Rep: 10

View Profile
Jul 8, 2008 7:11 PM #181095
you know you can just look under help in flash and there is a tutorial for this.
lazy people.

[SIZE="1"]Creating a custom mouse pointer
A standard mouse pointer is the operating system's on-screen representation of the position of the user's mouse. By replacing the standard pointer with one you design in Flash, you can integrate the user's mouse movement within the SWF file more closely. The sample in this section uses a custom pointer that looks like a large arrow. The power of this feature, however, is your ability to make the custom pointer look like anything--for example, a football to be carried to the goal line or a swatch of fabric pulled over a chair to change its color....

lots of shit.....

For more information about the methods of the Mouse class, see Mouse in the ActionScript 2.0 Language Reference.

[/SIZE]

but good tutorial.
madpassion

Posts: 0
Joined: Aug 2025
Jul 9, 2008 7:31 AM #181607
Quote from the Jawz
I can't see why you would want a windows cursor as the cursor in flash which would essentially replace the already existing, real, windows cursor that the user is using to begin with.


I think what he means is "is there a way to make your custom cursor in flash usable for all around windows, not just in the movie"
fatboi88
2

Posts: 33
Joined: Jan 2008
Rep: 10

View Profile
Jul 9, 2008 9:27 PM #182123
thanks for the tutorial man really helped
poo on a stick

Posts: 22
Joined: Jul 2008
Rep: 10

View Profile
Jul 10, 2008 1:54 AM #182309
I'm a bit noobish at scripting and this really helped