• Home
  • Free Tutorials
  • Free Video Tutorials

Adobe Photoshop
Autodesk 3ds Max
CSS
Flash
Help Center Live
iPhone
Joomla
Make Money Online!
Mambo
mIRC
Outlook Express
SEO / SEM
Simple Machine Forum
Target Explorer

Mouse Cursor Recorder

Category : Flash Views : 38895
Version : 8 Rating : 
3.0/5 (53 votes)
  • Currently 3.02/5
  • 1
  • 2
  • 3
  • 4
  • 5
Type : Text Source File: mouse-cursor-recorder.zip
Result: See the result


Previous | 1 | 2 | 3 | 4 | Next

This code will record all mouse movement inside your flash movie and then a copy of your mouse will repeat the movements.
Free Flash Tutorials, Actionscript, Mouse Cursor Recorder

Create three buttons: "Record", "Play" and "Stop"; and give an instance name to them, "recBtn", "playBtn" and "stopBtn".

Then create the mouse Movie Clip to simulate a "real" mouse:
Free Flash Tutorials, Actionscript, Mouse Cursor Recorder

Drag it to the stage with the instance name "mouseMC".

Now open the action in the main timeline and paste:
//make the mouse copy invisible mouseMC._visible = false; //we are not recording the mouse yet so its false var recording = false; //not playing the mouse var playing = false; //index for the arrays that will store the mouse movement var index = 0; //arrays for the x and y position of the mouse var mPosX = new Array(); var mPosY = new Array(); _root.onEnterFrame = function() { //if we are recording we copy the mouse position to the arrays if(recording) { //copy _x and _y coordinate mPosX[index] = _root._xmouse; mPosY[index] = _root._ymouse; //increase index by 1 to use an empty position inside the arrays on the next frame index++ } //if we are playing what we recorded else if (playing) { //set the mouse Movie Clip position to the coordinates inside the arrays mouseMC._x = mPosX[index] mouseMC._y = mPosY[index] //increase index to move to the next position inside the arrays index++; //if we are at the last position of the mouse if(index == mPosX.length) { //show the original mouse Mouse.show(); //and make the copy invisible _root.mouseMC._visible = false; } } }

More cool tech articles from other blogs.

Place your ad here
Loading...


Previous | 1 | 2 | 3 | 4 | Next
How to Video Tutorials on software by Helpvids.com

Sponsors





click here
Studio | Advertisement | About Webzo | Contact Webzo | Terms of Use | Free Video Tutorials by Helpivds

Copyright © 2007 NR Concepts Ltd. All rights reserved.