Wednesday, April 4, 2012

Custom Mouse Pointer

To create a custom mouse pointer in one of your Flash movies, we just need to add a short snippet of ActionScript to a movie clip.
  • Create a new Layer on top of all other layers.
  • Draw a "mouse pointer" of any shape, color, etc.
  • Select the pointer (I click on the keyframe to select everything)
  • Convert your pointer to a symbol (movie clip) and call it "Pointer"
  • Right-Click the new symbol and Select Actions
  • Paste the following code in the Actions
onClipEvent (load) {
Mouse.hide();
startDrag(this, true);
}
onClipEvent(mouseMove){
updateAfterEvent();
}
______________


Test your movie (CTRL+Enter)

You may need to adjust where the "point" is on your pointer:

  • Double-click the pointer to open the clip
  • Adjust the "point" to be right on the + sign
  • You can also add animation if you would like

No comments:

Post a Comment

REMEMBER:

•  Add your name to your projects
•  Save Photoshop projects as PSD and JPG
•  Save Bryce projects as BR7 and [Save Image As] JPG
•  Save Sculptris projects as SC1 and JPG and export it as an OBJ.
•  Save Rhino projects as 3DM and JPG
•  Save Flash projects as FLA and go to FILE>PUBLISH SETTINGS and publish as SWF and JPG
•  Upload finished projects to your portfolio and/or your DeviantArt page
•  Keep checking your grade on PowerSchool