Developing Webs logo
Google
Web DW-Main DW-Photoshop
Visit the message board for solutions or post a question Check out the Classes offered for free at Developing Webs Voice Chat submit a tutorial, resources, article, font for publication consideration and earn a one way link back to your site Get more specifics about the Developing Webs Voice chat room and its room members View the current news at Developing Webs alternative sites which are resources for your d3evelopment needs Join Developing Webs Chat Link to us on your web page to help support this resource! Check out Developing Webs At yahoo groups! Developing Webs Home Adobe Photoshop Tutorials Macromedia Flash Tutorials Jasc Paint Shop Pro Tutorials Adobe Illustrator Animation basics Some Basic PHP tutorials Perl Tutorials HTML Tutorials Cascading Style Sheets javascript Front Page Tutorials Macromedia Dream Weaver Tutorials dreamweaver Publishing your site, FTP, ChMod, Promotions Tools to help you create your site Free and shareware fonts to download Photographs to use in your projects Shop for your site needs Free Online classes REcommend this site to others Log in or edit your information when logged in Developingwebs Log Out Change My Account details and preferences
RSS Newsfeed
for your site
DW News
Calendar
DW Forum
Right click on button and copy shortcut

Add to My Yahoo!

Reminder
Remember to book mark this site!



Request a Tutorial

Coin Project 10: Custom Cursor

Custom Cursors can be handled by simply hiding the windows cursor and then setting a movie clip to move with the coordinates of the mouse. In this lesson we will draw a gun site which we will then make into our cursor.

This tutorial is the last in a series of tutorial on the coin project.
 

1. Open up your project movie. Click the insert menu and select New symbol. Set the symbol to movie clip, name it scope and click ok.


2. When your scope movie clip opens, click in frame 1. Drag the following object with a black stroke, weight 2, and no fill. Make sure they are not touching.p>

  • For the Large circle: Use the ecllipse tool while holding shift key down while drawing to make a perfect circle. Highlight and resize according to the property inspector to about 64 X 64
  • For the Small circle: Use the ellipse tool while holding shift key down while drawing to make a perfect circle. Highlight and resize according to the property inspector to about 38 x 38
  • For the horizontal line: Use the Line tool with shift held down to draw a horizontal line about 100 W.
  • Do the same for the vertical Line making it about 100 H.

3. Use your arrow tool to marquee all the shapes to select them all. Click Modify=> Distribute to layers. Use your arrow tool to select all the shapes again. Open your align palette by clicking window=> align. Click the "to stage" button. Click the align horizontal centers and the align vertical centers.

All center points will snap to the center registration of this symbol.

4. Click back on scene 1. Add a layer above all the other artwork layer, but below the actions layer. Call this layer cursor. Drag a copy of the scope movie clip onto your stage. Place it off stage. Give it the instance name of scope in the properties inspector.

5. In frame2 of your cursor layer open your action panel. Click Actions=> Movie Clip Control=> onClipEvent. Select The event of Enter Frame from the events. Extend your cursor layer frames to frame4. Your scope should be visible in frame2 and 3. Not 1 and 4.

We will now set the position of _x and _y for the scope to follow the mouse coordinates by setting them equal. Choose Actions=> Variables=> Set variable. Click in the variable field. Click the target button and find your scope. Set to relative formula since this clip is directiing itself. Select "this" and click ok. Add a period followed by the property _x. The statement of this._x will set the _x of this to whatever we set the value equal to.

Click in the value field. Set the location of the cursor as _root and add a dot. Then find the property of _xmouse and add it to the script so the value become _root._xmouse . Check the box for expression.

6. Click back on the line this._x = _root._xmouse;. to add the y script underneath. Click Actions=> Variables=> Set Variable. This time you need to set the variable to this._y. Set the value to _root._ymouse. Check the expression box. (you can also copy your x script and paste it underneath and change the x to y).

7. Click back on your frame 1 and highlight your start button. Open your action panel. Click on the last script within the event handler which is start = getTimer(); Add a script by clicking Objects=> Movie=> Mouse=> Methods=> Hide. The script Mouse.hide(); will appear in the action panel.

8. Click in your ending frame of the Actions Layer. Select the action layer of your 4th frame, or stop game frame. Open the action panel. Click on the stop(); there. Select Objects=> Movie=> Mouse=> Methods=> Show. The script .Mouse.show(); will appear. Test your game! you are ready to go!!



"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2008 All Rights Reserved
Privacy and Legal