24 Mei 2010

Creating a Custom Cursor

  1. Create a Movieclip for the custom cursor, say a small circle and name the instance say, 'cust_cursor'. The instance name of a symbol is used to control it using Actionscript commands (Refer to Flash Photo Masking for this example).
  2. Select the Movieclip instance 'cust_cursor' on the stage and reduce the Alpha value to 40 and write the following Actionscript code for it as given below:
  3. onClipEvent(load) { Mouse.hide(); this.startDrag(); }
    Fig: Simple Custom Cursor in Flash
  4. The 'hide' method of the predefined object 'Mouse' is used to hide the standard cursor. The keyword 'this' is used to reference the Movieclip instance 'cust_cursor'.
  5. We use the 'startDrag' action of the Movieclip to use the movieclip as a custom cursor.
  6. The Custom Cursor Movieclip can also be Animated and used as a Mask as shown in the example below.
  7. Save your work and test the Movie (Ctrl + Enter). That's it you have learnt how to create a movieclip as a custom cursor in Flash.

    Related Posts by Categories



    0 komentar: